blob: 5aa799552cd2a4b2fc7f68730576a2ef5feb47ff [file] [log] [blame]
/*
* 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 `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
plugins {
id("AndroidXPlugin")
id("AndroidXComposePlugin")
alias(libs.plugins.kotlinSerialization)
}
androidXMultiplatform {
androidLibrary {
compileSdk = 36
namespace = "androidx.navigation3.ui"
androidResources.enable = true
}
jvmStubs()
linuxX64Stubs()
defaultPlatform(PlatformIdentifier.ANDROID)
sourceSets {
commonMain {
dependencies {
api(project(":navigation3:navigation3-runtime"))
api(project(":navigationevent:navigationevent-compose"))
api("androidx.compose.animation:animation:1.9.0-rc01")
api("androidx.compose.runtime:runtime:1.9.0-rc01")
api("androidx.compose.runtime:runtime-saveable:1.9.0-rc01")
api("androidx.compose.ui:ui:1.9.0-rc01")
api("androidx.savedstate:savedstate:1.3.0")
api("androidx.savedstate:savedstate-compose:1.3.0")
implementation("androidx.annotation:annotation:1.8.0")
implementation(libs.kotlinStdlib)
implementation("androidx.collection:collection:1.4.5")
// TODO pin lifecycle:lifecycle-runtime to the version that contains the `LifecycleOwner` composable api when it is released
implementation(project(":lifecycle:lifecycle-runtime"))
implementation(project(":lifecycle:lifecycle-runtime-compose"))
}
}
commonTest {
dependencies {
implementation(libs.kotlinTest)
implementation(project(":kruth:kruth"))
implementation(project(":compose:runtime:runtime-test-utils"))
implementation(project(":navigationevent:navigationevent-testing"))
}
}
jvmMain {
dependsOn(commonMain)
dependencies {
}
}
androidMain {
dependsOn(jvmMain)
dependencies {
api(project(":activity:activity-compose"))
}
}
jvmTest {
dependsOn(commonTest)
dependencies {
}
}
androidInstrumentedTest {
dependsOn(jvmTest)
dependencies {
implementation(project(":activity:activity-compose"))
implementation(libs.testRules)
implementation(libs.testRunner)
implementation(libs.junit)
implementation(libs.testExtJunitKtx)
implementation(libs.truth)
implementation("androidx.compose.material3:material3:1.3.1")
implementation(project(":compose:test-utils"))
implementation("androidx.compose.ui:ui-test:1.7.5")
implementation("androidx.compose.ui:ui-test-junit4:1.7.5")
implementation(libs.kotlinSerializationCore)
}
}
commonStubsMain {
dependsOn(commonMain)
}
jvmStubsMain {
dependsOn(commonStubsMain)
}
}
}
androidx {
name = "Androidx Navigation 3 UI"
type = SoftwareType.PUBLISHED_LIBRARY_ONLY_USED_BY_KOTLIN_CONSUMERS
inceptionYear = "2024"
description = "Provides a Navigation3 display that uses the building blocks from runtime to " +
"create a higher level solution."
samples(project(":navigation3:navigation3-ui:navigation3-ui-samples"))
addGoldenImageAssets()
}