Marcello Galhardo | 7aaec16 | 2024-12-03 11:30:10 +0000 | [diff] [blame] | 1 | /** |
| 2 | * This file was created using the `create_project.py` script located in the |
| 3 | * `<AndroidX root>/development/project-creator` directory. |
| 4 | * |
| 5 | * Please use that script when creating a new project, rather than copying an existing project and |
| 6 | * modifying its settings. |
| 7 | */ |
| 8 | |
| 9 | import androidx.build.KotlinTarget |
| 10 | import androidx.build.LibraryType |
| 11 | import androidx.build.PlatformIdentifier |
Marcello Galhardo | 7aaec16 | 2024-12-03 11:30:10 +0000 | [diff] [blame] | 12 | |
| 13 | plugins { |
| 14 | id("AndroidXPlugin") |
| 15 | id("com.android.library") |
| 16 | alias(libs.plugins.kotlinSerialization) |
| 17 | } |
| 18 | |
| 19 | androidXMultiplatform { |
| 20 | android() |
| 21 | jvmStubs() |
| 22 | linuxX64Stubs() |
| 23 | |
Marcello Galhardo | 7aaec16 | 2024-12-03 11:30:10 +0000 | [diff] [blame] | 24 | defaultPlatform(PlatformIdentifier.ANDROID) |
| 25 | |
| 26 | sourceSets { |
| 27 | commonMain { |
| 28 | dependencies { |
| 29 | api(project(":savedstate:savedstate")) |
| 30 | api("androidx.compose.runtime:runtime:1.7.5") |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | commonTest { |
| 35 | dependencies { |
| 36 | implementation(project(":kruth:kruth")) |
| 37 | implementation(libs.kotlinTest) |
| 38 | implementation(libs.kotlinTestCommon) |
| 39 | implementation(libs.kotlinTestAnnotationsCommon) |
| 40 | implementation(libs.kotlinCoroutinesTest) |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | androidMain { |
| 45 | dependsOn(commonMain) |
| 46 | dependencies { |
| 47 | api("androidx.annotation:annotation:1.8.1") |
| 48 | implementation("androidx.core:core-ktx:1.13.1") |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | androidUnitTest { |
| 53 | dependsOn(commonTest) |
| 54 | dependencies { |
| 55 | implementation(libs.robolectric) |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | androidInstrumentedTest { |
| 60 | dependsOn(commonTest) |
| 61 | dependencies { |
| 62 | implementation(libs.testExtJunit) |
| 63 | implementation(libs.testCore) |
| 64 | implementation(libs.testRunner) |
| 65 | implementation(libs.testRules) |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | nonAndroidMain { |
| 70 | dependsOn(commonMain) |
| 71 | } |
| 72 | |
| 73 | jvmStubsMain { |
| 74 | dependsOn(nonAndroidMain) |
| 75 | } |
| 76 | |
| 77 | linuxx64StubsMain { |
| 78 | dependsOn(nonAndroidMain) |
| 79 | } |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | android { |
Marcello Galhardo | a486a84 | 2024-12-03 12:48:04 +0000 | [diff] [blame] | 84 | buildTypes.configureEach { |
| 85 | consumerProguardFiles("proguard-rules.pro") |
| 86 | } |
Aurimas Liutikas | 7795282 | 2024-12-04 18:00:17 -0800 | [diff] [blame] | 87 | namespace = "androidx.savedstate.compose" |
Marcello Galhardo | 7aaec16 | 2024-12-03 11:30:10 +0000 | [diff] [blame] | 88 | experimentalProperties["android.lint.useK2Uast"] = false // TODO(b/345531033) |
| 89 | } |
| 90 | |
| 91 | androidx { |
| 92 | name = "Saved State Compose" |
| 93 | type = LibraryType.PUBLISHED_LIBRARY |
| 94 | samples(project(":savedstate:savedstate-compose")) |
| 95 | inceptionYear = "2018" |
| 96 | description = "Compose integration with Saved State" |
Marcello Galhardo | 7aaec16 | 2024-12-03 11:30:10 +0000 | [diff] [blame] | 97 | metalavaK2UastEnabled = false |
| 98 | kotlinTarget = KotlinTarget.KOTLIN_1_9 |
| 99 | } |