Could not resolve plugin artifact 'com.google.cloud.tools:appengine-gradle-plugin: 2.4.1
RdeWilde opened this issue · comments
Is the plugin no longer available thru the gradlePluginPortal?
I can't find it com.google.cloud.tools:appengine-gradle-plugin
listed:
https://plugins.gradle.org/m2/com/google/cloud/tools/
Check this doc to understand how to apply the plugin. It may be that the way the plugin should be applied changed at some point?
Nah, I did just that. It seems to be available on mavenCentral, but not sure why my script produces an error.
https://search.maven.org/artifact/com.google.cloud.tools/appengine-gradle-plugin/2.4.1/jar
It is a Kotlin MPP project, so maybe this does somehow change the structure.
In my settings.gradle.kts in the root I have this:
pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
maven(url = "https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
resolutionStrategy {
eachPlugin {
if (requested.id.id.startsWith("com.google.cloud.tools.appengine")) {
useModule("com.google.cloud.tools:appengine-gradle-plugin:${requested.version}")
}
}
}
}
In the root build.gradle.kts I added this:
plugins {
// ... other stuff
id("com.google.cloud.tools.appengine") version " 2.4.1" apply false
}
and this:
buildscript {
repositories {
// ... others
mavenCentral()
}
dependencies {
// ... others
classpath("com.google.cloud.tools:appengine-gradle-plugin:2.4.1")
}
}
In the subproject backend
I added this:
plugins {
// ... other stuff
id("com.google.cloud.tools.appengine")
}
The error seems to suggest, that it did search the MavenRepo/central:
org.gradle.internal.exceptions.LocationAwareException: Build file '/Users/Robert/StudioProjects/mercado/build.gradle.kts' line: 1
Plugin [id: 'com.google.cloud.tools.appengine', version: ' 2.4.1', artifact: 'com.google.cloud.tools:appengine-gradle-plugin: 2.4.1', apply: false] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'com.google.cloud.tools:appengine-gradle-plugin: 2.4.1')
Searched in the following repositories:
Gradle Central Plugin Repository
MavenRepo // Here <<<<<<
maven(https://maven.pkg.jetbrains.space/public/p/compose/dev)
Anything else I am missing? I did not add anything to allprojects
-block, nor to the buildSrc
-dir
Oh shit. There was a space before my version number, so like " 2.4.1" 😭
Sorry to bother, thanks for your help