1/* 2 * Copyright 2019 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 api(project(":compose:ui:ui")) 46 implementation(project(":compose:runtime:runtime")) 47 implementation(project(":compose:ui:ui-util")) 48 implementation(project(":collection:collection")) 49 implementation(project(":compose:ui:ui-unit")) 50 } 51 } 52 53 commonTest { 54 dependencies { 55 } 56 } 57 58 jvmMain { 59 dependsOn(commonMain) 60 dependencies { 61 } 62 } 63 64 androidMain { 65 dependsOn(jvmMain) 66 dependencies { 67 api("androidx.annotation:annotation:1.8.1") 68 api("androidx.annotation:annotation-experimental:1.4.1") 69 implementation("androidx.core:core:1.7.0") 70 implementation("androidx.compose.animation:animation-core:1.2.1") 71 } 72 } 73 74 commonStubsMain { 75 dependsOn(commonMain) 76 } 77 78 jvmStubsMain { 79 dependsOn(commonStubsMain) 80 } 81 82 linuxx64StubsMain { 83 dependsOn(commonStubsMain) 84 } 85 86 androidInstrumentedTest { 87 dependsOn(commonTest) 88 dependencies { 89 implementation(project(":compose:foundation:foundation")) 90 implementation("androidx.compose.ui:ui-test-junit4:1.2.1") 91 implementation(project(":compose:test-utils")) 92 implementation("androidx.activity:activity-compose:1.3.1") 93 94 implementation(libs.testRules) 95 implementation(libs.testRunner) 96 implementation(libs.junit) 97 implementation(libs.truth) 98 } 99 } 100 101 androidUnitTest { 102 dependsOn(commonTest) 103 dependencies { 104 implementation(libs.testRules) 105 implementation(libs.testRunner) 106 implementation(libs.junit) 107 implementation(libs.truth) 108 } 109 } 110 } 111} 112 113androidx { 114 name = "Compose Layouts" 115 type = SoftwareType.PUBLISHED_LIBRARY_ONLY_USED_BY_KOTLIN_CONSUMERS 116 inceptionYear = "2019" 117 description = "Compose layout implementations" 118 legacyDisableKotlinStrictApiMode = true 119 metalavaK2UastEnabled = false 120 samples(project(":compose:foundation:foundation-layout:foundation-layout-samples")) 121} 122 123android { 124 compileSdk = 35 125 namespace = "androidx.compose.foundation.layout" 126 buildTypes.configureEach { 127 consumerProguardFiles("proguard-rules.pro") 128 } 129} 130