Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't perform configuration of McJsPlugin in a type-safe manner #298

Open
yevhenii-nadtochii opened this issue Nov 22, 2021 · 0 comments
Open
Labels
bug Something isn't working

Comments

@yevhenii-nadtochii
Copy link
Contributor

yevhenii-nadtochii commented Nov 22, 2021

JsPlugins.mcJs() extension configures the corresponding plugin with the help of GroovyInterop — withGroovyBuilder.
In order to get that code type-safe, the plugin's artifact should be put on the buildSrc classpath:

repositories {
    maven {
        url = uri("https://europe-maven.pkg.dev/spine-event-engine/snapshots")
    }
}
dependencies {
    implementation("io.spine.tools:spine-mc-js:$spineBaseVersion")
}

Now, doing that leads to a crash of KotlinCompiler with the next exception:

ScriptCompilationException(errors=[ScriptCompilationError(message=Unresolved reference: internal, location=/Users/yevhenii.nadtochii/.gradle/.tmp/gradle-kotlin-dsl-4356180595041605792.tmp/build.gradle.kts (91:36)), ScriptCompilationError(message=Unresolved reference: internal, location=/Users/yevhenii.nadtochii/.gradle/.tmp/gradle-kotlin-dsl-4356180595041605792.tmp/build.gradle.kts (96:14)), ScriptCompilationError(message=Function invocation 'id(...)' expected, location=/Users/yevhenii.nadtochii/.gradle/.tmp/gradle-kotlin-dsl-4356180595041605792.tmp/build.gradle.kts (97:12)), ScriptCompilationError(message=No value passed for parameter 'p0', location=/Users/yevhenii.nadtochii/.gradle/.tmp/gradle-kotlin-dsl-4356180595041605792.tmp/build.gradle.kts (97:12)), ScriptCompilationError(message=Type mismatch: inferred type is PluginDependencySpec! but String! was expected, location=/Users/yevhenii.nadtochii/.gradle/.tmp/gradle-kotlin-dsl-4356180595041605792.tmp/build.gradle.kts (97:12)), ScriptCompilationError(message=Unresolved reference: internal, location=/Users/yevhenii.nadtochii/.gradle/.tmp/gradle-kotlin-dsl-4356180595041605792.tmp/build.gradle.kts (100:14)), ScriptCompilationError(message=Function invocation 'id(...)' expected, location=/Users/yevhenii.nadtochii/.gradle/.tmp/gradle-kotlin-dsl-4356180595041605792.tmp/build.gradle.kts (101:12)), ScriptCompilationError(message=No value passed for parameter 'p0', location=/Users/yevhenii.nadtochii/.gradle/.tmp/gradle-kotlin-dsl-4356180595041605792.tmp/build.gradle.kts (101:12)), ScriptCompilationError(message=Type mismatch: inferred type is PluginDependencySpec! but String! was expected, location=/Users/yevhenii.nadtochii/.gradle/.tmp/gradle-kotlin-dsl-4356180595041605792.tmp/build.gradle.kts (101:12)), ScriptCompilationError(message=None of the following functions can be called with the arguments supplied: 
public abstract fun version(p0: String?): PluginDependencySpec! defined in org.gradle.plugin.use.PluginDependencySpec
public open fun version(p0: Provider<String!>!): PluginDependencySpec! defined in org.gradle.plugin.use.PluginDependencySpec, location=/Users/yevhenii.nadtochii/.gradle/.tmp/gradle-kotlin-dsl-4356180595041605792.tmp/build.gradle.kts (101:16))])

StackTrace.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant