|
|
@ -91,12 +91,29 @@ internal fun Project.configurePackagingTasks(apps: Collection<Application>) { |
|
|
|
destinationDir.set(project.layout.buildDirectory.dir("compose/tmp/${app.name}/runtime")) |
|
|
|
destinationDir.set(project.layout.buildDirectory.dir("compose/tmp/${app.name}/runtime")) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
val createDistributable = tasks.composeTask<AbstractJPackageTask>( |
|
|
|
|
|
|
|
taskName("createDistributable", app), |
|
|
|
|
|
|
|
args = listOf(TargetFormat.AppImage) |
|
|
|
|
|
|
|
) { |
|
|
|
|
|
|
|
configurePackagingTask(app, createRuntimeImage = createRuntimeImage) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
val packageFormats = app.nativeDistributions.targetFormats.map { targetFormat -> |
|
|
|
val packageFormats = app.nativeDistributions.targetFormats.map { targetFormat -> |
|
|
|
val packageFormat = tasks.composeTask<AbstractJPackageTask>( |
|
|
|
val packageFormat = tasks.composeTask<AbstractJPackageTask>( |
|
|
|
taskName("package", app, targetFormat.name), |
|
|
|
taskName("package", app, targetFormat.name), |
|
|
|
args = listOf(targetFormat) |
|
|
|
args = listOf(targetFormat) |
|
|
|
) { |
|
|
|
) { |
|
|
|
|
|
|
|
// On Mac we want to patch bundled Info.plist file, |
|
|
|
|
|
|
|
// so we create an app image, change its Info.plist, |
|
|
|
|
|
|
|
// then create an installer based on the app image. |
|
|
|
|
|
|
|
// We could create an installer the same way on other platforms, but |
|
|
|
|
|
|
|
// in some cases there are failures with JDK 15. |
|
|
|
|
|
|
|
// See [AbstractJPackageTask.patchInfoPlistIfNeeded] |
|
|
|
|
|
|
|
if (currentOS != OS.MacOS) { |
|
|
|
configurePackagingTask(app, createRuntimeImage = createRuntimeImage) |
|
|
|
configurePackagingTask(app, createRuntimeImage = createRuntimeImage) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
configurePackagingTask(app, createAppImage = createDistributable) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (targetFormat.isCompatibleWith(OS.MacOS)) { |
|
|
|
if (targetFormat.isCompatibleWith(OS.MacOS)) { |
|
|
@ -130,13 +147,6 @@ internal fun Project.configurePackagingTasks(apps: Collection<Application>) { |
|
|
|
configurePackageUberJarForCurrentOS(app) |
|
|
|
configurePackageUberJarForCurrentOS(app) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
val createDistributable = tasks.composeTask<AbstractJPackageTask>( |
|
|
|
|
|
|
|
taskName("createDistributable", app), |
|
|
|
|
|
|
|
args = listOf(TargetFormat.AppImage) |
|
|
|
|
|
|
|
) { |
|
|
|
|
|
|
|
configurePackagingTask(app, createRuntimeImage = createRuntimeImage) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
val runDistributable = project.tasks.composeTask<AbstractRunDistributableTask>( |
|
|
|
val runDistributable = project.tasks.composeTask<AbstractRunDistributableTask>( |
|
|
|
taskName("runDistributable", app), |
|
|
|
taskName("runDistributable", app), |
|
|
|
args = listOf(createDistributable) |
|
|
|
args = listOf(createDistributable) |
|
|
|