| /* |
| * Copyright 2024 The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| /** |
| * 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 |
| |
| plugins { |
| id("AndroidXPlugin") |
| id("AndroidXComposePlugin") |
| } |
| |
| androidXMultiplatform { |
| androidLibrary { |
| compileSdk { version = release(37) } |
| namespace = "androidx.lifecycle.viewmodel.navigation3" |
| } |
| desktop() |
| mac() |
| linux() |
| ios() |
| watchos() |
| tvos() |
| mingwX64() |
| js() |
| wasmJs() |
| |
| defaultPlatform(PlatformIdentifier.ANDROID) |
| |
| sourceSets { |
| commonMain.dependencies { |
| api(project(":lifecycle:lifecycle-viewmodel")) |
| api(project(":lifecycle:lifecycle-viewmodel-compose")) |
| api(project(":lifecycle:lifecycle-viewmodel-savedstate")) |
| api("androidx.compose.runtime:runtime:1.10.4") |
| api("androidx.compose.runtime:runtime-saveable:1.10.4") |
| api("androidx.navigation3:navigation3-runtime:1.0.1") |
| api("androidx.savedstate:savedstate:1.3.2") |
| api("androidx.savedstate:savedstate-compose:1.3.2") |
| implementation("androidx.collection:collection:1.5.0") |
| } |
| |
| commonTest.dependencies { |
| implementation(libs.kotlinTest) |
| implementation(project(":kruth:kruth")) |
| implementation(project(":compose:runtime:runtime-test-utils")) |
| } |
| |
| androidMain.dependencies { |
| api("androidx.activity:activity-compose:1.12.0") |
| } |
| |
| androidDeviceTest.dependencies { |
| implementation(libs.testRules) |
| implementation(libs.testRunner) |
| implementation(libs.junit) |
| implementation(libs.testExtJunitKtx) |
| implementation(libs.truth) |
| implementation(project(":navigation3:navigation3-ui")) |
| implementation(project(":compose:test-utils")) |
| implementation("androidx.compose.animation:animation:1.9.0") |
| implementation(project(":compose:ui:ui-test")) |
| implementation(project(":compose:ui:ui-test-junit4")) |
| } |
| |
| create("nonAndroidMain").dependsOn(commonMain) |
| create("nonAndroidTest").dependsOn(commonTest) |
| |
| desktopMain.dependsOn(nonAndroidMain) |
| desktopTest.dependsOn(nonAndroidTest) |
| |
| nonJvmMain.dependsOn(nonAndroidMain) |
| nonJvmTest.dependsOn(nonAndroidTest) |
| } |
| } |
| |
| dependencies.constraints { |
| // TODO(mgalhardo): Add constraints to properly migrate from the JetBrains fork. |
| // We need to prevent symbol duplication with old versions of the fork. |
| // Once the fork publishes a version that redirects to this artifact. |
| } |
| |
| androidx { |
| name = "Androidx Lifecycle Navigation3 ViewModel" |
| type = SoftwareType.PUBLISHED_LIBRARY_ONLY_USED_BY_KOTLIN_CONSUMERS |
| inceptionYear = "2024" |
| description = "Provides the ViewModel wrapper for nav3." |
| } |