Closed xgouchet closed 1 year ago
I'd like to work on this one.
In Dependencies.kt there are a couple of unused dependencies. Should I do some cleanup and skip these in the version catalog transition?
Hi @fejd , thanks a lot for your help. Yes there are a bunch of legacy dependencies there, so feel free to cleanup all the unused ones.
Almost done, however I ran into this issue https://github.com/gradle/gradle/issues/20084 when I tried to put the com.android.application
plugin inside a plugins { }
block. That clashes with the buildSrc dependency implementation 'com.android.tools.build:gradle:7.3.0'
which gives the error:
What went wrong: Error resolving plugin [id: 'com.android.application', version: '7.3.0', apply: false] The request for this plugin could not be satisfied because the plugin is already on the classpath with an unknown version, so compatibility cannot be checked.
If I comment that out, and the usage in OSSPlugin.kt
, it builds. Not a solution though. 😃
I'm thinking of just moving the other dependencies to the version catalog, and keeping apply plugin: 'com.android.application'
for now since it requires additional changes.
What do you think @xgouchet ?
I'm thinking of just moving the other dependencies to the version catalog, and keeping apply plugin: 'com.android.application' for now since it requires additional changes.
Sure that makes sense indeed.
But before have you tried the workardound given in the linked issue:
plugins {
id(libs.plugins.android.application.get().pluginId) apply false
id(libs.plugins.android.library.get().pluginId) apply false
id(libs.plugins.kotlin.android.get().pluginId) apply false
}
I'm thinking of just moving the other dependencies to the version catalog, and keeping apply plugin: 'com.android.application' for now since it requires additional changes.
Sure that makes sense indeed.
But before have you tried the workardound given in the linked issue:
plugins { id(libs.plugins.android.application.get().pluginId) apply false id(libs.plugins.android.library.get().pluginId) apply false id(libs.plugins.kotlin.android.get().pluginId) apply false }
Yes, unfortunately the Groovy version of that makes no difference:
plugins { alias libs.plugins.android.application apply false }
Gradle now provides a built-in mecanism to setup the dependency.
Dependencies
objectgradle/libs.version.toml
file and setup Gradle's Version Catalog for the project