blob: 5a3d7f559df825fccdd2028fca7cb5d5402ab987 [file] [log] [blame]
Shane3c6ed482022-07-28 14:28:10 -07001/*
2 * Copyright (C) 2022 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
Shane3c6ed482022-07-28 14:28:10 -070017import androidx.build.LibraryType
Shane3c6ed482022-07-28 14:28:10 -070018
19plugins {
20 id("AndroidXPlugin")
21 id("com.android.library")
22 id("AndroidXComposePlugin")
23}
24
Jim S5930cd732023-04-12 02:33:37 -070025androidXMultiplatform {
26 android()
Shane3c6ed482022-07-28 14:28:10 -070027
Jim S5930cd732023-04-12 02:33:37 -070028 sourceSets {
29 commonMain {
30 dependencies {
Shane3c6ed482022-07-28 14:28:10 -070031 implementation(project(":compose:ui:ui"))
Jim S5930cd732023-04-12 02:33:37 -070032 implementation(project(":compose:ui:ui-unit"))
33 implementation(project(":compose:ui:ui-util"))
34 implementation(project(":compose:foundation:foundation"))
35 implementation(project(":compose:foundation:foundation-layout"))
Shane3c6ed482022-07-28 14:28:10 -070036 implementation(project(":constraintlayout:constraintlayout-core"))
Chet Haase40681b42023-08-14 16:17:55 -070037 implementation(project(":collection:collection"))
Shane3c6ed482022-07-28 14:28:10 -070038 }
Jim S5930cd732023-04-12 02:33:37 -070039 }
Shane3c6ed482022-07-28 14:28:10 -070040
Jim S5930cd732023-04-12 02:33:37 -070041 commonTest {
42 dependencies {
43 }
44 }
45
46 jvmMain {
47 dependencies {
48 }
49 }
50
51
52 androidMain {
53 dependsOn(commonMain)
54 dependsOn(jvmMain)
55 dependencies {
Shane3c6ed482022-07-28 14:28:10 -070056 api("androidx.annotation:annotation:1.1.0")
57 implementation("androidx.core:core-ktx:1.5.0")
58 }
Jim S5930cd732023-04-12 02:33:37 -070059 }
Shane3c6ed482022-07-28 14:28:10 -070060
Jim S5930cd732023-04-12 02:33:37 -070061 jvmTest {
62 dependencies {
Shane3c6ed482022-07-28 14:28:10 -070063 }
Jim S5930cd732023-04-12 02:33:37 -070064 }
Shane3c6ed482022-07-28 14:28:10 -070065
Jim S5930cd732023-04-12 02:33:37 -070066 androidAndroidTest {
67 dependsOn(jvmTest)
68 dependencies {
Oscar Adame Vázquezed5f56e2022-09-29 16:38:34 -070069 implementation(libs.kotlinTest)
Shane3c6ed482022-07-28 14:28:10 -070070 implementation(libs.testRules)
71 implementation(libs.testRunner)
72 implementation(libs.junit)
73 implementation(libs.truth)
74 implementation(project(":compose:foundation:foundation"))
Oscar Adame Vázquezed5f56e2022-09-29 16:38:34 -070075 implementation(project(":compose:material:material"))
Shane3c6ed482022-07-28 14:28:10 -070076 implementation(project(":compose:ui:ui-test-junit4"))
Oscar Adame Vázquezed5f56e2022-09-29 16:38:34 -070077 implementation(project(":compose:ui:ui-test-manifest"))
Shane3c6ed482022-07-28 14:28:10 -070078 implementation(project(":compose:test-utils"))
79 }
80 }
Jim S5930cd732023-04-12 02:33:37 -070081
82
83 // TODO(b/214407011): These dependencies leak into instrumented tests as well. If you
84 // need to add Robolectric (which must be kept out of androidAndroidTest), use a top
85 // level dependencies block instead:
86 // `dependencies { testImplementation(libs.robolectric) }`
87 androidTest {
88 dependsOn(jvmTest)
89 dependencies {
90 implementation(libs.testRules)
91 implementation(libs.testRunner)
92 implementation(libs.junit)
93 }
94 }
Shane3c6ed482022-07-28 14:28:10 -070095 }
96}
97
Jim S5930cd732023-04-12 02:33:37 -070098dependencies {
99 lintPublish(project(":constraintlayout:constraintlayout-compose-lint"))
100}
101
Shane3c6ed482022-07-28 14:28:10 -0700102androidx {
Alan Viverettec9e1fd72023-05-08 17:36:59 -0400103 name = "ConstraintLayout Compose"
Shane3c6ed482022-07-28 14:28:10 -0700104 type = LibraryType.PUBLISHED_LIBRARY
105 mavenVersion = LibraryVersions.CONSTRAINTLAYOUT_COMPOSE
Shane3c6ed482022-07-28 14:28:10 -0700106 inceptionYear = "2022"
107 description = "This library offers a flexible and adaptable way to position and animate widgets in Compose"
108}
109
110android {
111 namespace "androidx.constraintlayout.compose"
112}