Giter Club home page Giter Club logo

gradle's Introduction

gradle
gradle

This is the snap for gradle, β€œan open-source build automation tool”. It works on Ubuntu, Fedora, Debian, and other major Linux distributions.

gradle gradle

gradle

Published for with πŸ’ by Snapcrafters

Install

sudo snap install gradle --classic

(Don't have snapd installed?)

If you have any questions, post in the Snapcraft forum.

Alper Kanat
Alper Kanat

gradle's People

Contributors

brlin-tw avatar donat avatar igorljubuncic avatar merlijn-sebrechts avatar popey avatar tunix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gradle's Issues

Plugin [id: 'org.jetbrains.kotlin.jvm', version: '1.4.10'] was not found in any of the following sources

Hello!

Fresh installation ubuntu 20.04

java --version
openjdk 11.0.11 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)

Installation gradle 7.2 from snap causes error:

gradle run

Welcome to Gradle 7.2!

Here are the highlights of this release:
 - Toolchain support for Scala
 - More cache hits when Java source files have platform-specific line endings
 - More resilient remote HTTP build cache behavior

For more details see https://docs.gradle.org/7.2/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

* Where:
Build file '/home/zhakov/repos/tableviewenterproblem/build.gradle.kts' line: 3

* What went wrong:
Plugin [id: 'org.jetbrains.kotlin.jvm', version: '1.4.10'] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.4.10')
  Searched in the following repositories:
    Gradle Central Plugin Repository

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Removing gradle via snap, install gradle 7.2 from sdkman, works fine.

Repo to execute gradle run command for reproducing
https://gitlab.com/kattrielle/tableviewenterproblem

missing cacert link in snap gradle

Hi,
after refresh to rev 79, gradle was unable to publish artifacts to Nexus

Failed to publish publication 'dist' to repository 'maven'
   > org.apache.http.ssl.SSLInitializationException: /snap/gradle/78/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/cacerts (No such file or directory)

it seems this symlink is missing
78/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/cacert

I reverted to rev 59, so it works for now.

Thanks for your work
Volker

# snap list --all gradle
Name    Version  Rev  Tracking       Publisher     Notes
gradle  6.8      59   latest/stable  snapcrafters  classic
gradle  6.8.3    78   latest/stable  snapcrafters  disabled,classic

# snap version
snap    2.49.1
snapd   2.49.1
series  16
ubuntu  20.04
kernel  5.8.0-48-generic

[Bug]: Can't pass `JAVA_HOME` to the snap to use a different Java version

What happened?

JAVA_HOME="/usr/lib/jvm/java-18-openjdk-amd64" gradle wrapper
* What went wrong:
An exception occurred applying plugin request [id: 'fabric-loom', version: '0.11-SNAPSHOT']
> Failed to apply plugin 'fabric-loom'.
   > You are using an outdated version of Java (16). Java 17 or higher is required.
     The JAVA_HOME environment variable is currently set to (/snap/gradle/134/usr/lib/jvm/java-1.16.0-openjdk-amd64).

What should have happened?

The supplied JAVA_HOME should've been used instead of the built-in one.

Output of snap info $snap_name

name:      gradle
summary:   An open-source build automation tool
publisher: Snapcrafters
store-url: https://snapcraft.io/gradle
contact:   https://github.com/snapcrafters/gradle/issues
license:   Apache-2.0
description: |
  Gradle is a build tool with a focus on build automation and support for multi-language
  development. If you are building, testing, publishing, and deploying software on any platform,
  Gradle offers a flexible model that can support the entire development lifecycle from compiling
  and packaging code to publishing web sites. Gradle has been designed to support build automation
  across multiple languages and platforms including Java, Scala, Android, C/C++, and Groovy, and is
  closely integrated with development tools and continuous integration servers including Eclipse,
  IntelliJ, and Jenkins.
commands:
  - gradle
snap-id:      ODK1djMochvIgz8T5VxewEgw73OwALts
tracking:     latest/stable
refresh-date: 2021-10-18
channels:
  latest/stable:    7.2   2021-09-29 (134) 461MB classic
  latest/candidate: ↑                            
  latest/beta:      ↑                            
  latest/edge:      7.3.2 2021-12-20 (144) 463MB classic
  6.8.x/stable:     6.8.3 2021-05-26  (87) 203MB classic
  6.8.x/candidate:  ↑                            
  6.8.x/beta:       ↑                            
  6.8.x/edge:       ↑                            
