Repository: JetBrains/compose-multiplatform
File: gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/desktop/application/tasks/AbstractJPackageTask.kt (Kotlin)

Code before:
        if (targetFormat != TargetFormat.AppImage) {
            // Args, that can only be used, when creating an installer
            if (currentOS == OS.MacOS && jvmRuntimeInfo.majorVersion >= 18) {
                // This is needed to prevent a directory does not exist error.
                cliArg("--app-image", appImage.dir("${packageName.get()}.app"))
            } else {
                cliArg("--app-image", appImage)
            }
            cliArg("--install-dir", installationPath)
            cliArg("--license-file", licenseFile)
            cliArg("--resource-dir", jpackageResources)

            val propertyFilesDirJava = propertyFilesDir.ioFile
            fileOperations.clearDirs(propertyFilesDir)

            val fileAssociationFiles = fileAssociations.orNull.orEmpty()
                .groupBy { it.extension }
                .mapValues { (extension, associations) ->
                    associations.mapIndexed { index, association ->
                        propertyFilesDirJava.resolve("FA${extension}${if (index > 0) index.toString() else ""}.properties")
                            .apply {
                                writeText(
                                    """
                                        mime-type=${association.mimeType}
                                        extension=${association.extension}
                                        description=${association.description}
                                    """.trimIndent()
                                )
                            }
                    }
                }.values.flatten()

            for (fileAssociationFile in fileAssociationFiles) {
                cliArg("--file-associations", fileAssociationFile)
            }


            when (currentOS) {
                OS.Linux -> {
                    cliArg("--linux-shortcut", linuxShortcut)
                    cliArg("--linux-package-name", linuxPackageName)
                    cliArg("--linux-app-release", linuxAppRelease)
                    cliArg("--linux-app-category", linuxAppCategory)
                    cliArg("--linux-deb-maintainer", linuxDebMaintainer)
                    cliArg("--linux-menu-group", linuxMenuGroup)
                    cliArg("--linux-rpm-license-type", linuxRpmLicenseType)
                }
                OS.Windows -> {
                    cliArg("--win-dir-chooser", winDirChooser)
                    cliArg("--win-per-user-install", winPerUserInstall)
                    cliArg("--win-shortcut", winShortcut)

Review comment (suggestion):
```suggestion
                                        description=${association.description}
                                        icon=${association.iconFile}
```

Let's also add support for settings icons (or create a follow-up issue for adding it).

Code after:

            javaOption("-D$APP_RESOURCES_DIR=${appDir(packagedResourcesDir.ioFile.name)}")

            val mappedJar = libsMapping[launcherMainJar.ioFile]?.singleOrNull { it.isJarFile }
                ?: error("Main jar was not processed correctly: ${launcherMainJar.ioFile}")
            val mainJarPath = mappedJar.normalizedPath(base = libsDir.ioFile)
            cliArg("--main-jar", mainJarPath)
            cliArg("--main-class", launcherMainClass)

            if (currentOS == OS.Windows) {
                cliArg("--win-console", winConsole)
            }
            cliArg("--icon", iconFile)
            launcherArgs.orNull?.forEach {
                cliArg("--arguments", "'$it'")
            }
            launcherJvmArgs.orNull?.forEach {
                javaOption(it)
            }
            javaOption("-D$SKIKO_LIBRARY_PATH=${appDir()}")
            if (currentOS == OS.MacOS) {
                macDockName.orNull?.let { dockName ->
                    javaOption("-Xdock:name=$dockName")
                }
                macProvisioningProfile.orNull?.let { provisioningProfile ->
                    cliArg("--app-content", provisioningProfile)
                }
            }
        }

        if (targetFormat != TargetFormat.AppImage) {
            // Args, that can only be used, when creating an installer
            if (currentOS == OS.MacOS && jvmRuntimeInfo.majorVersion >= 18) {
                // This is needed to prevent a directory does not exist error.
                cliArg("--app-image", appImage.dir("${packageName.get()}.app"))
            } else {
                cliArg("--app-image", appImage)
            }
            cliArg("--install-dir", installationPath)
            cliArg("--license-file", licenseFile)
            cliArg("--resource-dir", jpackageResources)

            val propertyFilesDirJava = propertyFilesDir.ioFile
            fileOperations.clearDirs(propertyFilesDir)

            val fileAssociationFiles = fileAssociations.get()
                .groupBy { it.extension }
                .mapValues { (extension, associations) ->
                    associations.mapIndexed { index, association ->
                        propertyFilesDirJava.resolve("FA${extension}${if (index > 0) index.toString() else ""}.properties")
                            .apply {