diff --git a/app/composeApp/build.gradle.kts b/app/composeApp/build.gradle.kts index b96ed0f..20fa329 100644 --- a/app/composeApp/build.gradle.kts +++ b/app/composeApp/build.gradle.kts @@ -1,4 +1,5 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.swiftexport.ExperimentalSwiftExportDsl plugins { alias(libs.plugins.androidApplication) @@ -24,6 +25,17 @@ kotlin { } } + @OptIn(ExperimentalSwiftExportDsl::class) + swiftExport { + moduleName = "ComposeApp" + flattenPackage = "dev.carlosmartino.template" + + export(project(":features:common")) { + moduleName = "CommonFeature" + flattenPackage = "dev.carlosmartino.template.common" + } + } + sourceSets { androidMain.dependencies { implementation(compose.preview) diff --git a/app/iosApp/iosApp.xcodeproj/project.pbxproj b/app/iosApp/iosApp.xcodeproj/project.pbxproj index 1363425..7ccbbdf 100644 --- a/app/iosApp/iosApp.xcodeproj/project.pbxproj +++ b/app/iosApp/iosApp.xcodeproj/project.pbxproj @@ -152,7 +152,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if [ \"YES\" = \"$OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED\" ]; then\n echo \"Skipping Gradle build task invocation due to OVERRIDE_KOTLIN_BUILD_IDE_SUPPORTED environment variable set to \\\"YES\\\"\"\n exit 0\nfi\ncd \"$SRCROOT/../..\"\n./gradlew :app:composeApp:embedAndSignAppleFrameworkForXcode\n"; + shellScript = "cd \"$SRCROOT/../..\"\n./gradlew :app:composeApp:embedSwiftExportForXcode\n"; }; /* End PBXShellScriptBuildPhase section */ diff --git a/app/iosApp/iosApp/ContentView.swift b/app/iosApp/iosApp/ContentView.swift index c765ff2..4480b63 100644 --- a/app/iosApp/iosApp/ContentView.swift +++ b/app/iosApp/iosApp/ContentView.swift @@ -4,7 +4,7 @@ import ComposeApp struct ComposeView: UIViewControllerRepresentable { func makeUIViewController(context: Context) -> UIViewController { - MainViewControllerKt.MainViewController() + MainViewController() } func updateUIViewController(_ uiViewController: UIViewController, context: Context) {} @@ -12,10 +12,6 @@ struct ComposeView: UIViewControllerRepresentable { struct ContentView: View { var body: some View { - ComposeView() - .ignoresSafeArea() + ComposeView().ignoresSafeArea() } } - - - diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7fe8ede..8df120c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,7 +5,7 @@ android-minSdk = "26" android-targetSdk = "36" # Platform specific versions agp = "8.13.0" -kotlin = "2.2.20" +kotlin = "2.3.0-Beta1" androidx-activity = "1.11.0" androidx-core = "1.17.0" androidx-espresso = "3.7.0"