diff --git a/.fleet/run.json b/.fleet/run.json index 59eb629..a1c7ce3 100644 --- a/.fleet/run.json +++ b/.fleet/run.json @@ -6,7 +6,7 @@ "type": "gradle", "workingDir": "$PROJECT_DIR$", "tasks": ["jvmRun"], - "args": ["-DmainClass=MainKt", "--quiet", "-p", "$PROJECT_DIR$/composeApp"], + "args": ["-DmainClass=Main_desktopKt", "--quiet", "-p", "$PROJECT_DIR$/composeApp"], "initScripts": { "flmapper": "ext.mapPath = { path -> null }" } diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml index b7e4222..ed301d0 100644 --- a/.idea/deploymentTargetDropDown.xml +++ b/.idea/deploymentTargetDropDown.xml @@ -2,7 +2,7 @@ - + diff --git a/composeApp/build.gradle.kts b/composeApp/build.gradle.kts index 8574574..20d6690 100644 --- a/composeApp/build.gradle.kts +++ b/composeApp/build.gradle.kts @@ -38,16 +38,15 @@ kotlin { } jvm() -// For now Room doesn't work with JS -// js { -// moduleName = "composeApp" -// browser { -// commonWebpackConfig { -// outputFileName = "composeApp.js" -// } -// } -// binaries.executable() -// } + js { + moduleName = "composeApp" + browser { + commonWebpackConfig { + outputFileName = "composeApp.js" + } + } + binaries.executable() + } listOf( iosArm64(), @@ -220,12 +219,13 @@ compose.resources { dependencies { add("kspCommonMainMetadata", libs.room.compiler) add("kspAndroid", libs.room.compiler) -// add("kspIosX64", libs.room.compiler) -// add("kspIosArm64", libs.room.compiler) -// add("kspIosSimulatorArm64", libs.room.compiler) + add("kspIosX64", libs.room.compiler) + add("kspIosArm64", libs.room.compiler) + add("kspIosSimulatorArm64", libs.room.compiler) add("kspJvm", libs.room.compiler) + add("kspJs", libs.room.compiler) } room { schemaDirectory("$projectDir/schemas") -} \ No newline at end of file +} diff --git a/composeApp/src/jvmMain/kotlin/Main.kt b/composeApp/src/jvmMain/kotlin/Main.kt deleted file mode 100644 index 7b00029..0000000 --- a/composeApp/src/jvmMain/kotlin/Main.kt +++ /dev/null @@ -1,12 +0,0 @@ -import androidx.compose.ui.unit.DpSize -import androidx.compose.ui.unit.dp -import androidx.compose.ui.window.WindowState -import androidx.compose.ui.window.singleWindowApplication - -fun main() = - singleWindowApplication( - title = "Jet Habit", - state = WindowState(size = DpSize(800.dp, 800.dp)) - ) { - MainView() - } diff --git a/gradle.properties b/gradle.properties index 4d64b7b..249f3c3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,4 +10,4 @@ android.useAndroidX=true #MPP kotlin.mpp.enableCInteropCommonization=true kotlin.native.binary.memoryModel=experimental -org.jetbrains.compose.experimental.jscanvas.enabled=true \ No newline at end of file +org.jetbrains.compose.experimental.jscanvas.enabled=true diff --git a/iosApp/iosApp/iosApp.swift b/iosApp/iosApp/iosApp.swift index 82af969..21d3369 100644 --- a/iosApp/iosApp/iosApp.swift +++ b/iosApp/iosApp/iosApp.swift @@ -7,6 +7,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { window = UIWindow(frame: UIScreen.main.bounds) + Main_iosKt.initializeIOSApp() let mainViewController = Main_iosKt.MainViewController() window?.rootViewController = mainViewController window?.makeKeyAndVisible()