1/* 2 * Copyright (C) 2023 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 27import org.jetbrains.kotlin.gradle.tasks.KotlinCompile 28 29plugins { 30 id("AndroidXPlugin") 31 id("AndroidXComposePlugin") 32} 33 34androidXMultiplatform { 35 androidLibrary { 36 namespace = "androidx.compose.material3.common" 37 withAndroidTestOnDeviceBuilder { 38 it.compilationName = "instrumentedTest" 39 it.defaultSourceSetName = "androidInstrumentedTest" 40 it.sourceSetTreeName = "test" 41 } 42 withAndroidTestOnJvmBuilder { 43 it.defaultSourceSetName = "androidUnitTest" 44 } 45 46 compileSdk = 35 47 aarMetadata.minCompileSdk = 35 48 } 49 jvmStubs() 50 linuxX64Stubs() 51 52 defaultPlatform(PlatformIdentifier.ANDROID) 53 54 sourceSets { 55 commonMain { 56 dependencies { 57 implementation(libs.kotlinStdlib) 58 implementation("androidx.compose.ui:ui-util:1.7.1") 59 api("androidx.compose.foundation:foundation:1.7.1") 60 api("androidx.compose.foundation:foundation-layout:1.7.1") 61 api(project(":compose:runtime:runtime")) 62 api("androidx.compose.ui:ui-graphics:1.7.1") 63 api("androidx.compose.ui:ui-text:1.7.1") 64 } 65 } 66 67 commonTest { 68 dependencies { 69 } 70 } 71 72 jvmMain { 73 dependsOn(commonMain) 74 dependencies { 75 } 76 } 77 78 androidMain { 79 dependsOn(jvmMain) 80 dependencies { 81 api("androidx.annotation:annotation:1.8.1") 82 } 83 } 84 85 commonStubsMain { 86 dependsOn(commonMain) 87 } 88 89 jvmStubsMain { 90 dependsOn(commonStubsMain) 91 } 92 93 linuxx64StubsMain { 94 dependsOn(commonStubsMain) 95 } 96 97 androidInstrumentedTest { 98 dependsOn(commonTest) 99 dependencies { 100 implementation(project(":compose:material3:material3")) 101 implementation(project(":compose:material3:material3-common")) 102 implementation("androidx.compose.material:material-icons-core:1.6.8") 103 implementation(project(":compose:test-utils")) 104 implementation(libs.testRules) 105 implementation(libs.junit) 106 implementation(libs.truth) 107 } 108 } 109 } 110} 111 112 113androidx { 114 name = "Compose Material 3 Common" 115 mavenVersion = LibraryVersions.COMPOSE_MATERIAL3_COMMON 116 type = SoftwareType.PUBLISHED_LIBRARY_ONLY_USED_BY_KOTLIN_CONSUMERS 117 inceptionYear = "2023" 118 description = "Compose Material 3 Common Library. This library contains foundational, themeless " + 119 "components that can be shared between different Material libraries or used by app" + 120 " developers. It builds upon the Jetpack Compose libraries." 121 legacyDisableKotlinStrictApiMode = true 122 samples(project(":compose:material3:material3-common:material3-common-samples")) 123} 124