Shane | 3c6ed48 | 2022-07-28 14:28:10 -0700 | [diff] [blame] | 1 | /* |
| 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 | |
Shane | 3c6ed48 | 2022-07-28 14:28:10 -0700 | [diff] [blame] | 17 | import androidx.build.LibraryType |
Shane | 3c6ed48 | 2022-07-28 14:28:10 -0700 | [diff] [blame] | 18 | |
| 19 | plugins { |
| 20 | id("AndroidXPlugin") |
| 21 | id("com.android.library") |
| 22 | id("AndroidXComposePlugin") |
| 23 | } |
| 24 | |
Jim S | 5930cd73 | 2023-04-12 02:33:37 -0700 | [diff] [blame] | 25 | androidXMultiplatform { |
| 26 | android() |
Shane | 3c6ed48 | 2022-07-28 14:28:10 -0700 | [diff] [blame] | 27 | |
Jim S | 5930cd73 | 2023-04-12 02:33:37 -0700 | [diff] [blame] | 28 | sourceSets { |
| 29 | commonMain { |
| 30 | dependencies { |
Shane | 3c6ed48 | 2022-07-28 14:28:10 -0700 | [diff] [blame] | 31 | implementation(project(":compose:ui:ui")) |
Jim S | 5930cd73 | 2023-04-12 02:33:37 -0700 | [diff] [blame] | 32 | 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")) |
Shane | 3c6ed48 | 2022-07-28 14:28:10 -0700 | [diff] [blame] | 36 | implementation(project(":constraintlayout:constraintlayout-core")) |
Chet Haase | 40681b4 | 2023-08-14 16:17:55 -0700 | [diff] [blame^] | 37 | implementation(project(":collection:collection")) |
Shane | 3c6ed48 | 2022-07-28 14:28:10 -0700 | [diff] [blame] | 38 | } |
Jim S | 5930cd73 | 2023-04-12 02:33:37 -0700 | [diff] [blame] | 39 | } |
Shane | 3c6ed48 | 2022-07-28 14:28:10 -0700 | [diff] [blame] | 40 | |
Jim S | 5930cd73 | 2023-04-12 02:33:37 -0700 | [diff] [blame] | 41 | commonTest { |
| 42 | dependencies { |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | jvmMain { |
| 47 | dependencies { |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | |
| 52 | androidMain { |
| 53 | dependsOn(commonMain) |
| 54 | dependsOn(jvmMain) |
| 55 | dependencies { |
Shane | 3c6ed48 | 2022-07-28 14:28:10 -0700 | [diff] [blame] | 56 | api("androidx.annotation:annotation:1.1.0") |
| 57 | implementation("androidx.core:core-ktx:1.5.0") |
| 58 | } |
Jim S | 5930cd73 | 2023-04-12 02:33:37 -0700 | [diff] [blame] | 59 | } |
Shane | 3c6ed48 | 2022-07-28 14:28:10 -0700 | [diff] [blame] | 60 | |
Jim S | 5930cd73 | 2023-04-12 02:33:37 -0700 | [diff] [blame] | 61 | jvmTest { |
| 62 | dependencies { |
Shane | 3c6ed48 | 2022-07-28 14:28:10 -0700 | [diff] [blame] | 63 | } |
Jim S | 5930cd73 | 2023-04-12 02:33:37 -0700 | [diff] [blame] | 64 | } |
Shane | 3c6ed48 | 2022-07-28 14:28:10 -0700 | [diff] [blame] | 65 | |
Jim S | 5930cd73 | 2023-04-12 02:33:37 -0700 | [diff] [blame] | 66 | androidAndroidTest { |
| 67 | dependsOn(jvmTest) |
| 68 | dependencies { |
Oscar Adame Vázquez | ed5f56e | 2022-09-29 16:38:34 -0700 | [diff] [blame] | 69 | implementation(libs.kotlinTest) |
Shane | 3c6ed48 | 2022-07-28 14:28:10 -0700 | [diff] [blame] | 70 | implementation(libs.testRules) |
| 71 | implementation(libs.testRunner) |
| 72 | implementation(libs.junit) |
| 73 | implementation(libs.truth) |
| 74 | implementation(project(":compose:foundation:foundation")) |
Oscar Adame Vázquez | ed5f56e | 2022-09-29 16:38:34 -0700 | [diff] [blame] | 75 | implementation(project(":compose:material:material")) |
Shane | 3c6ed48 | 2022-07-28 14:28:10 -0700 | [diff] [blame] | 76 | implementation(project(":compose:ui:ui-test-junit4")) |
Oscar Adame Vázquez | ed5f56e | 2022-09-29 16:38:34 -0700 | [diff] [blame] | 77 | implementation(project(":compose:ui:ui-test-manifest")) |
Shane | 3c6ed48 | 2022-07-28 14:28:10 -0700 | [diff] [blame] | 78 | implementation(project(":compose:test-utils")) |
| 79 | } |
| 80 | } |
Jim S | 5930cd73 | 2023-04-12 02:33:37 -0700 | [diff] [blame] | 81 | |
| 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 | } |
Shane | 3c6ed48 | 2022-07-28 14:28:10 -0700 | [diff] [blame] | 95 | } |
| 96 | } |
| 97 | |
Jim S | 5930cd73 | 2023-04-12 02:33:37 -0700 | [diff] [blame] | 98 | dependencies { |
| 99 | lintPublish(project(":constraintlayout:constraintlayout-compose-lint")) |
| 100 | } |
| 101 | |
Shane | 3c6ed48 | 2022-07-28 14:28:10 -0700 | [diff] [blame] | 102 | androidx { |
Alan Viverette | c9e1fd7 | 2023-05-08 17:36:59 -0400 | [diff] [blame] | 103 | name = "ConstraintLayout Compose" |
Shane | 3c6ed48 | 2022-07-28 14:28:10 -0700 | [diff] [blame] | 104 | type = LibraryType.PUBLISHED_LIBRARY |
| 105 | mavenVersion = LibraryVersions.CONSTRAINTLAYOUT_COMPOSE |
Shane | 3c6ed48 | 2022-07-28 14:28:10 -0700 | [diff] [blame] | 106 | inceptionYear = "2022" |
| 107 | description = "This library offers a flexible and adaptable way to position and animate widgets in Compose" |
| 108 | } |
| 109 | |
| 110 | android { |
| 111 | namespace "androidx.constraintlayout.compose" |
| 112 | } |