mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
BuildScriptUtil.runBuildScriptJarFile(): do not invoke static getter that expects parameters
fixes "ERROR wrong number of arguments" if adding property with getter to Build.kt. E.g. ```kobalt val Project.libs: String get() = "$directory/$buildDirectory/libs" ```
This commit is contained in:
parent
5de48f30d9
commit
895027a7d6
1 changed files with 1 additions and 1 deletions
|
@ -79,7 +79,7 @@ class BuildScriptUtil @Inject constructor(val plugins: Plugins, val files: KFile
|
|||
}.forEach { cls ->
|
||||
cls.methods.forEach { method ->
|
||||
// Invoke vals and see if they return a Project
|
||||
if (method.name.startsWith("get") && Modifier.isStatic(method.modifiers)) {
|
||||
if (method.name.startsWith("get") && Modifier.isStatic(method.modifiers) && method.parameterCount == 0) {
|
||||
try {
|
||||
val r = method.invoke(null)
|
||||
if (r is Project) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue