Browse Source

Fix a crash when building using Gradle 6.6+

pull/75/head
Eliezer Graber 4 years ago
parent
commit
56da868a05
  1. 3
      gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/desktop/application/internal/configureApplication.kt

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

@ -155,7 +155,8 @@ private fun Project.configureRunTask(app: Application) {
args = app.args
val cp = objects.fileCollection()
cp.from(app.mainJar.orNull)
// adding a null value will cause future invocations of `from` to throw an NPE
app.mainJar.orNull?.let(cp::from)
cp.from(app._fromFiles)
dependsOn(*app._dependenciesTaskNames.toTypedArray())

Loading…
Cancel
Save