diff --git a/examples/imageviewer/desktop/build.gradle.kts b/examples/imageviewer/desktop/build.gradle.kts index c01fe9f2b3..6eaff4dc62 100755 --- a/examples/imageviewer/desktop/build.gradle.kts +++ b/examples/imageviewer/desktop/build.gradle.kts @@ -25,7 +25,7 @@ compose.desktop { application { mainClass = "example.imageviewer.MainKt" - nativeExecutables { + nativeDistributions { targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb) packageName = "ImageViewer" modules("jdk.crypto.ec") diff --git a/gradle-plugins/compose-desktop-application/src/main/kotlin/org/jetbrains/compose/desktop/application/ApplicationPlugin.kt b/gradle-plugins/compose-desktop-application/src/main/kotlin/org/jetbrains/compose/desktop/application/ApplicationPlugin.kt index 0c8631fa39..13000275e6 100644 --- a/gradle-plugins/compose-desktop-application/src/main/kotlin/org/jetbrains/compose/desktop/application/ApplicationPlugin.kt +++ b/gradle-plugins/compose-desktop-application/src/main/kotlin/org/jetbrains/compose/desktop/application/ApplicationPlugin.kt @@ -73,7 +73,7 @@ internal fun Project.configurePackagingTasks(apps: Collection) { } internal fun Project.configurePackagingTasks(app: Application): TaskProvider { - val packageFormats = app.nativeExecutables.targetFormats.map { targetFormat -> + val packageFormats = app.nativeDistributions.targetFormats.map { targetFormat -> tasks.composeTask( taskName("package", app, targetFormat.name), args = listOf(targetFormat) @@ -91,7 +91,7 @@ internal fun AbstractJPackageTask.configurePackagingTask(app: Application) { val targetPlatformSettings = when (targetOS) { OS.Linux -> { - app.nativeExecutables.linux.also { linux -> + app.nativeDistributions.linux.also { linux -> linuxShortcut.set(provider { linux.shortcut }) linuxAppCategory.set(provider { linux.appCategory }) linuxAppRelease.set(provider { linux.appRelease }) @@ -103,7 +103,7 @@ internal fun AbstractJPackageTask.configurePackagingTask(app: Application) { } } OS.Windows -> { - app.nativeExecutables.windows.also { win -> + app.nativeDistributions.windows.also { win -> winConsole.set(provider { win.console }) winDirChooser.set(provider { win.dirChooser }) winPerUserInstall.set(provider { win.perUserInstall }) @@ -115,7 +115,7 @@ internal fun AbstractJPackageTask.configurePackagingTask(app: Application) { } } OS.MacOS -> { - app.nativeExecutables.macOS.also { mac -> + app.nativeDistributions.macOS.also { mac -> macPackageName.set(provider { mac.packageName }) macPackageIdentifier.set(provider { mac.packageIdentifier }) 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 }) packageDescription.set(provider { executables.description }) 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() }) launcherMainJar.set(app.mainJar.orNull) @@ -159,7 +159,7 @@ internal fun AbstractJPackageTask.configurePackagingTask(app: Application) { files.from(project.configurations.named(target.runtimeElementsConfigurationName)) } } - modules.set(provider { app.nativeExecutables.modules }) + modules.set(provider { app.nativeDistributions.modules }) launcherMainClass.set(provider { app.mainClass }) launcherJvmArgs.set(provider { app.jvmArgs }) launcherArgs.set(provider { app.args }) diff --git a/gradle-plugins/compose-desktop-application/src/main/kotlin/org/jetbrains/compose/desktop/application/dsl/Application.kt b/gradle-plugins/compose-desktop-application/src/main/kotlin/org/jetbrains/compose/desktop/application/dsl/Application.kt index 9a5479f92b..3684a4e5b8 100644 --- a/gradle-plugins/compose-desktop-application/src/main/kotlin/org/jetbrains/compose/desktop/application/dsl/Application.kt +++ b/gradle-plugins/compose-desktop-application/src/main/kotlin/org/jetbrains/compose/desktop/application/dsl/Application.kt @@ -56,8 +56,8 @@ open class Application @Inject constructor( this.jvmArgs.addAll(jvmArgs) } - val nativeExecutables: NativeExecutables = objects.newInstance(NativeExecutables::class.java) - fun nativeExecutables(fn: Action) { - fn.execute(nativeExecutables) + val nativeDistributions: NativeDistributions = objects.newInstance(NativeDistributions::class.java) + fun nativeDistributions(fn: Action) { + fn.execute(nativeDistributions) } } diff --git a/gradle-plugins/compose-desktop-application/src/main/kotlin/org/jetbrains/compose/desktop/application/dsl/NativeExecutables.kt b/gradle-plugins/compose-desktop-application/src/main/kotlin/org/jetbrains/compose/desktop/application/dsl/NativeDistributions.kt similarity index 96% rename from gradle-plugins/compose-desktop-application/src/main/kotlin/org/jetbrains/compose/desktop/application/dsl/NativeExecutables.kt rename to gradle-plugins/compose-desktop-application/src/main/kotlin/org/jetbrains/compose/desktop/application/dsl/NativeDistributions.kt index a54b7a76de..b3bf8d07bc 100644 --- a/gradle-plugins/compose-desktop-application/src/main/kotlin/org/jetbrains/compose/desktop/application/dsl/NativeExecutables.kt +++ b/gradle-plugins/compose-desktop-application/src/main/kotlin/org/jetbrains/compose/desktop/application/dsl/NativeDistributions.kt @@ -7,7 +7,7 @@ import org.gradle.api.model.ObjectFactory import java.util.* import javax.inject.Inject -open class NativeExecutables @Inject constructor( +open class NativeDistributions @Inject constructor( objects: ObjectFactory, layout: ProjectLayout ) {