Closed danielesegato closed 2 years ago
The issue is explained here https://github.com/square/wire/issues/1944
Apparently you forgot to publish the artifacts with the convention name and it isn't resolved.
the workaround is to add this inside the plugin management
pluginManagement {
resolutionStrategy {
eachPlugin {
if (requested.id.id == "com.google.gms.google-services") {
useModule("com.google.gms:google-services:4.3.10")
}
}
}
}
Note that in the Wire issue they suggest to pass ${requested.version}
in the useModule()
but it gets resolved to null
, failing, for me.
I had other plugins with the same issue so I used this syntax
resolutionStrategy {
eachPlugin {
when (requested.id.id) {
"com.google.gms.google-services" ->
useModule("com.google.gms:google-services:4.3.10")
"com.google.firebase.crashlytics" ->
useModule("com.google.firebase:firebase-crashlytics-gradle:2.8.0")
// etc.
}
}
}
The wire issue doesn't fully spell it out I suppose, but for the resolution to work the plugin marker artifact should be published to maven.google.com
.
~Usually the java-gradle-plugin
sets this up, but that plugin isn't used in this project, but it can probably be added to the publish.gradle
script.~
If you encounter other plugins not supporting this, ask them to publish the marker artifact too so no work arounds are needed.
The plugin descriptor is actually generated in the repo found in build/repo
but it doesn't appear to be available on maven.google.com
Also reported here: https://github.com/google/play-services-plugins/issues/50
Hello, this should be resolved now, as the extra artifact is now released to gmaven.
Following the new instructions to add google-services to my Android project I get this error:
As per instruction my settings.gradle.kts contains
while in my
app/build.gradle.kts
I've added:The instructions actually tells me to skip the declaration in the
settings.gradle.kts
and put the version directly in the app, I've tried that too, same result.However, if I add in the root
build.gradle.kts
the legacygradle can sync and it works as expected.
Isn't the new way supposed to replace the legacy one?