Open vitalyzhakov opened 3 years ago
gradle usually prefers local wrapper instead of the system installation. I'll try to replicate this issue when I have time.
gradle usually prefers local wrapper instead of the system installation
Hm.. works fine
bash gradlew run
Downloading https://services.gradle.org/distributions/gradle-6.6.1-bin.zip
.........10%..........20%..........30%..........40%.........50%..........60%..........70%..........80%..........90%.........100%
Welcome to Gradle 6.6.1!
Here are the highlights of this release:
- Experimental build configuration caching
- Built-in conventions for handling credentials
- Java compilation supports --release flag
For more details see https://docs.gradle.org/6.6.1/release-notes.html
Starting a Gradle Daemon (subsequent builds will be faster)
> Configure project :
Project : => no module-info.java found
> Task :run
сент. 28, 2021 1:17:41 PM tornadofx.Stylesheet$Companion detectAndInstallUrlHandler
INFO: Installing CSS url handler, since it was not picked up automatically
BUILD SUCCESSFUL in 1m 37s
3 actionable tasks: 3 executed
I am also having problems due to this. Here is a simple example that fails with a gradle 7.2 snap, but works with the binary 7.2 release.
$ ls
build.gradle settings.gradle
$ cat build.gradle
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.6.10'
}
repositories {
mavenCentral()
}
$ cat settings.gradle
rootProject.name = 'testProject'
$ snap list gradle
Name Version Rev Tracking Publisher Notes
gradle 7.2 134 latest/stable snapcrafters classic
$ mkdir gradle_home
$ /snap/bin/gradle -g gradle_home build --no-daemon
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
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.2/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build
FAILURE: Build failed with an exception.
* Where:
Build file '/home/ian/tmp/gradle/build.gradle' line: 2
* What went wrong:
Plugin [id: 'org.jetbrains.kotlin.jvm', version: '1.6.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.6.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
BUILD FAILED in 3s
$ rm -rf gradle_home
$ mkdir gradle_home
$ ~/local/gradle/gradle-7.2/bin/gradle -g gradle_home build --no-daemon
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
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.2/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build
BUILD SUCCESSFUL in 49s
2 actionable tasks: 2 executed
$
gradle usually prefers local wrapper instead of the system installation
Hm.. works fine
This only reproduces when you use the snap version of Gradle. The command output you gave appears to be the "gradlew" version which will not use the snap version. You should see "javaHome=/snap/gradle/.../usr/lib/jvm/java-16-openjdk-amd64" about 50~ lines into the the --debug output.
Have the same issue in Android project. Android Studio project by default uses a gradle wrapper, no system installed one (no snap installation of gradle)
Hello!
Fresh installation ubuntu 20.04
Installation gradle 7.2 from snap causes error:
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