blob: 1743df41f6f1c57d9563173bd7100f916bd2cf81 [file] [log] [blame]
/*
* Copyright 2020 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.
*/
import androidx.build.AndroidXComposePlugin
import androidx.build.LibraryGroups
import androidx.build.LibraryType
plugins {
id("AndroidXPlugin")
id("AndroidXComposePlugin")
id("com.android.library")
}
AndroidXComposePlugin.applyAndConfigureKotlinPlugin(project)
dependencies {
kotlinPlugin projectOrArtifact(":compose:compiler:compiler")
if(!AndroidXComposePlugin.isMultiplatformEnabled(project)) {
/* When updating dependencies, make sure to make the an an analogous update in the
corresponding block below */
api project(":compose:runtime:runtime")
api "androidx.annotation:annotation:1.1.0"
implementation(libs.kotlinStdlib)
testImplementation(libs.junit)
testImplementation(libs.truth)
testImplementation(libs.testCore)
testImplementation(libs.testRules)
androidTestImplementation projectOrArtifact(':compose:ui:ui')
androidTestImplementation projectOrArtifact(":compose:ui:ui-test-junit4")
androidTestImplementation projectOrArtifact(":compose:test-utils")
androidTestImplementation "androidx.fragment:fragment:1.3.0"
androidTestImplementation projectOrArtifact(":activity:activity-compose")
androidTestImplementation(libs.testUiautomator)
androidTestImplementation(libs.testCore)
androidTestImplementation(libs.testRules)
androidTestImplementation(libs.testRunner)
androidTestImplementation(libs.espressoCore)
androidTestImplementation(libs.junit)
androidTestImplementation(libs.truth)
androidTestImplementation(libs.dexmakerMockito)
androidTestImplementation(libs.mockitoCore)
lintPublish(project(":compose:runtime:runtime-saveable-lint"))
}
}
if(AndroidXComposePlugin.isMultiplatformEnabled(project)) {
kotlin {
android()
jvm("desktop")
/* When updating dependencies, make sure to make the an an analogous update in the
corresponding block above */
sourceSets {
commonMain.dependencies {
implementation(libs.kotlinStdlibCommon)
api project(":compose:runtime:runtime")
}
androidMain.dependencies {
implementation(libs.kotlinStdlib)
api "androidx.annotation:annotation:1.1.0"
}
androidTest.dependencies {
implementation(libs.testRules)
implementation(libs.testRunner)
implementation(libs.junit)
implementation(libs.truth)
}
androidAndroidTest.dependencies {
implementation project(':compose:ui:ui')
implementation project(":compose:ui:ui-test-junit4")
implementation project(":compose:test-utils")
implementation "androidx.fragment:fragment:1.3.0"
implementation project(":activity:activity-compose")
implementation(libs.testUiautomator)
implementation(libs.testCore)
implementation(libs.testRules)
implementation(libs.testRunner)
implementation(libs.espressoCore)
implementation(libs.junit)
implementation(libs.truth)
implementation(libs.dexmakerMockito)
implementation(libs.mockitoCore)
}
}
}
}
androidx {
name = "Compose Saveable"
type = LibraryType.PUBLISHED_LIBRARY
mavenGroup = LibraryGroups.Compose.RUNTIME
inceptionYear = "2020"
description = "Compose components that allow saving and restoring the local ui state"
legacyDisableKotlinStrictApiMode = true
}