|
|
@ -73,7 +73,7 @@ internal fun Project.configurePackagingTasks(apps: Collection<Application>) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
internal fun Project.configurePackagingTasks(app: Application): TaskProvider<DefaultTask> { |
|
|
|
internal fun Project.configurePackagingTasks(app: Application): TaskProvider<DefaultTask> { |
|
|
|
val packageFormats = app.nativeExecutables.targetFormats.map { targetFormat -> |
|
|
|
val packageFormats = app.nativeDistributions.targetFormats.map { targetFormat -> |
|
|
|
tasks.composeTask<AbstractJPackageTask>( |
|
|
|
tasks.composeTask<AbstractJPackageTask>( |
|
|
|
taskName("package", app, targetFormat.name), |
|
|
|
taskName("package", app, targetFormat.name), |
|
|
|
args = listOf(targetFormat) |
|
|
|
args = listOf(targetFormat) |
|
|
@ -91,7 +91,7 @@ internal fun AbstractJPackageTask.configurePackagingTask(app: Application) { |
|
|
|
|
|
|
|
|
|
|
|
val targetPlatformSettings = when (targetOS) { |
|
|
|
val targetPlatformSettings = when (targetOS) { |
|
|
|
OS.Linux -> { |
|
|
|
OS.Linux -> { |
|
|
|
app.nativeExecutables.linux.also { linux -> |
|
|
|
app.nativeDistributions.linux.also { linux -> |
|
|
|
linuxShortcut.set(provider { linux.shortcut }) |
|
|
|
linuxShortcut.set(provider { linux.shortcut }) |
|
|
|
linuxAppCategory.set(provider { linux.appCategory }) |
|
|
|
linuxAppCategory.set(provider { linux.appCategory }) |
|
|
|
linuxAppRelease.set(provider { linux.appRelease }) |
|
|
|
linuxAppRelease.set(provider { linux.appRelease }) |
|
|
@ -103,7 +103,7 @@ internal fun AbstractJPackageTask.configurePackagingTask(app: Application) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
OS.Windows -> { |
|
|
|
OS.Windows -> { |
|
|
|
app.nativeExecutables.windows.also { win -> |
|
|
|
app.nativeDistributions.windows.also { win -> |
|
|
|
winConsole.set(provider { win.console }) |
|
|
|
winConsole.set(provider { win.console }) |
|
|
|
winDirChooser.set(provider { win.dirChooser }) |
|
|
|
winDirChooser.set(provider { win.dirChooser }) |
|
|
|
winPerUserInstall.set(provider { win.perUserInstall }) |
|
|
|
winPerUserInstall.set(provider { win.perUserInstall }) |
|
|
@ -115,7 +115,7 @@ internal fun AbstractJPackageTask.configurePackagingTask(app: Application) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
OS.MacOS -> { |
|
|
|
OS.MacOS -> { |
|
|
|
app.nativeExecutables.macOS.also { mac -> |
|
|
|
app.nativeDistributions.macOS.also { mac -> |
|
|
|
macPackageName.set(provider { mac.packageName }) |
|
|
|
macPackageName.set(provider { mac.packageName }) |
|
|
|
macPackageIdentifier.set(provider { mac.packageIdentifier }) |
|
|
|
macPackageIdentifier.set(provider { mac.packageIdentifier }) |
|
|
|
macSign.set(provider { mac.signing.sign }) |
|
|
|
macSign.set(provider { mac.signing.sign }) |
|
|
@ -127,7 +127,7 @@ internal fun AbstractJPackageTask.configurePackagingTask(app: Application) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
app.nativeExecutables.let { executables -> |
|
|
|
app.nativeDistributions.let { executables -> |
|
|
|
packageName.set(provider { executables.packageName ?: project.name }) |
|
|
|
packageName.set(provider { executables.packageName ?: project.name }) |
|
|
|
packageDescription.set(provider { executables.description }) |
|
|
|
packageDescription.set(provider { executables.description }) |
|
|
|
packageCopyright.set(provider { executables.copyright }) |
|
|
|
packageCopyright.set(provider { executables.copyright }) |
|
|
@ -138,7 +138,7 @@ internal fun AbstractJPackageTask.configurePackagingTask(app: Application) { |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
destinationDir.set(app.nativeExecutables.outputBaseDir.map { it.dir("${app.name}/${targetFormat.id}") }) |
|
|
|
destinationDir.set(app.nativeDistributions.outputBaseDir.map { it.dir("${app.name}/${targetFormat.id}") }) |
|
|
|
javaHome.set(provider { app.javaHomeOrDefault() }) |
|
|
|
javaHome.set(provider { app.javaHomeOrDefault() }) |
|
|
|
|
|
|
|
|
|
|
|
launcherMainJar.set(app.mainJar.orNull) |
|
|
|
launcherMainJar.set(app.mainJar.orNull) |
|
|
@ -159,7 +159,7 @@ internal fun AbstractJPackageTask.configurePackagingTask(app: Application) { |
|
|
|
files.from(project.configurations.named(target.runtimeElementsConfigurationName)) |
|
|
|
files.from(project.configurations.named(target.runtimeElementsConfigurationName)) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
modules.set(provider { app.nativeExecutables.modules }) |
|
|
|
modules.set(provider { app.nativeDistributions.modules }) |
|
|
|
launcherMainClass.set(provider { app.mainClass }) |
|
|
|
launcherMainClass.set(provider { app.mainClass }) |
|
|
|
launcherJvmArgs.set(provider { app.jvmArgs }) |
|
|
|
launcherJvmArgs.set(provider { app.jvmArgs }) |
|
|
|
launcherArgs.set(provider { app.args }) |
|
|
|
launcherArgs.set(provider { app.args }) |
|
|
|