blob: 91a0069d7bed87770ec2b3c1b9612c82a3725eac [file] [log] [blame]
/*
* Copyright 2019 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.KotlinTarget
import androidx.build.LibraryType
import androidx.build.PlatformIdentifier
plugins {
id("AndroidXPlugin")
id("com.android.library")
id("AndroidXComposePlugin")
}
androidXMultiplatform {
android()
jvmStubs()
linuxX64Stubs()
defaultPlatform(PlatformIdentifier.ANDROID)
sourceSets {
commonMain {
dependencies {
implementation(libs.kotlinStdlib)
api(project(":collection:collection"))
api(project(":compose:animation:animation"))
api(project(":compose:runtime:runtime"))
api(project(":compose:ui:ui"))
implementation(project(":compose:ui:ui-text"))
implementation(project(":compose:ui:ui-util"))
implementation(project(":compose:foundation:foundation-layout"))
implementation(project(":performance:performance-annotation"))
}
}
commonTest {
dependencies {
implementation(libs.kotlinTest)
implementation(libs.kotlinCoroutinesTest)
}
}
jvmMain {
dependsOn(commonMain)
dependencies {
}
}
androidMain {
dependsOn(jvmMain)
dependencies {
api("androidx.annotation:annotation:1.8.1")
api("androidx.annotation:annotation-experimental:1.4.1")
implementation("androidx.emoji2:emoji2:1.3.0")
implementation("androidx.core:core:1.13.1")
}
}
commonStubsMain {
dependsOn(commonMain)
}
nonAndroidStubsMain {
dependsOn(commonStubsMain)
}
jvmStubsMain {
dependsOn(nonAndroidStubsMain)
}
linuxx64StubsMain {
dependsOn(nonAndroidStubsMain)
}
androidInstrumentedTest {
dependsOn(commonTest)
dependencies {
implementation(project(":compose:test-utils"))
implementation(project(":internal-testutils-fonts"))
implementation(project(":test:screenshot:screenshot"))
implementation(project(":internal-testutils-runtime"))
implementation("androidx.activity:activity-compose:1.3.1")
implementation("androidx.lifecycle:lifecycle-runtime:2.6.1")
implementation("androidx.savedstate:savedstate:1.2.1")
implementation(libs.testUiautomator)
implementation(libs.testRules)
implementation(libs.testRunner)
implementation(libs.testMonitor)
implementation(libs.espressoCore)
implementation(libs.junit)
implementation(libs.truth)
implementation(libs.dexmakerMockito)
implementation(libs.mockitoCore)
implementation(libs.mockitoKotlin)
implementation(libs.leakcanary)
implementation(libs.leakcanaryInstrumentation)
}
}
androidUnitTest {
dependsOn(commonTest)
dependencies {
implementation(libs.testRules)
implementation(libs.testRunner)
implementation(libs.junit)
implementation(libs.truth)
implementation(libs.kotlinReflect)
implementation(libs.mockitoCore4)
implementation(libs.mockitoKotlin4)
implementation(libs.dexmakerMockitoInlineExtended)
implementation(libs.byteBuddy)
implementation(project(":constraintlayout:constraintlayout-compose"))
}
}
}
}
dependencies {
lintChecks(project(":compose:foundation:foundation-lint"))
lintPublish(project(":compose:foundation:foundation-lint"))
}
android {
compileSdk = 35
namespace = "androidx.compose.foundation"
buildTypes.configureEach {
consumerProguardFiles("proguard-rules.pro")
}
// TODO(b/345531033)
experimentalProperties["android.lint.useK2Uast"] = false
}
androidx {
name = "Compose Foundation"
type = LibraryType.PUBLISHED_LIBRARY_ONLY_USED_BY_KOTLIN_CONSUMERS
inceptionYear = "2018"
description = "Higher level abstractions of the Compose UI primitives. This library is design system agnostic, providing the high-level building blocks for both application and design-system developers"
legacyDisableKotlinStrictApiMode = true
metalavaK2UastEnabled = false
samples(project(":compose:foundation:foundation:foundation-samples"))
kotlinTarget = KotlinTarget.KOTLIN_1_9
addGoldenImageAssets()
}