You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 19, 2020. It is now read-only.
The dependencies of a script plugin are currently completely hidden from the projects that apply them. That’s because “apply from:” statements are discovered only after the classpath of a project’s buildscript is already set up.
A very common pattern is applying a community plugin, pre-configuring it, but still giving projects the choice to further configure the community plugin. This “kind of works” with Groovy, because of its dynamic nature. As long as you don’t try to reference the types of the community plugin, you can still configure its extensions and tasks. However, this is not an option for statically typed Kotlin.
The following should work:
// bar.gradle.kts
plugins {
id("foo.plugin.id") version "2.0"
}
// build.gradle.kts
plugins {
script("bar.gradle.kts")
}
fooExtension { // contributed by "foo.plugin.id", a dependency of bar.gradle.kts//some more specific, statically typed configuration
}
The text was updated successfully, but these errors were encountered:
bamboo
changed the title
Script plugins can expose API to build scripts, just like binary plugins can
Script plugins can use the plugins DSL to define their dependencies on arbitrary plugins
Jul 20, 2017
Why this was dropped? Of course, precompiled script plugins solve problems, but require unnecessary buildSrc dir with settings.gradle and build.gradle and src/main/kotlin dir
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The dependencies of a script plugin are currently completely hidden from the projects that apply them. That’s because “apply from:” statements are discovered only after the classpath of a project’s buildscript is already set up.
A very common pattern is applying a community plugin, pre-configuring it, but still giving projects the choice to further configure the community plugin. This “kind of works” with Groovy, because of its dynamic nature. As long as you don’t try to reference the types of the community plugin, you can still configure its extensions and tasks. However, this is not an option for statically typed Kotlin.
The following should work:
The text was updated successfully, but these errors were encountered: