Applying plugin to Gradle KTS project fails
See original GitHub issueI am creating a project using Gradle 6.5 and the Kotlin DSL. When I add the appengine plugin to my :api-server
module I get this error:
An exception occurred applying plugin request [id: 'com.google.cloud.tools.appengine', version: '2.2.0', artifact: 'com.google.cloud.tools:appengine-gradle-plugin:2.2.0']
> Failed to apply plugin [class 'com.google.cloud.tools.gradle.appengine.standard.AppEngineStandardPlugin']
> Task with name 'assemble' not found in project ':api-server'.
It looks like the plugin is trying to access the assemble
task before it’s created. My plugins block looks like this:
plugins {
kotlin("jvm")
kotlin("plugin.serialization") version "1.3.72"
id("com.google.cloud.tools.appengine") version "2.2.0"
application
war
}
Changing the plugins order doesn’t change the result.
PS: I am using a resolutionStrategy
in my settings.gradle.kts
to be able to reference the plugin — not that it has anything to do with the issue at hand:
pluginManagement {
resolutionStrategy {
eachPlugin {
if (requested.id.id == "com.google.cloud.tools.appengine") {
useModule("com.google.cloud.tools:appengine-gradle-plugin:${requested.version}")
}
}
}
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Failure when applying custom external gradle plugin to multi ...
In my main project, I've configured settings.gradle.kts to resolve plugins from mavenLocal and apply one of the plugins (let's say plugin1) ...
Read more >How to diagnose unexpected build failures caused by plugin ...
Hi, we're using a couple of plugins in a Gradle multi project build. ... Failed to apply plugin class 'org.jfrog.gradle.plugin.artifactory.
Read more >Using Gradle Plugins
By applying plugins, rather than adding logic to the project build script, we can reap a number of benefits. Applying plugins:.
Read more >Gradle Kotlin script: apply(from=) failed (not the same context)
Hi We are currently updating our Groovy build script to Kotlin (.gradle.kts). We have the following structure, to avoid duplicating some ...
Read more >Gradle Kotlin DSL Primer
Script plugins, via apply(from = "script-plugin.gradle.kts"). Plugins applied via cross-project configuration. You also can not use type-safe accessors in ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For anyone else having issues with the plugin with the Kotlin DSL, and stumbling on this issue, here’s the current workaround:
Agree, there’s some work to be done here to bring things up to date.