blob: 38af064b3afb1265a773c10f920bff5d62f75363 [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.
*/
import androidx.build.AndroidXComposePlugin
import androidx.build.LibraryGroups
import androidx.build.LibraryType
plugins {
id("AndroidXPlugin")
id("com.android.library")
id("AndroidXComposePlugin")
}
AndroidXComposePlugin.applyAndConfigureKotlinPlugin(project)
dependencies {
kotlinPlugin(project(":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("androidx.compose.animation:animation-core:1.0.0")
api(project(":compose:foundation:foundation"))
api(project(":compose:material:material-icons-core"))
api(project(":compose:material:material-ripple"))
api(project(":compose:runtime:runtime"))
api(project(":compose:ui:ui"))
api("androidx.compose.ui:ui-text:1.0.0")
implementation(libs.kotlinStdlibCommon)
implementation("androidx.compose.animation:animation:1.0.0")
implementation(project(":compose:foundation:foundation-layout"))
implementation("androidx.compose.ui:ui-util:1.0.0")
testImplementation(libs.testRules)
testImplementation(libs.testRunner)
testImplementation(libs.junit)
testImplementation(libs.truth)
androidTestImplementation(project(":compose:material:material:material-samples"))
androidTestImplementation(project(":compose:test-utils"))
androidTestImplementation(project(":test:screenshot:screenshot"))
androidTestImplementation(libs.testRules)
androidTestImplementation(libs.testRunner)
androidTestImplementation(libs.junit)
androidTestImplementation(libs.truth)
androidTestImplementation(libs.dexmakerMockito)
androidTestImplementation(libs.mockitoCore)
androidTestImplementation(libs.mockitoKotlin)
androidTestImplementation(libs.testUiautomator)
lintPublish project(":compose:material:material-lint")
samples(project(":compose:material:material:material-samples"))
}
}
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:animation:animation-core"))
api(project(":compose:foundation:foundation"))
api(project(":compose:material:material-icons-core"))
api(project(":compose:material:material-ripple"))
api(project(":compose:runtime:runtime"))
api(project(":compose:ui:ui"))
api(project(":compose:ui:ui-text"))
implementation(project(":compose:animation:animation"))
implementation(project(":compose:foundation:foundation-layout"))
implementation(project(":compose:ui:ui-util"))
}
androidMain.dependencies {
api("androidx.annotation:annotation:1.1.0")
}
desktopMain.dependencies {
implementation(libs.kotlinStdlib)
}
androidTest.dependencies {
implementation(libs.testRules)
implementation(libs.testRunner)
implementation(libs.junit)
implementation(libs.truth)
}
androidAndroidTest.dependencies {
implementation(project(":compose:material:material:material-samples"))
implementation(project(":compose:test-utils"))
implementation(project(":test:screenshot:screenshot"))
implementation(libs.testRules)
implementation(libs.testRunner)
implementation(libs.junit)
implementation(libs.truth)
implementation(libs.dexmakerMockito)
implementation(libs.mockitoCore)
implementation(libs.mockitoKotlin)
implementation(libs.testUiautomator)
}
}
}
dependencies {
samples(project(":compose:material:material:material-samples"))
}
}
androidx {
name = "Compose Material Components"
type = LibraryType.PUBLISHED_LIBRARY
mavenGroup = LibraryGroups.Compose.MATERIAL
inceptionYear = "2018"
description = "Compose Material Design Components library"
legacyDisableKotlinStrictApiMode = true
}
// Screenshot tests related setup
android {
sourceSets.androidTest.assets.srcDirs +=
project.rootDir.absolutePath + "/../../golden/compose/material/material"
}