| /** |
| * This file was created using the `createProject` gradle task (./gradlew createProject) |
| * |
| * Please use the task 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") |
| } |
| |
| androidXMultiplatform { |
| androidLibrary { |
| namespace = "androidx.lifecycle.runtime" |
| withJava() |
| optimization { |
| it.consumerKeepRules.publish = true |
| it.consumerKeepRules.files.add(new File("proguard-rules.pro")) |
| } |
| androidResources.enable = true |
| } |
| desktop() |
| mac() |
| linux() |
| ios() |
| watchos() |
| tvos() |
| mingwX64() |
| js() |
| wasmJs() |
| |
| defaultPlatform(PlatformIdentifier.ANDROID) |
| |
| sourceSets { |
| configureEach { |
| languageSettings.optIn("kotlin.experimental.ExperimentalNativeApi") |
| } |
| commonMain.dependencies { |
| api(project(":lifecycle:lifecycle-common")) |
| api("androidx.annotation:annotation:1.9.1") |
| implementation("androidx.collection:collection:1.5.0") |
| } |
| |
| commonTest.dependencies { |
| implementation(project(":internal-testutils-lifecycle")) |
| implementation(libs.kotlinCoroutinesTest) |
| implementation(libs.kotlinTest) |
| implementation(project(":kruth:kruth")) |
| implementation(libs.atomicFu) |
| } |
| |
| jvmAndAndroidMain.dependencies { |
| api("androidx.arch.core:core-common:2.2.0") |
| } |
| |
| desktopTest.dependencies { |
| implementation(libs.kotlinCoroutinesSwing) |
| } |
| |
| androidMain { |
| kotlin.srcDirs += "src/androidMain/java" |
| dependencies { |
| api(libs.kotlinCoroutinesAndroid) |
| api(libs.jspecify) |
| implementation("androidx.core:core-viewtree:1.0.0") |
| implementation("androidx.arch.core:core-runtime:2.2.0") |
| implementation("androidx.profileinstaller:profileinstaller:1.4.0") |
| } |
| } |
| |
| androidHostTest.dependencies { |
| implementation(libs.junit) |
| implementation(libs.mockitoCore4) |
| } |
| |
| androidDeviceTest.dependencies { |
| implementation("androidx.core:core-viewtree:1.0.0") |
| implementation(libs.junit) |
| implementation(libs.truth) |
| implementation(libs.testExtJunit) |
| implementation(libs.testCore) |
| implementation(libs.testRunner) |
| implementation(libs.kotlinCoroutinesTest) |
| } |
| |
| webTest.dependencies { |
| implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0") |
| implementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.9.0") |
| } |
| } |
| } |
| |
| dependencies { |
| lintPublish(project(":lifecycle:lifecycle-runtime-lint")) |
| |
| constraints { |
| // Prevents symbols duplication with old versions of JetBrains' fork. |
| // Starting with version 2.9.5, this module is published as empty artifact with dependency |
| // to this androidx module. |
| commonMainImplementation("org.jetbrains.androidx.lifecycle:lifecycle-runtime:2.9.5") { |
| because "prevents symbols duplication" |
| } |
| } |
| } |
| |
| androidx { |
| name = "Lifecycle Runtime" |
| type = SoftwareType.PUBLISHED_LIBRARY |
| inceptionYear = "2017" |
| description = "Android Lifecycle Runtime" |
| } |