blob: 207692f996e78c573b621b74a1f73a3b112acbf1 [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"))
Shane3c6ed482022-07-28 14:28:10 -070037 }
Jim S5930cd732023-04-12 02:33:37 -070038 }
Shane3c6ed482022-07-28 14:28:10 -070039
Jim S5930cd732023-04-12 02:33:37 -070040 commonTest {
41 dependencies {
42 }
43 }
44
45 jvmMain {
46 dependencies {
47 }
48 }
49
50
51 androidMain {
52 dependsOn(commonMain)
53 dependsOn(jvmMain)
54 dependencies {
Shane3c6ed482022-07-28 14:28:10 -070055 api("androidx.annotation:annotation:1.1.0")
56 implementation("androidx.core:core-ktx:1.5.0")
57 }
Jim S5930cd732023-04-12 02:33:37 -070058 }
Shane3c6ed482022-07-28 14:28:10 -070059
Jim S5930cd732023-04-12 02:33:37 -070060 jvmTest {
61 dependencies {
Shane3c6ed482022-07-28 14:28:10 -070062 }
Jim S5930cd732023-04-12 02:33:37 -070063 }
Shane3c6ed482022-07-28 14:28:10 -070064
Jim S5930cd732023-04-12 02:33:37 -070065 androidAndroidTest {
66 dependsOn(jvmTest)
67 dependencies {
Oscar Adame Vázquezed5f56e2022-09-29 16:38:34 -070068 implementation(libs.kotlinTest)
Shane3c6ed482022-07-28 14:28:10 -070069 implementation(libs.testRules)
70 implementation(libs.testRunner)
71 implementation(libs.junit)
72 implementation(libs.truth)
73 implementation(project(":compose:foundation:foundation"))
Oscar Adame Vázquezed5f56e2022-09-29 16:38:34 -070074 implementation(project(":compose:material:material"))
Shane3c6ed482022-07-28 14:28:10 -070075 implementation(project(":compose:ui:ui-test-junit4"))
Oscar Adame Vázquezed5f56e2022-09-29 16:38:34 -070076 implementation(project(":compose:ui:ui-test-manifest"))
Shane3c6ed482022-07-28 14:28:10 -070077 implementation(project(":compose:test-utils"))
78 }
79 }
Jim S5930cd732023-04-12 02:33:37 -070080
81
82 // TODO(b/214407011): These dependencies leak into instrumented tests as well. If you
83 // need to add Robolectric (which must be kept out of androidAndroidTest), use a top
84 // level dependencies block instead:
85 // `dependencies { testImplementation(libs.robolectric) }`
86 androidTest {
87 dependsOn(jvmTest)
88 dependencies {
89 implementation(libs.testRules)
90 implementation(libs.testRunner)
91 implementation(libs.junit)
92 }
93 }
Shane3c6ed482022-07-28 14:28:10 -070094 }
95}
96
Jim S5930cd732023-04-12 02:33:37 -070097dependencies {
98 lintPublish(project(":constraintlayout:constraintlayout-compose-lint"))
99}
100
Shane3c6ed482022-07-28 14:28:10 -0700101androidx {
Alan Viverettec9e1fd72023-05-08 17:36:59 -0400102 name = "ConstraintLayout Compose"
Shane3c6ed482022-07-28 14:28:10 -0700103 type = LibraryType.PUBLISHED_LIBRARY
104 mavenVersion = LibraryVersions.CONSTRAINTLAYOUT_COMPOSE
Shane3c6ed482022-07-28 14:28:10 -0700105 inceptionYear = "2022"
106 description = "This library offers a flexible and adaptable way to position and animate widgets in Compose"
107}
108
109android {
110 namespace "androidx.constraintlayout.compose"
111}