Skip to content

Commit fdad05a

Browse files
committed
Add standalone android app
1 parent 031b8ac commit fdad05a

6 files changed

Lines changed: 58 additions & 35 deletions

File tree

‎.idea/runConfigurations/android.xml‎

Lines changed: 10 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎androidApp/build.gradle.kts‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
plugins {
2+
alias(libs.plugins.android.application)
3+
}
4+
5+
android {
6+
namespace = "io.github.xxfast.decompose.router.androidApp"
7+
compileSdk = 36
8+
9+
defaultConfig {
10+
applicationId = "io.github.xxfast.decompose.router.app"
11+
minSdk = 25
12+
targetSdk = 36
13+
versionCode = 1
14+
versionName = "1.0"
15+
}
16+
17+
compileOptions {
18+
sourceCompatibility = JavaVersion.VERSION_17
19+
targetCompatibility = JavaVersion.VERSION_17
20+
}
21+
}
22+
23+
dependencies {
24+
implementation(project(":app"))
25+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
3+
<application
4+
android:allowBackup="false"
5+
android:label="Decompose-Router"
6+
android:supportsRtl="true"
7+
android:theme="@android:style/Theme.Material.NoActionBar">
8+
<activity
9+
android:name="io.github.xxfast.decompose.router.app.MainActivity"
10+
android:exported="true"
11+
android:enableOnBackInvokedCallback="true">
12+
<intent-filter>
13+
<action android:name="android.intent.action.MAIN" />
14+
<category android:name="android.intent.category.LAUNCHER" />
15+
</intent-filter>
16+
</activity>
17+
</application>
18+
</manifest>

‎build.gradle.kts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
plugins {
22
alias(libs.plugins.kotlin.multiplatform) apply false
3+
alias(libs.plugins.android.application) apply false
34
alias(libs.plugins.android.kotlin.multiplatform.library) apply false
45
alias(libs.plugins.kotlin.compose) apply false
56
alias(libs.plugins.compose.multiplatform) apply false
@@ -18,7 +19,7 @@ buildscript {
1819
}
1920

2021
apiValidation {
21-
ignoredProjects += listOf("app")
22+
ignoredProjects += listOf("app", "androidApp")
2223
}
2324

2425
// Aggregate API documentation from the published modules into a single site
@@ -40,7 +41,7 @@ allprojects {
4041

4142
subprojects {
4243
// The demo app is not published and has no API docs.
43-
if (name == "app") return@subprojects
44+
if (name == "app" || name == "androidApp") return@subprojects
4445

4546
apply(plugin = "org.jetbrains.dokka")
4647
apply(plugin = "com.vanniktech.maven.publish")

‎gradle/libs.versions.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ wear-compose-material = { module = "androidx.wear.compose:compose-material", ver
3535
wear-compose-ui-tooling = { module = "androidx.wear.compose:compose-ui-tooling", version.ref = "wear-compose" }
3636

3737
[plugins]
38+
android-application = { id = "com.android.application", version.ref = "agp" }
3839
android-kotlin-multiplatform-library = { id = "com.android.kotlin.multiplatform.library", version.ref = "agp" }
3940
binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "binary-compatibility-validator" }
4041
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }

‎settings.gradle.kts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ rootProject.name = "Decompose-Router"
1717
include(":decompose-router")
1818
include(":decompose-router-wear")
1919
include(":app")
20+
include(":androidApp")

0 commit comments

Comments
 (0)