| /* |
| * 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 |
| import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
| |
| 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 above |
| */ |
| api("androidx.annotation:annotation:1.1.0") |
| api("androidx.compose.animation:animation:1.1.0-rc01") |
| api("androidx.compose.runtime:runtime:1.1.0-rc01") |
| api(project(':compose:ui:ui')) |
| |
| implementation(libs.kotlinStdlibCommon) |
| implementation(project(":compose:foundation:foundation-layout")) |
| implementation("androidx.compose.ui:ui-graphics:1.1.0-rc01") |
| implementation("androidx.compose.ui:ui-text:1.0.0") |
| implementation("androidx.compose.ui:ui-util:1.0.0") |
| |
| testImplementation(project(":compose:test-utils")) |
| testImplementation(libs.testRules) |
| testImplementation(libs.testRunner) |
| testImplementation(libs.junit) |
| testImplementation(libs.truth) |
| testImplementation(libs.kotlinCoroutinesTest) |
| testImplementation(libs.mockitoCore) |
| testImplementation(libs.kotlinReflect) |
| testImplementation(libs.mockitoKotlin) |
| |
| androidTestImplementation(project(":compose:test-utils")) |
| androidTestImplementation(project(":compose:ui:ui-test-font")) |
| androidTestImplementation(project(":test:screenshot:screenshot")) |
| androidTestImplementation(project(":internal-testutils-runtime")) |
| androidTestImplementation(libs.testUiautomator) |
| androidTestImplementation(libs.testRules) |
| androidTestImplementation(libs.testRunner) |
| androidTestImplementation "androidx.activity:activity-compose:1.3.1" |
| androidTestImplementation(libs.espressoCore) |
| androidTestImplementation(libs.junit) |
| androidTestImplementation(libs.truth) |
| androidTestImplementation(libs.dexmakerMockito) |
| androidTestImplementation(libs.mockitoCore) |
| androidTestImplementation(libs.mockitoKotlin) |
| |
| samples(project(":compose:foundation:foundation:foundation-samples")) |
| } |
| } |
| |
| if(AndroidXComposePlugin.isMultiplatformEnabled(project)) { |
| androidXComposeMultiplatform { |
| android() |
| desktop() |
| } |
| |
| kotlin { |
| /* |
| * 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')) |
| api(project(':compose:runtime:runtime')) |
| api(project(':compose:ui:ui')) |
| implementation(project(":compose:ui:ui-text")) |
| implementation(project(":compose:ui:ui-util")) |
| implementation(project(':compose:foundation:foundation-layout')) |
| } |
| 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.mockitoCore) |
| implementation(libs.truth) |
| implementation(libs.kotlinReflect) |
| implementation(libs.mockitoKotlin) |
| } |
| |
| commonTest.dependencies { |
| implementation(libs.kotlinCoroutinesTest) |
| } |
| |
| androidAndroidTest.dependencies { |
| implementation(project(":compose:test-utils")) |
| implementation(project(":compose:ui:ui-test-font")) |
| implementation(project(":test:screenshot:screenshot")) |
| implementation(project(":internal-testutils-runtime")) |
| implementation("androidx.activity:activity-compose:1.3.1") |
| |
| implementation(libs.testUiautomator) |
| implementation(libs.testRules) |
| implementation(libs.testRunner) |
| implementation(libs.espressoCore) |
| implementation(libs.junit) |
| implementation(libs.truth) |
| implementation(libs.dexmakerMockito) |
| implementation(libs.mockitoCore) |
| implementation(libs.mockitoKotlin) |
| } |
| |
| desktopTest.dependencies { |
| implementation(project(":compose:ui:ui-test-junit4")) |
| implementation(libs.truth) |
| implementation(libs.junit) |
| implementation(libs.skikoCurrentOs) |
| implementation(libs.mockitoCore) |
| implementation(libs.mockitoKotlin) |
| } |
| } |
| } |
| dependencies { |
| samples(project(":compose:foundation:foundation:foundation-samples")) |
| } |
| } |
| |
| // Screenshot tests related setup |
| android { |
| sourceSets.androidTest.assets.srcDirs += |
| project.rootDir.absolutePath + "/../../golden/compose/foundation/foundation" |
| } |
| |
| androidx { |
| name = "Compose Foundation" |
| type = LibraryType.PUBLISHED_LIBRARY |
| mavenGroup = LibraryGroups.Compose.FOUNDATION |
| inceptionYear = "2018" |
| description = "Higher level abstractions of the Compose UI primitives. This library is design system agnostic, providing the high-level building blocks for both application and design-system developers" |
| legacyDisableKotlinStrictApiMode = true |
| } |
| |
| tasks.withType(KotlinCompile).configureEach { |
| kotlinOptions { |
| freeCompilerArgs += ["-XXLanguage:+InlineClasses"] |
| } |
| } |