installed:          7.2              (134) 461MB classic

Output of snap connections $snap_name

Β­

Output of snap version

snap    2.54.3+21.10.1ubuntu0.2
snapd   2.54.3+21.10.1ubuntu0.2
series  16
pop     21.10
kernel  5.15.23-76051523-generic

Relevant log output

No response

Teminal output of app

FAILURE: Build failed with an exception.

* Where:
Build file '/home/nato/Code/github.com/Traben-0/EmissiveMod/build.gradle' line: 2

* What went wrong:
An exception occurred applying plugin request [id: 'fabric-loom', version: '0.11-SNAPSHOT']
> Failed to apply plugin 'fabric-loom'.
   > You are using an outdated version of Java (16). Java 17 or higher is required.
     The JAVA_HOME environment variable is currently set to (/snap/gradle/134/usr/lib/jvm/java-1.16.0-openjdk-amd64).

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 620ms

Builds fail after JDK 16 upgrade

After @diddledan updated the snap with JDK 16, the builds for the following archs started to fail:

  • amd64
  • arm64
  • armhf

It looks like it cannot find /build/gradle/parts/java/install/usr/lib/jvm/default-java/lib/security/cacerts file that we try to delete on line 40.

/snap/gradle/125/usr/lib/jvm/java-16-openjdk-amd64/lib/security/cacerts (Permission denied)

After adding a new dependency, gradle build fails with:

* What went wrong:
Execution failed for task ':compileKotlin'.
> Error while evaluating property 'filteredArgumentsMap' of task ':compileKotlin'
   > Could not resolve all files for configuration ':compileClasspath'.
      > Could not resolve org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.1.0.
        Required by:
            project :
         > Could not resolve org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.1.0.
            > Could not get resource 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlinx/kotlinx-metadata-jvm/0.1.0/kotlinx-metadata-jvm-0.1.0.pom'.
               > org.apache.http.ssl.SSLInitializationException: /snap/gradle/125/usr/lib/jvm/java-16-openjdk-amd64/lib/security/cacerts (Permission denied)

This appears to be because the cacerts file is only readable by root:

ls -l /snap/gradle/125/usr/lib/jvm/java-16-openjdk-amd64/lib/security/cacerts
-rw------- 1 root root 384 Sep 23 21:44 /snap/gradle/125/usr/lib/jvm/java-16-openjdk-amd64/lib/security/cacerts

Running

gradle build -Dorg.gradle.java.home=/usr/lib/jvm/java-1.16.0-openjdk-amd64

worked around the problem.

[Bug]: java.security.NoSuchAlgorithmException: Error constructing implementation

What happened?

It seems it somehow related to #6 . But reproduced on Ubuntu 22.04 with gradle snaps on stable (7.2) and on edge (7.4)

Steps to reproduce:

$ rm -rf ~/.gradle/caches
$ git clone https://github.com/jenkins-docs/simple-java-maven-app.git
$ cd simple-java-maven-app
$ gradle init --no-daemon

Then choose default options for all questions gradle asks. Gradle will attempt to download deps from repository.
But failed to do so due to broken cacerts. Full log provided further.

What should have happened?

Here is workaround: specify trust store path explicitly:

$ gradle -Djavax.net.ssl.trustStore=/snap/gradle/current/etc/ssl/certs/java/cacerts init --no-daemon

It's expected app to behave the same as workaround applied.

Output of snap info $snap_name

name:      gradle
summary:   An open-source build automation tool
publisher: Snapcrafters
store-url: https://snapcraft.io/gradle
contact:   https://github.com/snapcrafters/gradle/issues
license:   Apache-2.0
description: |
  Gradle is a build tool with a focus on build automation and support for multi-language
  development. If you are building, testing, publishing, and deploying software on any platform,
  Gradle offers a flexible model that can support the entire development lifecycle from compiling
  and packaging code to publishing web sites. Gradle has been designed to support build automation
  across multiple languages and platforms including Java, Scala, Android, C/C++, and Groovy, and is
  closely integrated with development tools and continuous integration servers including Eclipse,
  IntelliJ, and Jenkins.
commands:
  - gradle
