blob: cf4996520b1cf0555e6656ba8a19cadc95db552f [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.LibraryType
import androidx.build.PlatformIdentifier
plugins {
id("AndroidXPlugin")
id("AndroidXComposePlugin")
id("com.android.library")
}
androidXMultiplatform {
android()
jvmStubs()
linuxX64Stubs()
defaultPlatform(PlatformIdentifier.ANDROID)
sourceSets {
commonMain {
dependencies {
implementation(libs.kotlinStdlibCommon)
implementation(libs.kotlinCoroutinesCore)
implementation(project(":collection:collection"))
}
}
commonTest {
dependencies {
implementation kotlin("test-junit")
implementation(libs.kotlinCoroutinesTest)
implementation(libs.kotlinReflect)
implementation(project(":compose:runtime:runtime-test-utils"))
}
}
nonEmulatorCommonMain {
dependsOn(commonMain)
}
nonEmulatorCommonTest {
dependsOn(commonTest)
}
nonEmulatorJvmMain {
dependsOn(nonEmulatorCommonMain)
}
nonEmulatorJvmTest {
dependsOn(nonEmulatorCommonTest)
}
jvmMain {
dependsOn(nonEmulatorJvmMain)
dependencies {
implementation(libs.kotlinStdlib)
api(libs.kotlinCoroutinesCore)
}
}
jvmTest {
dependsOn(commonTest)
}
androidMain {
dependsOn(jvmMain)
dependencies {
api(libs.kotlinCoroutinesAndroid)
api("androidx.annotation:annotation-experimental:1.4.1")
}
}
androidInstrumentedTest {
dependsOn(jvmTest)
dependencies {
implementation(libs.testExtJunit)
implementation(libs.testRules)
implementation(libs.testRunner)
implementation(libs.truth)
}
}
androidUnitTest {
dependsOn(jvmTest)
dependsOn(nonEmulatorJvmTest)
}
nonAndroidMain {
dependsOn(commonMain)
}
commonStubsMain {
dependsOn(nonAndroidMain)
}
jvmStubsMain {
dependsOn(commonStubsMain)
}
jvmStubsTest {
dependsOn(jvmTest)
}
linuxx64StubsMain {
dependsOn(commonStubsMain)
}
}
}
dependencies {
lintChecks(project(":compose:runtime:runtime-lint"))
lintPublish(project(":compose:runtime:runtime-lint"))
}
android {
defaultConfig {
consumerProguardFiles 'proguard-rules.pro'
}
namespace "androidx.compose.runtime"
}
androidx {
name = "Compose Runtime"
type = LibraryType.PUBLISHED_LIBRARY_ONLY_USED_BY_KOTLIN_CONSUMERS
inceptionYear = "2019"
description = "Tree composition support for code generated by the Compose compiler plugin and corresponding public API"
legacyDisableKotlinStrictApiMode = true
samples(project(":compose:runtime:runtime:runtime-samples"))
}