-
Notifications
You must be signed in to change notification settings - Fork 434
Script plugins with external dependencies defined in a buildscript block #180
Comments
This is now done for scripts applied to project and settings. Remain scripts applied from init scripts. Today you would have to use |
I'm afraid we'll need to deviate from Groovy here in order to provide good IDE support. The |
Closing as delivered for |
@bamboo or @eskatos should this change also allow applied scripts to apply plugins? (Same set up as described in #814. I didn't find any open issue with this use case, some were closed as duplicate other as superseded, might have missed it though. #425 would address it but not exactly the same and this use case is supported with Groovy DSL). I'm getting the following error:
when attempting to apply a plugin from an applied script, e.g.: apply(from = "publishing-portal.gradle.kts")
buildscript {
repositories {
maven {
url = uri("https://plugins.gradle.org/m2/")
}
}
dependencies {
classpath ("com.gradle.publish:plugin-publish-plugin:0.9.10")
}
}
apply(plugin = "com.gradle.plugin-publish") The above works fine if done directly in Versions:
|
That looks like gradle/gradle#1262 |
Thanks! It works fine using the type. (I didn't look into Gradle issue tracker because it works fine with Groovy DSL and I was expecting that to just work in Kotlin DSL.) |
Hm, it shouldn't, gradle/gradle#1262 is about the Groovy DSL. In fact I've just converted your repro scripts to the Groovy DSL and got the exact same error. |
Ouch! Messed up the conversion somewhere... Indeed, in the original Groovy script was using the type as well |
For
*.gradle.kts
files includingSettings
script plugins (*.settings.gradle.kts
).The text was updated successfully, but these errors were encountered: