1/* 2 * Copyright 2020 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17/** 18 * This file was created using the `create_project.py` script located in the 19 * `<AndroidX root>/development/project-creator` directory. 20 * 21 * Please use that script when creating a new project, rather than copying an existing project and 22 * modifying its settings. 23 */ 24 25import androidx.build.SoftwareType 26import androidx.build.PlatformIdentifier 27 28plugins { 29 id("AndroidXPlugin") 30 id("com.android.library") 31 id("AndroidXComposePlugin") 32} 33 34androidXMultiplatform { 35 androidTarget() 36 jvmStubs() 37 linuxX64Stubs() 38 39 defaultPlatform(PlatformIdentifier.ANDROID) 40 41 sourceSets { 42 commonMain { 43 dependencies { 44 implementation(libs.kotlinStdlib) 45 implementation("androidx.collection:collection:1.4.3") 46 } 47 } 48 49 commonTest { 50 dependencies { 51 implementation(libs.kotlinTest) 52 } 53 } 54 55 jvmMain { 56 dependsOn(commonMain) 57 dependencies { 58 } 59 } 60 61 androidMain { 62 dependsOn(jvmMain) 63 dependencies { 64 api("androidx.annotation:annotation-experimental:1.4.1") 65 } 66 } 67 68 commonStubsMain { 69 dependsOn(commonMain) 70 } 71 72 jvmStubsMain { 73 dependsOn(commonStubsMain) 74 } 75 76 linuxx64StubsMain { 77 dependsOn(commonStubsMain) 78 } 79 80 androidInstrumentedTest { 81 dependsOn(commonTest) 82 dependencies { 83 } 84 } 85 86 androidUnitTest { 87 dependsOn(commonTest) 88 dependencies { 89 implementation(libs.truth) 90 } 91 } 92 } 93} 94 95androidx { 96 name = "Compose Util" 97 type = SoftwareType.PUBLISHED_LIBRARY_ONLY_USED_BY_KOTLIN_CONSUMERS 98 inceptionYear = "2020" 99 description = "Internal Compose utilities used by other modules" 100 legacyDisableKotlinStrictApiMode = true 101} 102 103androidxCompose { 104 composeCompilerPluginEnabled = false 105} 106 107android { 108 namespace = "androidx.compose.ui.util" 109 buildTypes.configureEach { 110 consumerProguardFiles("proguard-rules.pro") 111 } 112} 113