Slackbot
02/06/2024, 3:20 PMNiels Doucet
02/06/2024, 3:28 PMJúlio Cesar Bueno
02/06/2024, 3:29 PMincludeBuild
commented there... but composite build does not support settings pluginsephemient
02/06/2024, 3:30 PMephemient
02/06/2024, 3:31 PMJúlio Cesar Bueno
02/06/2024, 3:41 PM`maven-publish`
and running the command
./gradlew publishPluginMavenPublicationToMavenLocal
which I understand to publish the artefacts in my local maven repository...Júlio Cesar Bueno
02/06/2024, 3:44 PMincludedBuild
and apply the settings plugin
plugins {
id("com.veepee.settings")
}
, I get this error
Build file '/Users/julio.buenocotta/git/gradle-plugins/plugins-sample/build.gradle.kts' line: 1
Error resolving plugin [id: 'com.veepee.kotlin.android.application', version: '0.2.3', 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.
even if I force a given plugin version in the settings.gradle.kts file
plugins {
id("com.veepee.settings") version "0.2.3"
}
Júlio Cesar Bueno
02/06/2024, 3:44 PMNiels Doucet
02/06/2024, 3:48 PMJúlio Cesar Bueno
02/06/2024, 3:49 PMNiels Doucet
02/06/2024, 3:49 PMJúlio Cesar Bueno
02/06/2024, 3:50 PMJúlio Cesar Bueno
02/06/2024, 3:51 PMunknown version
Niels Doucet
02/06/2024, 3:51 PMandroid.application
plugin and see if that works?Niels Doucet
02/06/2024, 3:52 PMJúlio Cesar Bueno
02/06/2024, 3:56 PMalias
to my root build.gradle.kts
file as I am declaring the configured plugins like this
implementation(libs.gradlePlugin.android)
so I can bind AGP version with a version of the plugin itself.Niels Doucet
02/06/2024, 3:58 PMJúlio Cesar Bueno
02/06/2024, 3:59 PMJúlio Cesar Bueno
02/06/2024, 4:01 PMError resolving plugin [id: 'com.veepee.kotlin.android.application', version: '0.2.3', apply: false]
Júlio Cesar Bueno
02/06/2024, 4:02 PMJúlio Cesar Bueno
02/06/2024, 4:02 PMVampire
02/06/2024, 4:02 PMNiels Doucet
02/06/2024, 4:02 PMVampire
02/06/2024, 4:03 PMincludeBuild
within pluginManagement { ... }
was added, exactly for the use-case, that an included build can provide a settings pluginJúlio Cesar Bueno
02/06/2024, 4:03 PMVampire
02/06/2024, 4:03 PMapply false
so I think it is a different place it complains about, not the application through the plugins { ... }
blockVampire
02/06/2024, 4:03 PMVampire
02/06/2024, 4:04 PMVampire
02/06/2024, 4:04 PMpublishToMavenLocal
then all artifacts you need are publishedVampire
02/06/2024, 4:05 PMVampire
02/06/2024, 4:05 PMVampire
02/06/2024, 4:05 PMNiels Doucet
02/06/2024, 4:08 PMid("com.veepee.kotlin.android.application") version "0.2.3" apply false
And your convention plugin is bringing in that same plugin through the composite build.
My point was to remove the version from that plugin to try if that circumvents the problem you're seeing.
I believe I caused some confusion by not spelling out the entire name of your android.application convention plugin. I'm not an android developer, so I wasn't aware that there's an actual plugin out there with id exactly android.application
🤷Niels Doucet
02/06/2024, 4:10 PMJúlio Cesar Bueno
02/06/2024, 4:11 PMpublishToMavenLocal
, commented my includedBuild
and tried to apply my settings plugin..
The result is that I still have the error
Error resolving plugin [id: 'com.veepee.kotlin.android.application', version: '0.2.3', 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 remove
plugins {
alias(libs.plugins.veepee.kotlin.android.application) apply false
from my client project... it will go complain in the place where I apply the plugin with the same error.Niels Doucet
02/06/2024, 4:12 PMJúlio Cesar Bueno
02/06/2024, 4:13 PMplugins {
alias(libs.plugins.veepee.kotlin.android.application)
alias(libs.plugins.veepee.flavors.android.application)
alias(libs.plugins.veepee.android.test.android.application)
alias(libs.plugins.veepee.flank.android.application)
alias(libs.plugins.veepee.publishing.android.application)
// alias(libs.plugins.veepee.crashlytics.android.application)
alias(libs.plugins.veepee.compose.android.application)
alias(libs.plugins.veepee.dagger)
// id("com.google.gms.google-services")
}
Júlio Cesar Bueno
02/06/2024, 4:14 PMNiels Doucet
02/06/2024, 4:21 PMVampire
02/06/2024, 4:40 PMalias
is doing), then it only works if Gradle knows which version was brought in to the classpath, otherwise you get exactly that complaint you posted. Apply it without version and it should work.Vampire
02/06/2024, 4:41 PMVampire
02/06/2024, 4:42 PMplugins {
id(libs.plugins.veepee.kotlin.android.application.get().pluginId)
}
Júlio Cesar Bueno
02/06/2024, 4:42 PMJúlio Cesar Bueno
02/07/2024, 9:10 AMalias
to id
in my real projects...
@Vampire shared an issue about being able to use version catalog without version, but that seems like a work around the limitation of not using version catalog in settings.gradle.kts, wouldn't this issue of classpath with unknown version be solved if we could use the version catalogs in settings file?
Anyways, thank you very much to all of you.Niels Doucet
02/07/2024, 9:13 AMVampire
02/07/2024, 9:39 AMJúlio Cesar Bueno
02/07/2024, 9:42 AMid
? To me, n00b, in gradle, it seems that gradle is mixing it's infra with the infra it offers to it's users...Vampire
02/07/2024, 9:43 AMVampire
02/07/2024, 9:44 AMwhat would be the correct way to solve the issue in a way that we don't have to revert toDepends on the gory details, if there is a way at all. How does the situation happen? Do you have settings plugins and project plugins in the same artifact and try to apply the settings one to settings and the project one to project??id
Vampire
02/07/2024, 9:45 AMJúlio Cesar Bueno
02/07/2024, 9:47 AMVampire
02/07/2024, 9:49 AMJúlio Cesar Bueno
02/07/2024, 9:50 AMVampire
02/07/2024, 9:51 AM