blob: a48d1c05d3a7ce8d1fe55b366cb8647d7a714bbb [file] [log] [blame]
Marcello Galhardo7aaec162024-12-03 11:30:10 +00001/**
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
9import androidx.build.KotlinTarget
10import androidx.build.LibraryType
11import androidx.build.PlatformIdentifier
Marcello Galhardo7aaec162024-12-03 11:30:10 +000012
13plugins {
14 id("AndroidXPlugin")
15 id("com.android.library")
16 alias(libs.plugins.kotlinSerialization)
17}
18
19androidXMultiplatform {
20 android()
21 jvmStubs()
22 linuxX64Stubs()
23
Marcello Galhardo7aaec162024-12-03 11:30:10 +000024 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
83android {
Marcello Galhardoa486a842024-12-03 12:48:04 +000084 buildTypes.configureEach {
85 consumerProguardFiles("proguard-rules.pro")
86 }
Aurimas Liutikas77952822024-12-04 18:00:17 -080087 namespace = "androidx.savedstate.compose"
Marcello Galhardo7aaec162024-12-03 11:30:10 +000088 experimentalProperties["android.lint.useK2Uast"] = false // TODO(b/345531033)
89}
90
91androidx {
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 Galhardo7aaec162024-12-03 11:30:10 +000097 metalavaK2UastEnabled = false
98 kotlinTarget = KotlinTarget.KOTLIN_1_9
99}