but can’t get that work.. always get the following compile error - even though it get’s recognized and resolved in the editor in IntelliJ
Copy code
Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public val PluginDependenciesSpec.base: PluginDependencySpec defined in org.gradle.kotlin.dsl
c
Czar
12/19/2017, 9:55 AM
For me it works, can you show your build file and state the gradle version you use?
l
lukas
12/19/2017, 10:02 AM
Gradle 4.4
The following build-script
Copy code
plugins {
base
}
base {}
results in this exception (in addition to the one I posted above)
Copy code
Expression 'base' cannot be invoked as a function. The function 'invoke()' is not found
lukas
12/19/2017, 10:02 AM
It’s part of a multi-project build, and in an included / applied script - if that makes a difference?
e
eskatos
12/19/2017, 10:13 AM
The issue here must be that it is an applied script.
The
plugins {}
block is supported in project scripts only.
It means you can’t use the static accessors in this case and must rely on explicit configuration by type: