```project(":child:grandchild") { plugins { id(...
# gradle
c
Copy code
project(":child:grandchild") {
	plugins {
		id("war")
		id("org.springframework.boot")
	}
	dependencies {
		providedRuntime("org.springframework.boot:spring-boot-starter-tomcat")
		//...
	}
	//...
}
gives me unresolved reference:
providedRuntime
Any ideas?
💁 1
e
🤔 looks like a bug The
plugins {}
block is only supported for the current project, not when doing config injection with
[all|sub]projects {}
or
project(":path") {}
The bug here is that you couldn’t notice, it should have failed telling you this is not possible.
To apply plugins to subprojects, use
project(":path") { apply { plugin("some-id") } }
Could you report an issue to
gradle/kotlin-dsl
about not failing when the
plugins {}
block is used in a project configuration block?
c
Yup, I confirm that with
apply{ plugin("") }
and
"providedRuntime"()
it works
@eskatos https://github.com/gradle/kotlin-dsl/issues/625 Sorry for the cumbersome name, I do quite often fail in that regard 🙂
By the way is there a trick to make kotlin generate
providedRuntime
accessor here? So that I can omit the quotes?
e
That’s totally fine! Thanks a lot
Nope, no way yet, but we are considering how to achieve this
c
Ok, not a huge problem, just a nice-to-have 🙂 Thank you!