33import com.android.build.gradle.internal.api.BaseVariantOutputImpl
44import org.jetbrains.compose.desktop.application.dsl.TargetFormat
55import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
6- import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework
76import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
87import java.util.Properties
98
@@ -18,7 +17,6 @@ val appName = "Miuix"
1817val pkgName = " top.yukonga.miuix.uitest"
1918val verName = " 1.0.3"
2019val verCode = getVersionCode()
21- val xcf = XCFramework (appName + " Framework" )
2220
2321java {
2422 toolchain.languageVersion = JavaLanguageVersion .of(21 )
@@ -35,15 +33,13 @@ kotlin {
3533 iosSimulatorArm64()
3634 ).forEach {
3735 it.binaries.framework {
38- baseName = appName + " Framework "
36+ baseName = " shared "
3937 isStatic = true
4038 freeCompilerArgs + = listOf (
41- " -Xbinary=bundleId=$pkgName .framework" ,
4239 " -linker-option" , " -framework" , " -linker-option" , " Metal" ,
4340 " -linker-option" , " -framework" , " -linker-option" , " CoreText" ,
4441 " -linker-option" , " -framework" , " -linker-option" , " CoreGraphics"
4542 )
46- xcf.add(this )
4743 }
4844 }
4945
@@ -52,7 +48,6 @@ kotlin {
5248 macosArm64()
5349 ).forEach { macosTarget ->
5450 macosTarget.binaries.executable {
55- baseName = appName
5651 entryPoint = " main"
5752 freeCompilerArgs + = listOf (
5853 " -linker-option" , " -framework" , " -linker-option" , " Metal"
@@ -184,18 +179,10 @@ compose.desktop {
184179 }
185180 }
186181 nativeApplication {
187- targets(kotlin.targets.getByName(" macosArm64" ))
182+ targets(kotlin.targets.getByName(" macosArm64" ), kotlin.targets.getByName( " macosX64 " ) )
188183 distributions {
189184 targetFormats(TargetFormat .Dmg )
190- packageName = " $appName -MacosArm64-Native"
191- packageVersion = verName
192- }
193- }
194- nativeApplication {
195- targets(kotlin.targets.getByName(" macosX64" ))
196- distributions {
197- targetFormats(TargetFormat .Dmg )
198- packageName = " $appName -MacosX64-Native"
185+ packageName = appName
199186 packageVersion = verName
200187 }
201188 }
0 commit comments