From 7b58e0496e0e42981db51239854df289a3b85c4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Braun?= Date: Thu, 16 May 2024 22:31:18 +0200 Subject: [PATCH] Update sample apps --- README.md | 9 +- .../kotlin/co/zsmb/requirektx/MainActivity.kt | 11 -- .../androidMain/res/layout/activity_main.xml | 18 ---- .../androidMain/res/values-night/themes.xml | 16 --- app/src/androidMain/res/values/colors.xml | 10 -- app/src/androidMain/res/values/strings.xml | 3 - app/src/androidMain/res/values/themes.xml | 16 --- build.gradle.kts | 2 +- gradle/libs.versions.toml | 15 +-- .../api/jvm/requirektx-bundle.api | 4 + requirektx-bundle/src/jvmMain/kotlin/bla.kt | 3 + {app => sample}/.gitignore | 0 {app => sample}/build.gradle.kts | 34 +++++-- .../src/androidMain/AndroidManifest.xml | 6 +- .../kotlin/co/zsmb/requirektx/MainActivity.kt | 14 +++ .../drawable-v24/ic_launcher_foreground.xml | 0 .../res/drawable/ic_launcher_background.xml | 0 .../res/mipmap-anydpi-v26/ic_launcher.xml | 0 .../mipmap-anydpi-v26/ic_launcher_round.xml | 0 .../res/mipmap-hdpi/ic_launcher.png | Bin .../res/mipmap-hdpi/ic_launcher_round.png | Bin .../res/mipmap-mdpi/ic_launcher.png | Bin .../res/mipmap-mdpi/ic_launcher_round.png | Bin .../res/mipmap-xhdpi/ic_launcher.png | Bin .../res/mipmap-xhdpi/ic_launcher_round.png | Bin .../res/mipmap-xxhdpi/ic_launcher.png | Bin .../res/mipmap-xxhdpi/ic_launcher_round.png | Bin .../res/mipmap-xxxhdpi/ic_launcher.png | Bin .../res/mipmap-xxxhdpi/ic_launcher_round.png | Bin sample/src/androidMain/res/values/strings.xml | 3 + .../kotlin/co/zsmb/requirektx/App.kt | 94 ++++++++++++++++++ .../kotlin/co/zsmb/requirektx/Main.kt | 13 +++ settings.gradle.kts | 2 +- 33 files changed, 179 insertions(+), 94 deletions(-) delete mode 100644 app/src/androidMain/kotlin/co/zsmb/requirektx/MainActivity.kt delete mode 100644 app/src/androidMain/res/layout/activity_main.xml delete mode 100644 app/src/androidMain/res/values-night/themes.xml delete mode 100644 app/src/androidMain/res/values/colors.xml delete mode 100644 app/src/androidMain/res/values/strings.xml delete mode 100644 app/src/androidMain/res/values/themes.xml create mode 100644 requirektx-bundle/src/jvmMain/kotlin/bla.kt rename {app => sample}/.gitignore (100%) rename {app => sample}/build.gradle.kts (62%) rename {app => sample}/src/androidMain/AndroidManifest.xml (88%) create mode 100644 sample/src/androidMain/kotlin/co/zsmb/requirektx/MainActivity.kt rename {app => sample}/src/androidMain/res/drawable-v24/ic_launcher_foreground.xml (100%) rename {app => sample}/src/androidMain/res/drawable/ic_launcher_background.xml (100%) rename {app => sample}/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml (100%) rename {app => sample}/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml (100%) rename {app => sample}/src/androidMain/res/mipmap-hdpi/ic_launcher.png (100%) rename {app => sample}/src/androidMain/res/mipmap-hdpi/ic_launcher_round.png (100%) rename {app => sample}/src/androidMain/res/mipmap-mdpi/ic_launcher.png (100%) rename {app => sample}/src/androidMain/res/mipmap-mdpi/ic_launcher_round.png (100%) rename {app => sample}/src/androidMain/res/mipmap-xhdpi/ic_launcher.png (100%) rename {app => sample}/src/androidMain/res/mipmap-xhdpi/ic_launcher_round.png (100%) rename {app => sample}/src/androidMain/res/mipmap-xxhdpi/ic_launcher.png (100%) rename {app => sample}/src/androidMain/res/mipmap-xxhdpi/ic_launcher_round.png (100%) rename {app => sample}/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.png (100%) rename {app => sample}/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_round.png (100%) create mode 100644 sample/src/androidMain/res/values/strings.xml create mode 100644 sample/src/commonMain/kotlin/co/zsmb/requirektx/App.kt create mode 100644 sample/src/desktopMain/kotlin/co/zsmb/requirektx/Main.kt diff --git a/README.md b/README.md index 9dc1f34..f6d3ed5 100644 --- a/README.md +++ b/README.md @@ -123,13 +123,16 @@ To get the bundle of arguments from an entry, use `requireArguments`: val args: Bundle = navBackStackEntry.requireArguments() ``` -Here's an example of using this with Compose, in combination with the [Bundle extensions](#bundle): +Here's an example of using this with Compose Navigation, in combination with the [Bundle extensions](#bundle): ```kotlin -composable("detail/{objectId}") { backStackEntry -> +composable( + "detail/{objectId}", + arguments = listOf(navArgument("objectId") { type = NavType.IntType }), +) { backStackEntry -> val args = backStackEntry.requireArguments() val objectId = args.requireInt("objectId") - DetailScreen(navController, objectId) + // UI implementation } ``` diff --git a/app/src/androidMain/kotlin/co/zsmb/requirektx/MainActivity.kt b/app/src/androidMain/kotlin/co/zsmb/requirektx/MainActivity.kt deleted file mode 100644 index 3dcad30..0000000 --- a/app/src/androidMain/kotlin/co/zsmb/requirektx/MainActivity.kt +++ /dev/null @@ -1,11 +0,0 @@ -package co.zsmb.requirektx - -import androidx.appcompat.app.AppCompatActivity -import androidx.core.bundle.Bundle - -class MainActivity : AppCompatActivity() { - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContentView(R.layout.activity_main) - } -} diff --git a/app/src/androidMain/res/layout/activity_main.xml b/app/src/androidMain/res/layout/activity_main.xml deleted file mode 100644 index 4fc2444..0000000 --- a/app/src/androidMain/res/layout/activity_main.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/src/androidMain/res/values-night/themes.xml b/app/src/androidMain/res/values-night/themes.xml deleted file mode 100644 index 7f60004..0000000 --- a/app/src/androidMain/res/values-night/themes.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - \ No newline at end of file diff --git a/app/src/androidMain/res/values/colors.xml b/app/src/androidMain/res/values/colors.xml deleted file mode 100644 index f8c6127..0000000 --- a/app/src/androidMain/res/values/colors.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - #FFBB86FC - #FF6200EE - #FF3700B3 - #FF03DAC5 - #FF018786 - #FF000000 - #FFFFFFFF - \ No newline at end of file diff --git a/app/src/androidMain/res/values/strings.xml b/app/src/androidMain/res/values/strings.xml deleted file mode 100644 index 3245b7e..0000000 --- a/app/src/androidMain/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - RequireKTX - \ No newline at end of file diff --git a/app/src/androidMain/res/values/themes.xml b/app/src/androidMain/res/values/themes.xml deleted file mode 100644 index 2637047..0000000 --- a/app/src/androidMain/res/values/themes.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 47daf77..a87c05b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ plugins { apiValidation { ignoredProjects += listOf( - "app", + "sample", "requirektx-test-helper", ) klib { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d953c52..f5f0aba 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,25 +1,25 @@ [versions] +androidx-activityCompose = "1.9.0" agp = "8.2.2" androidTools = "31.4.0" appcompat = "1.6.1" binary-compat-validator = "0.15.0-Beta.2" -constraintlayout = "2.1.4" +compose-multiplatform = "1.6.10-rc03" core-ktx = "1.13.1" core-bundle = "1.0.0-rc01" junit = "4.13.2" junit-jupiter-api = "5.9.2" kotlin = "2.0.0-RC3" -material = "1.12.0" maven-publish = "0.28.0" -navigation-runtime = "2.7.0-alpha04" +navigationCompose = "2.7.0-alpha04" robolectric = "4.12.1" work-runtime = "2.9.0" [libraries] +androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activityCompose" } android-gradle-plugin = { group = "com.android.tools.build", name = "gradle", version.ref = "agp" } android-tools-common = { group = "com.android.tools", name = "common", version.ref = "androidTools" } appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" } -constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintlayout" } core-bundle = { module = "org.jetbrains.androidx.core:core-bundle", version.ref = "core-bundle" } core-ktx = { module = "androidx.core:core-ktx", version.ref = "core-ktx" } junit = { module = "junit:junit", version.ref = "junit" } @@ -28,9 +28,9 @@ junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", vers junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "junit-jupiter-api" } kotlin-gradle-plugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" } kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" } -material = { module = "com.google.android.material:material", version.ref = "material" } maven-publish = { module = "com.vanniktech:gradle-maven-publish-plugin", version.ref = "maven-publish" } -navigation-runtime = { module = "org.jetbrains.androidx.navigation:navigation-runtime", version.ref = "navigation-runtime" } +navigation-compose = { module = "org.jetbrains.androidx.navigation:navigation-compose", version.ref = "navigationCompose" } +navigation-runtime = { module = "org.jetbrains.androidx.navigation:navigation-runtime", version.ref = "navigationCompose" } robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectric" } work-runtime = { module = "androidx.work:work-runtime", version.ref = "work-runtime" } @@ -38,7 +38,10 @@ work-runtime = { module = "androidx.work:work-runtime", version.ref = "work-runt androidApplication = { id = "com.android.application", version.ref = "agp" } androidLibrary = { id = "com.android.library", version.ref = "agp" } binaryCompatValidator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "binary-compat-validator" } +composeCompiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } +composeMultiplatform = { id = "org.jetbrains.compose", version.ref = "compose-multiplatform" } kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } mavenPublish = { id = "com.vanniktech.maven.publish", version.ref = "maven-publish" } + requireKtxLibrary = { id = "co.zsmb.requirektx.library", version = "unspecified" } requireKtxPublishing = { id = "co.zsmb.requirektx.publishing", version = "unspecified" } diff --git a/requirektx-bundle/api/jvm/requirektx-bundle.api b/requirektx-bundle/api/jvm/requirektx-bundle.api index afdec82..d471ff8 100644 --- a/requirektx-bundle/api/jvm/requirektx-bundle.api +++ b/requirektx-bundle/api/jvm/requirektx-bundle.api @@ -1,3 +1,7 @@ +public final class BlaKt { + public static final fun publicjvmapi ()V +} + public final class co/zsmb/requirektx/BundleArrayListKt { public static final fun getIntegerArrayListOrNull (Landroidx/core/bundle/Bundle;Ljava/lang/String;)Ljava/util/ArrayList; public static final fun getStringArrayListOrNull (Landroidx/core/bundle/Bundle;Ljava/lang/String;)Ljava/util/ArrayList; diff --git a/requirektx-bundle/src/jvmMain/kotlin/bla.kt b/requirektx-bundle/src/jvmMain/kotlin/bla.kt new file mode 100644 index 0000000..3a61827 --- /dev/null +++ b/requirektx-bundle/src/jvmMain/kotlin/bla.kt @@ -0,0 +1,3 @@ +public fun publicjvmapi() { + +} \ No newline at end of file diff --git a/app/.gitignore b/sample/.gitignore similarity index 100% rename from app/.gitignore rename to sample/.gitignore diff --git a/app/build.gradle.kts b/sample/build.gradle.kts similarity index 62% rename from app/build.gradle.kts rename to sample/build.gradle.kts index 2083f13..a3d021a 100644 --- a/app/build.gradle.kts +++ b/sample/build.gradle.kts @@ -1,6 +1,8 @@ plugins { alias(libs.plugins.kotlinMultiplatform) alias(libs.plugins.androidApplication) + alias(libs.plugins.composeCompiler) + alias(libs.plugins.composeMultiplatform) } kotlin { @@ -11,18 +13,32 @@ kotlin { } } } + + jvm("desktop") sourceSets { - androidMain.dependencies { - implementation(libs.core.ktx) - implementation(libs.appcompat) - implementation(libs.material) - implementation(libs.constraintlayout) + val desktopMain by getting + + commonMain.dependencies { + implementation(compose.runtime) + implementation(compose.foundation) + implementation(compose.material) + implementation(compose.ui) + implementation(compose.components.uiToolingPreview) + + implementation(libs.navigation.compose) implementation(project(":requirektx-bundle")) - implementation(project(":requirektx-intent")) implementation(project(":requirektx-navigation")) + } + androidMain.dependencies { + implementation(project(":requirektx-intent")) implementation(project(":requirektx-work")) + + implementation(libs.androidx.activity.compose) + } + desktopMain.dependencies { + implementation(compose.desktop.currentOs) } } } @@ -57,3 +73,9 @@ android { } } } + +compose.desktop { + application { + mainClass = "co.zsmb.requirektx.MainKt" + } +} diff --git a/app/src/androidMain/AndroidManifest.xml b/sample/src/androidMain/AndroidManifest.xml similarity index 88% rename from app/src/androidMain/AndroidManifest.xml rename to sample/src/androidMain/AndroidManifest.xml index f361bd9..4f38971 100644 --- a/app/src/androidMain/AndroidManifest.xml +++ b/sample/src/androidMain/AndroidManifest.xml @@ -7,12 +7,12 @@ android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" - android:theme="@style/Theme.RequireKTX"> + android:theme="@android:style/Theme.Material.Light.NoActionBar"> - + - + diff --git a/sample/src/androidMain/kotlin/co/zsmb/requirektx/MainActivity.kt b/sample/src/androidMain/kotlin/co/zsmb/requirektx/MainActivity.kt new file mode 100644 index 0000000..ef1b66e --- /dev/null +++ b/sample/src/androidMain/kotlin/co/zsmb/requirektx/MainActivity.kt @@ -0,0 +1,14 @@ +package co.zsmb.requirektx + +import androidx.activity.ComponentActivity +import androidx.activity.compose.setContent +import androidx.core.bundle.Bundle + +class MainActivity : ComponentActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContent { + App() + } + } +} diff --git a/app/src/androidMain/res/drawable-v24/ic_launcher_foreground.xml b/sample/src/androidMain/res/drawable-v24/ic_launcher_foreground.xml similarity index 100% rename from app/src/androidMain/res/drawable-v24/ic_launcher_foreground.xml rename to sample/src/androidMain/res/drawable-v24/ic_launcher_foreground.xml diff --git a/app/src/androidMain/res/drawable/ic_launcher_background.xml b/sample/src/androidMain/res/drawable/ic_launcher_background.xml similarity index 100% rename from app/src/androidMain/res/drawable/ic_launcher_background.xml rename to sample/src/androidMain/res/drawable/ic_launcher_background.xml diff --git a/app/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml b/sample/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml similarity index 100% rename from app/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml rename to sample/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml diff --git a/app/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml b/sample/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml similarity index 100% rename from app/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml rename to sample/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml diff --git a/app/src/androidMain/res/mipmap-hdpi/ic_launcher.png b/sample/src/androidMain/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from app/src/androidMain/res/mipmap-hdpi/ic_launcher.png rename to sample/src/androidMain/res/mipmap-hdpi/ic_launcher.png diff --git a/app/src/androidMain/res/mipmap-hdpi/ic_launcher_round.png b/sample/src/androidMain/res/mipmap-hdpi/ic_launcher_round.png similarity index 100% rename from app/src/androidMain/res/mipmap-hdpi/ic_launcher_round.png rename to sample/src/androidMain/res/mipmap-hdpi/ic_launcher_round.png diff --git a/app/src/androidMain/res/mipmap-mdpi/ic_launcher.png b/sample/src/androidMain/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from app/src/androidMain/res/mipmap-mdpi/ic_launcher.png rename to sample/src/androidMain/res/mipmap-mdpi/ic_launcher.png diff --git a/app/src/androidMain/res/mipmap-mdpi/ic_launcher_round.png b/sample/src/androidMain/res/mipmap-mdpi/ic_launcher_round.png similarity index 100% rename from app/src/androidMain/res/mipmap-mdpi/ic_launcher_round.png rename to sample/src/androidMain/res/mipmap-mdpi/ic_launcher_round.png diff --git a/app/src/androidMain/res/mipmap-xhdpi/ic_launcher.png b/sample/src/androidMain/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from app/src/androidMain/res/mipmap-xhdpi/ic_launcher.png rename to sample/src/androidMain/res/mipmap-xhdpi/ic_launcher.png diff --git a/app/src/androidMain/res/mipmap-xhdpi/ic_launcher_round.png b/sample/src/androidMain/res/mipmap-xhdpi/ic_launcher_round.png similarity index 100% rename from app/src/androidMain/res/mipmap-xhdpi/ic_launcher_round.png rename to sample/src/androidMain/res/mipmap-xhdpi/ic_launcher_round.png diff --git a/app/src/androidMain/res/mipmap-xxhdpi/ic_launcher.png b/sample/src/androidMain/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from app/src/androidMain/res/mipmap-xxhdpi/ic_launcher.png rename to sample/src/androidMain/res/mipmap-xxhdpi/ic_launcher.png diff --git a/app/src/androidMain/res/mipmap-xxhdpi/ic_launcher_round.png b/sample/src/androidMain/res/mipmap-xxhdpi/ic_launcher_round.png similarity index 100% rename from app/src/androidMain/res/mipmap-xxhdpi/ic_launcher_round.png rename to sample/src/androidMain/res/mipmap-xxhdpi/ic_launcher_round.png diff --git a/app/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.png b/sample/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from app/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.png rename to sample/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/app/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_round.png b/sample/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_round.png similarity index 100% rename from app/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_round.png rename to sample/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_round.png diff --git a/sample/src/androidMain/res/values/strings.xml b/sample/src/androidMain/res/values/strings.xml new file mode 100644 index 0000000..4050a93 --- /dev/null +++ b/sample/src/androidMain/res/values/strings.xml @@ -0,0 +1,3 @@ + + requireKTX sample + \ No newline at end of file diff --git a/sample/src/commonMain/kotlin/co/zsmb/requirektx/App.kt b/sample/src/commonMain/kotlin/co/zsmb/requirektx/App.kt new file mode 100644 index 0000000..3b5a573 --- /dev/null +++ b/sample/src/commonMain/kotlin/co/zsmb/requirektx/App.kt @@ -0,0 +1,94 @@ +package co.zsmb.requirektx + +import androidx.compose.foundation.layout.* +import androidx.compose.material.* +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.automirrored.filled.ArrowBack +import androidx.compose.material.icons.filled.ArrowBack +import androidx.compose.runtime.* +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import androidx.navigation.NavHostController +import androidx.navigation.compose.* +import androidx.compose.ui.unit.sp +import androidx.navigation.NavType +import androidx.navigation.navArgument +import org.jetbrains.compose.ui.tooling.preview.Preview + +@Composable +fun App() { + val navController: NavHostController = rememberNavController() + NavHost( + navController, + startDestination = "home" + ) { + composable("home") { + Home(onSelectNumber = { number -> navController.navigate("detail/$number") }) + } + composable( + "detail/{param}", + arguments = listOf(navArgument("param") { type = NavType.IntType }), + ) { backStackEntry -> + val args = backStackEntry.requireArguments() + val number = args.requireInt("param") + Detail(number = number, onNavigateBack = { navController.popBackStack() }) + } + } +} + +@Composable +@Preview +fun DetailPreview() { + Detail(42, {}) +} + +@Composable +fun Detail(number: Int, onNavigateBack: () -> Unit) { + Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { + IconButton(onClick = { onNavigateBack() }, modifier = Modifier.align(Alignment.TopStart)) { + Icon(Icons.AutoMirrored.Default.ArrowBack, "Back") + } + Text("Your number was $number", fontSize = 20.sp) + } +} + +@Composable +@Preview +fun HomePreview() { + Home(onSelectNumber = {}) +} + +@Preview +@Composable +fun Home(onSelectNumber: (Int) -> Unit) { + Column( + modifier = Modifier + .fillMaxSize() + .padding(16.dp), + verticalArrangement = Arrangement.Center, + horizontalAlignment = Alignment.CenterHorizontally + ) { + Text("Enter a number", fontSize = 24.sp) + + Spacer(Modifier.height(20.dp)) + + var inputState by remember { mutableStateOf("") } + val number = inputState.toIntOrNull() + + TextField( + value = inputState, + onValueChange = { inputState = it }, + ) + + Spacer(Modifier.height(20.dp)) + + Button( + onClick = { onSelectNumber(number!!) }, + enabled = number != null, + ) { + Text("Send") + } + } +} + diff --git a/sample/src/desktopMain/kotlin/co/zsmb/requirektx/Main.kt b/sample/src/desktopMain/kotlin/co/zsmb/requirektx/Main.kt new file mode 100644 index 0000000..475c85d --- /dev/null +++ b/sample/src/desktopMain/kotlin/co/zsmb/requirektx/Main.kt @@ -0,0 +1,13 @@ +package co.zsmb.requirektx + +import androidx.compose.ui.window.Window +import androidx.compose.ui.window.application + +fun main() = application { + Window( + onCloseRequest = ::exitApplication, + title = "requireKTX sample", + ) { + App() + } +} diff --git a/settings.gradle.kts b/settings.gradle.kts index ba96bcd..e31cad3 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -17,7 +17,7 @@ dependencyResolutionManagement { rootProject.name = "requireKTX" include( - ":app", + ":sample", ":requirektx-test-helper", ":requirektx-bundle", ":requirektx-intent",