| /* |
| * 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 org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
| |
| plugins { |
| id("AndroidXPlugin") |
| id("com.android.library") |
| id("AndroidXComposePlugin") |
| } |
| |
| AndroidXComposePlugin.applyAndConfigureKotlinPlugin(project) |
| |
| dependencies { |
| kotlinPlugin(projectOrArtifact(":compose:compiler:compiler")) |
| |
| if(!AndroidXComposePlugin.isMultiplatformEnabled(project)) { |
| androidTestImplementation(projectOrArtifact(":compose:ui:ui")) |
| androidTestImplementation(projectOrArtifact(":compose:ui:ui-test-junit4")) |
| androidTestImplementation(project(":compose:runtime:runtime")) |
| androidTestImplementation(projectOrArtifact(":compose:test-utils")) |
| androidTestImplementation(projectOrArtifact(":activity:activity-compose")) |
| |
| androidTestImplementation(libs.junit) |
| androidTestImplementation(libs.kotlinTestJunit) |
| androidTestImplementation(libs.testExtJunit) |
| androidTestImplementation(libs.testCore) |
| androidTestImplementation(libs.testRunner) |
| androidTestImplementation(libs.testRules) |
| androidTestImplementation(libs.kotlinStdlib) |
| androidTestImplementation(libs.kotlinReflect) |
| androidTestImplementation(libs.truth) |
| } |
| } |
| |
| 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) |
| implementation(libs.kotlinCoroutinesCore) |
| implementation(projectOrArtifact(":compose:ui:ui")) |
| } |
| jvmMain.dependencies { |
| implementation(libs.kotlinStdlib) |
| api(libs.kotlinCoroutinesCore) |
| } |
| androidMain.dependencies { |
| api(libs.kotlinCoroutinesAndroid) |
| api("androidx.annotation:annotation:1.1.0") |
| |
| implementation("androidx.core:core-ktx:1.1.0") |
| } |
| desktopMain.dependencies { |
| api(libs.kotlinCoroutinesSwing) |
| } |
| |
| commonTest.dependencies { |
| implementation(kotlin("test-junit")) |
| } |
| androidAndroidTest.dependencies { |
| implementation(projectOrArtifact(":compose:ui:ui")) |
| implementation(projectOrArtifact(":compose:ui:ui-test-junit4")) |
| implementation(projectOrArtifact(":compose:test-utils")) |
| implementation(projectOrArtifact(":activity:activity-compose")) |
| implementation(libs.testExtJunit) |
| implementation(libs.testRules) |
| implementation(libs.testRunner) |
| implementation(libs.truth) |
| } |
| } |
| } |
| } |
| |
| tasks.withType(KotlinCompile).configureEach { |
| kotlinOptions { |
| incremental = false |
| } |
| } |