Slackbot
03/31/2022, 6:17 PMS S
03/31/2022, 6:39 PMval depAction = Action<Any> {
println("helloworld")
}
for (subproject in project.subprojects()) {
subproject.getPlugins().withId("com.hyperscience.gradle.docker.DockerImage", depAction)
}
and the error i'm seeing looks like this:
None of the following functions can be called with the arguments supplied:
public abstract fun subprojects(p0: Closure<(raw) Any!>): Unit defined in org.gradle.api.Project
public abstract fun subprojects(p0: Action<in Project!>): Unit defined in org.gradle.api.Project
melix
03/31/2022, 7:00 PMwithId("...") { println("hello") }
S S
03/31/2022, 7:00 PMfor (p in project.subprojects) {
...
}
but subprojects
is unexpectedly empty for all my projectsS S
03/31/2022, 7:01 PMdependencies {
dockerBuild(project(path=compiled_packages, configuration="dockerBuild"))
}
S S
03/31/2022, 7:09 PMS S
03/31/2022, 7:11 PMS S
03/31/2022, 7:13 PMS S
03/31/2022, 7:14 PMVampire
03/31/2022, 8:46 PMgetPlugins()
and learn that you instead should use getPluginManager()
😉
Also, is com.hyperscience.gradle.docker.DockerImage
really a plugin id, that you use in plugins { ... }
block? Looks more like a FQCN of a task.S S
04/08/2022, 5:09 PM