snap-id:      ODK1djMochvIgz8T5VxewEgw73OwALts
tracking:     latest/edge
refresh-date: today at 10:00 UTC
channels:
  latest/stable:    7.2   2021-09-29 (134) 461MB classic
  latest/candidate: ↑                            
  latest/beta:      ↑                            
  latest/edge:      7.4.1 2022-11-14 (154) 463MB classic
  6.8.x/stable:     6.8.3 2021-05-26  (87) 203MB classic
  6.8.x/candidate:  ↑                            
  6.8.x/beta:       ↑                            
  6.8.x/edge:       ↑                            
installed:          7.4.1            (154) 463MB classic

Output of snap connections $snap_name

<empty>

Output of snap version

snap    2.58.2
snapd   2.58.2
series  16
ubuntu  22.04
kernel  5.15.0-67-generic

Relevant log output

No response

Teminal output of app

To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.4.1/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build 

Found a Maven build. Generate a Gradle build from this? (default: yes) [yes, no] 

Select build script DSL:
  1: Groovy
  2: Kotlin
Enter selection (default: Groovy) [1..2] 

Generate build using new APIs and behavior (some features may change in the next minor release)? (default: no) [yes, no] 

> Task :init
Maven to Gradle conversion is an incubating feature.

> Task :init FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':init'.
> Could not resolve all files for configuration ':detachedConfiguration1'.
   > Could not resolve org.apache.maven:maven-core:3.6.3.
     Required by:
         project :
      > Could not resolve org.apache.maven:maven-core:3.6.3.
         > Could not get resource 'https://repo.maven.apache.org/maven2/org/apache/maven/maven-core/3.6.3/maven-core-3.6.3.pom'.
            > java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
   > Could not resolve org.apache.maven:maven-plugin-api:3.6.3.
     Required by:
         project :
      > Could not resolve org.apache.maven:maven-plugin-api:3.6.3.
         > Could not get resource 'https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-api/3.6.3/maven-plugin-api-3.6.3.pom'.
            > java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
   > Could not resolve org.apache.maven:maven-compat:3.6.3.
     Required by:
         project :
      > Could not resolve org.apache.maven:maven-compat:3.6.3.
         > Could not get resource 'https://repo.maven.apache.org/maven2/org/apache/maven/maven-compat/3.6.3/maven-compat-3.6.3.pom'.
            > java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
   > Could not resolve org.apache.maven.wagon:wagon-http:3.4.2.
     Required by:
         project :
      > Could not resolve org.apache.maven.wagon:wagon-http:3.4.2.
         > Could not get resource 'https://repo.maven.apache.org/maven2/org/apache/maven/wagon/wagon-http/3.4.2/wagon-http-3.4.2.pom'.
            > java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
   > Could not resolve org.apache.maven.wagon:wagon-provider-api:3.4.2.
     Required by:
         project :
      > Could not resolve org.apache.maven.wagon:wagon-provider-api:3.4.2.
         > Could not get resource 'https://repo.maven.apache.org/maven2/org/apache/maven/wagon/wagon-provider-api/3.4.2/wagon-provider-api-3.4.2.pom'.
            > java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
   > Could not resolve org.eclipse.aether:aether-connector-basic:1.1.0.
     Required by:
         project :
      > Could not resolve org.eclipse.aether:aether-connector-basic:1.1.0.
         > Could not get resource 'https://repo.maven.apache.org/maven2/org/eclipse/aether/aether-connector-basic/1.1.0/aether-connector-basic-1.1.0.pom'.
            > java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
   > Could not resolve org.eclipse.aether:aether-transport-wagon:1.1.0.
     Required by:
         project :
      > Could not resolve org.eclipse.aether:aether-transport-wagon:1.1.0.
         > Could not get resource 'https://repo.maven.apache.org/maven2/org/eclipse/aether/aether-transport-wagon/1.1.0/aether-transport-wagon-1.1.0.pom'.
            > java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 7s
2 actionable tasks: 1 executed, 1 up-to-date

Snap does not update PATH variable which results in unusable snap

I installed gradle via snap, then installed Java 16 needed to build a project and removed Java 11. The problem is snap still points to nonexisting Java 11.

You are using an outdated version of Java (11). Java 16 or higher is required.
The JAVA_HOME environment variable is currently set to (/snap/gradle/101/usr/lib/jvm/default-java).

Tried removing and installing this snap again, sudo systemctl restart snapd snapd.socket and sudo systemctl daemon-reload with no luck.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.