[go: nahoru, domu]

blob: 3eb2f0b73389e974f4c866984945da827c0a152f [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.LibraryType
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-rc02")
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, excludes.bytebuddy)
// DexMaker has it"s own MockMaker
androidTestImplementation(MOCKITO_CORE, excludes.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.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-rc02")
}
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, excludes.bytebuddy)
// DexMaker has it"s own MockMaker
implementation(MOCKITO_CORE, excludes.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"
type = LibraryType.PUBLISHED_LIBRARY
mavenGroup = LibraryGroups.Compose.UI
inceptionYear = "2019"
description = "Compose Text primitives and utilities"
legacyDisableKotlinStrictApiMode = true
}
tasks.withType(KotlinCompile).configureEach {
kotlinOptions {
freeCompilerArgs += ["-XXLanguage:+InlineClasses"]
}
}