blob: 523b902628a4b995cf2c1c96fead9507deb4612e [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.AndroidXUiPlugin
import androidx.build.LibraryGroups
import androidx.build.Publish
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import static androidx.build.dependencies.DependenciesKt.*
plugins {
id("AndroidXPlugin")
id("com.android.library")
id("AndroidXUiPlugin")
}
AndroidXUiPlugin.applyAndConfigureKotlinPlugin(project)
if(!AndroidXUiPlugin.isMultiplatformEnabled(project)) {
dependencies {
/*
* When updating dependencies, make sure to make the an an analogous update in the
* corresponding block below
*/
implementation(KOTLIN_STDLIB_COMMON)
api project(":compose:ui:ui-graphics")
api project(":compose:ui:ui-unit")
api "androidx.annotation:annotation:1.1.0"
implementation project(":compose:runtime:runtime")
implementation project(":compose:runtime:runtime-saveable")
implementation project(":compose:ui:ui-util")
implementation(KOTLIN_STDLIB)
implementation "androidx.collection:collection:1.1.0"
implementation "androidx.core:core:1.5.0-alpha01"
testImplementation project(":compose:ui:ui-test-font")
testImplementation(ANDROIDX_TEST_RULES)
testImplementation(ANDROIDX_TEST_RUNNER)
testImplementation(JUNIT)
testImplementation(MOCKITO_CORE)
testImplementation(TRUTH)
testImplementation(KOTLIN_REFLECT)
testImplementation MOCKITO_KOTLIN, {
exclude group: 'org.mockito' // to keep control on the mockito version
}
androidTestImplementation project(":compose:ui:ui-test-font")
androidTestImplementation project(":compose:ui:ui-test-junit4")
androidTestImplementation(ANDROIDX_TEST_RULES)
androidTestImplementation(ANDROIDX_TEST_RUNNER)
androidTestImplementation(ESPRESSO_CORE)
androidTestImplementation(JUNIT)
androidTestImplementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
// DexMaker has it"s own MockMaker
androidTestImplementation(MOCKITO_CORE, libs.exclude_bytebuddy)
androidTestImplementation(TRUTH)
androidTestImplementation MOCKITO_KOTLIN, {
exclude group: 'org.mockito' // to keep control on the mockito version
}
}
android {
sourceSets {
main {
java.srcDirs += "../../../text/text/src/main/java"
}
}
}
}
if(AndroidXUiPlugin.isMultiplatformEnabled(project)) {
kotlin {
android()
jvm("desktop")
/*
* When updating dependencies, make sure to make the an an analogous update in the
* corresponding block below
*/
sourceSets {
commonMain.dependencies {
implementation(KOTLIN_STDLIB_COMMON)
api project(":compose:ui:ui-graphics")
api project(":compose:ui:ui-unit")
implementation project(":compose:runtime:runtime")
implementation project(":compose:runtime:runtime-saveable")
implementation project(":compose:ui:ui-util")
}
jvmMain.dependencies {
implementation(KOTLIN_STDLIB)
}
desktopMain.dependsOn jvmMain
androidMain.dependencies {
api "androidx.annotation:annotation:1.1.0"
implementation "androidx.collection:collection:1.1.0"
implementation "androidx.core:core:1.5.0-alpha01"
}
androidMain.kotlin.srcDirs("../../../text/text/src/main/java")
androidTest.dependencies {
implementation project(":compose:ui:ui-test-font")
implementation(ANDROIDX_TEST_RULES)
implementation(ANDROIDX_TEST_RUNNER)
implementation(JUNIT)
implementation(MOCKITO_CORE)
implementation(TRUTH)
implementation(KOTLIN_REFLECT)
implementation MOCKITO_KOTLIN, {
exclude group: 'org.mockito' // to keep control on the mockito version
}
}
androidAndroidTest.dependencies {
implementation project(":compose:ui:ui-test-junit4")
implementation project(":compose:ui:ui-test-font")
implementation(ANDROIDX_TEST_RULES)
implementation(ANDROIDX_TEST_RUNNER)
implementation(ESPRESSO_CORE)
implementation(JUNIT)
implementation(DEXMAKER_MOCKITO, libs.exclude_bytebuddy)
// DexMaker has it"s own MockMaker
implementation(MOCKITO_CORE, libs.exclude_bytebuddy)
implementation(TRUTH)
implementation MOCKITO_KOTLIN, {
exclude group: 'org.mockito' // to keep control on the mockito version
}
}
desktopTest.dependencies {
implementation(TRUTH)
implementation(JUNIT)
implementation(SKIKO_CURRENT_OS)
implementation project(":compose:foundation:foundation")
implementation project(":compose:ui:ui-test-junit4")
implementation project(":compose:ui:ui-test-font")
}
}
}
}
androidx {
name = "Compose UI Text"
publish = Publish.SNAPSHOT_AND_RELEASE
mavenGroup = LibraryGroups.Compose.UI
inceptionYear = "2019"
description = "Compose Text primitives and utilities"
legacyDisableKotlinStrictApiMode = true
}
tasks.withType(KotlinCompile).configureEach {
kotlinOptions {
freeCompilerArgs += ["-XXLanguage:+InlineClasses"]
}
}
android.buildTypes.all {
testCoverageEnabled = false
}