Skip to content

Add support for macOS 26+ layered icons#4

Merged
kdroidFilter merged 1 commit intomainfrom
feat/macos-layered-icons
Feb 9, 2026
Merged

Add support for macOS 26+ layered icons#4
kdroidFilter merged 1 commit intomainfrom
feat/macos-layered-icons

Conversation

@kdroidFilter
Copy link
Copy Markdown
Owner

Summary

  • Port of JetBrains/compose-multiplatform#5451
  • Adds layeredIconDir DSL property to macOS {} block for both JVM and native targets
  • Compiles .icon directories into Assets.car via xcrun actool (requires actool >= 26.0)
  • Embeds Assets.car in the .app bundle and sets CFBundleIconName in Info.plist
  • Gracefully degrades with a warning if actool is missing or too old

Changed files

  • PlatformSettings.kt — new layeredIconDir: DirectoryProperty
  • MacAssetsTool.kt — new utility for actool compilation and version checking
  • AbstractJPackageTask.kt — layered icon support for JVM packaging
  • AbstractNativeMacApplicationPackageAppDirTask.kt — layered icon support for native packaging
  • InfoPlistBuilder.kt — added CFBundleIconName plist key
  • osUtils.kt — added plutil to MacUtils
  • configureJvmApplication.kt / configureNativeApplication.kt — DSL wiring
  • README.md — documentation with usage examples

Usage

nativeDistributions {
    macOS {
        iconFile.set(project.file("icons/MyApp.icns"))       // fallback
        layeredIconDir.set(project.file("icons/MyApp.icon")) // layered
    }
}

Test plan

  • Verify build compiles successfully on all platforms
  • Test on macOS with Xcode 26+ that Assets.car is generated and included in the .app bundle
  • Test that builds without layeredIconDir set still work unchanged
  • Test graceful degradation when actool < 26 or missing

Port of JetBrains/compose-multiplatform#5451. Adds a `layeredIconDir`
DSL property that compiles a .icon directory into Assets.car via
xcrun actool and embeds it in the .app bundle for both JVM and native
Mac targets. Requires actool >= 26.0.
@kdroidFilter kdroidFilter merged commit 42d0cff into main Feb 9, 2026
1 check failed
@kdroidFilter kdroidFilter deleted the feat/macos-layered-icons branch February 17, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant