Gradle Configuration Failing when Applying Plugin to JVM only project
See original GitHub issueWhen applying the plugin to a kotlin jvm project configuration of the project fails with the following.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find com.android.tools.build:gradle:3.3.0.
Searched in the following locations:
- file:/Users/areitz/.gradle/caches/5.5-rc-2/embedded-kotlin-repo-1.3.31-3/repo/com/android/tools/build/gradle/3.3.0/gradle-3.3.0.jar
- https://plugins.gradle.org/m2/com/android/tools/build/gradle/3.3.0/gradle-3.3.0.pom
- https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/3.3.0/gradle-3.3.0.pom
- https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/3.3.0/gradle-3.3.0.jar
- https://jcenter.bintray.com/com/android/tools/build/gradle/3.3.0/gradle-3.3.0.pom
- https://jcenter.bintray.com/com/android/tools/build/gradle/3.3.0/gradle-3.3.0.jar
Required by:
project : > com.squareup.sqldelight:gradle-plugin:1.1.3
I believe the issue is that the plugin depends on the android build tools to be present, even when not applicable for the project the plugin is being applied to.
Adding the google()
repository for plugin management solves the issue, but I think maybe a better solution would be to have the android build tools be an optional dependency.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:16 (8 by maintainers)
Top Results From Across the Web
Gradle Configuration Failing when Applying Plugin to JVM only ...
When applying the plugin to a kotlin jvm project configuration of the project fails with the following. > Could not resolve all artifacts...
Read more >Failed to apply plugin [id 'com.android.application']
Workaround: · Close android studio · right click and rename the project name without using paste, instead type it. · When you open...
Read more >Opening build.gradle as a project fails with "Gradle JVM ...
I'm using IntelliJ IDEA 2018.2.7 (Community Edition)Build #IC-182.5107.41, built on November 26, 2018JRE: 1.8.0_152-release-1248-b22...
Read more >The Application Plugin - Gradle User Manual
The Application plugin facilitates creating an executable JVM application. It makes it easy to start the application locally during development, ...
Read more >Troubleshooting builds - Gradle User Manual
If your Gradle build fails before running any tasks, you may be encountering problems with your network configuration. When Gradle is unable to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am officially licking this cookie. Progress has been made and I just need to get all the tests updated.
I have sent a PR to make the AGP dependency optional, but in the time since we started using
SparseArray
from androidx.collection which requires thegoogle()
repository. That can be fixed separately. Feel free to send a PR since I’m burned out on the compileOnly change for a few days.