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