Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vitalyzhakov opened this issue Sep 27, 2021 · 5 comments

Comments

@vitalyzhakov
Copy link

vitalyzhakov commented Sep 27, 2021

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

@tunix
Copy link
Contributor

tunix commented Sep 27, 2021

gradle usually prefers local wrapper instead of the system installation. I'll try to replicate this issue when I have time.

@vitalyzhakov
Copy link
Author

vitalyzhakov commented Sep 28, 2021

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

@igfoo
Copy link

igfoo commented Apr 4, 2022

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
$ 

@jskillin-idt
Copy link

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.

@Gelassen
Copy link

Gelassen commented Oct 18, 2022

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants