sqldelight: Gradle Configuration Failing when Applying Plugin to JVM only project
When 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.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 16 (8 by maintainers)
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.It’s normally a negative term since it means the person also doesn’t deliver: https://devblogs.microsoft.com/oldnewthing/20091201-00/?p=15843
…and maybe I won’t, but I solved the actual problem and now it’s just boring work to update all the tests. So I probably will.
Feel free to try. Most of the work has been done, but there’s some left.
I know how to remove the dep. Will PR soon!