Browse Source

Fix compile error

For some reason, the compiler failed to resolve the method reference correctly.
Also minor fix for `executable` property (the code was red in IDE, but compiled).
pull/78/head
Alexey Tsvetkov 4 years ago
parent
commit
455814b9d3
  1. 4
      gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/desktop/application/internal/configureApplication.kt

4
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/desktop/application/internal/configureApplication.kt

@ -150,13 +150,13 @@ internal fun AbstractJPackageTask.configurePlatformSettings(app: Application) {
private fun Project.configureRunTask(app: Application) { private fun Project.configureRunTask(app: Application) {
project.tasks.composeTask<JavaExec>(taskName("run", app)) { project.tasks.composeTask<JavaExec>(taskName("run", app)) {
mainClass.set(provider { app.mainClass }) mainClass.set(provider { app.mainClass })
executable = javaExecutable(app.javaHomeOrDefault()) executable(javaExecutable(app.javaHomeOrDefault()))
jvmArgs = app.jvmArgs jvmArgs = app.jvmArgs
args = app.args args = app.args
val cp = objects.fileCollection() val cp = objects.fileCollection()
// adding a null value will cause future invocations of `from` to throw an NPE // adding a null value will cause future invocations of `from` to throw an NPE
app.mainJar.orNull?.let(cp::from) app.mainJar.orNull?.let { cp.from(it) }
cp.from(app._fromFiles) cp.from(app._fromFiles)
dependsOn(*app._dependenciesTaskNames.toTypedArray()) dependsOn(*app._dependenciesTaskNames.toTypedArray())

Loading…
Cancel
Save