| /** |
| * This file was created using the `create_project.py` script located in the |
| * `<AndroidX root>/development/project-creator` directory. |
| * |
| * Please use that script when creating a new project, rather than copying an existing project and |
| * modifying its settings. |
| */ |
| |
| import androidx.build.SoftwareType |
| import androidx.build.PlatformIdentifier |
| import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType |
| |
| plugins { |
| id("AndroidXPlugin") |
| alias(libs.plugins.kotlinSerialization) |
| } |
| |
| androidXMultiplatform { |
| androidLibrary { |
| namespace = "androidx.savedstate.compose" |
| optimization { |
| it.consumerKeepRules.publish = true |
| it.consumerKeepRules.files.add(new File("proguard-rules.pro")) |
| } |
| } |
| desktop() |
| mingwX64() |
| linux() |
| mac() |
| ios() |
| tvos() |
| watchos() |
| js() |
| wasmJs() |
| |
| defaultPlatform(PlatformIdentifier.ANDROID) |
| |
| sourceSets { |
| commonMain { |
| dependencies { |
| api(project(":savedstate:savedstate")) |
| api("androidx.compose.runtime:runtime:1.9.0") |
| } |
| } |
| |
| commonTest { |
| dependencies { |
| implementation(project(":kruth:kruth")) |
| implementation(libs.kotlinTest) |
| implementation(libs.kotlinTestCommon) |
| implementation(libs.kotlinTestAnnotationsCommon) |
| implementation(libs.kotlinCoroutinesTest) |
| } |
| } |
| |
| androidMain { |
| dependsOn(commonMain) |
| dependencies { |
| api("androidx.annotation:annotation:1.9.1") |
| implementation("androidx.core:core-ktx:1.13.1") |
| } |
| } |
| |
| androidInstrumentedTest { |
| dependsOn(commonTest) |
| dependencies { |
| implementation(libs.testExtJunit) |
| implementation(libs.testCore) |
| implementation(libs.testRunner) |
| implementation(libs.testRules) |
| } |
| } |
| |
| nonAndroidMain { |
| dependsOn(commonMain) |
| } |
| |
| nonAndroidTest { |
| dependsOn(commonTest) |
| } |
| |
| desktopMain { |
| dependsOn(nonAndroidMain) |
| } |
| |
| desktopTest { |
| dependsOn(nonAndroidTest) |
| } |
| |
| nativeMain { |
| dependsOn(nonAndroidMain) |
| } |
| |
| nativeTest { |
| dependsOn(nonAndroidTest) |
| } |
| |
| webMain { |
| dependsOn(nonAndroidMain) |
| } |
| |
| webTest { |
| dependsOn(nonAndroidTest) |
| } |
| |
| targets.configureEach { target -> |
| if (target.platformType == KotlinPlatformType.native) { |
| target.compilations["main"].defaultSourceSet.dependsOn(nativeMain) |
| target.compilations["test"].defaultSourceSet.dependsOn(nativeTest) |
| } else if (target.platformType in [KotlinPlatformType.js, KotlinPlatformType.wasm]) { |
| target.compilations["main"].defaultSourceSet.dependsOn(webMain) |
| target.compilations["test"].defaultSourceSet.dependsOn(webTest) |
| } |
| } |
| } |
| } |
| |
| androidx { |
| name = "Saved State Compose" |
| type = SoftwareType.PUBLISHED_LIBRARY |
| samples(project(":savedstate:savedstate-compose")) |
| inceptionYear = "2024" |
| description = "Compose integration with Saved State" |
| } |