George Mount | 842c8c1 | 2020-01-08 16:03:42 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2020 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 | import androidx.build.LibraryGroups |
| 18 | import androidx.build.LibraryVersions |
| 19 | import androidx.build.Publish |
| 20 | import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
| 21 | |
| 22 | import static androidx.build.dependencies.DependenciesKt.* |
| 23 | |
| 24 | plugins { |
| 25 | id("AndroidXPlugin") |
| 26 | id("com.android.library") |
| 27 | id("AndroidXUiPlugin") |
Nikolay Igotti | 99a9b13 | 2020-04-07 15:03:05 +0300 | [diff] [blame] | 28 | id("kotlin-multiplatform") |
George Mount | 842c8c1 | 2020-01-08 16:03:42 -0800 | [diff] [blame] | 29 | } |
| 30 | |
Nikolay Igotti | 99a9b13 | 2020-04-07 15:03:05 +0300 | [diff] [blame] | 31 | kotlin { |
| 32 | android() |
| 33 | sourceSets { |
| 34 | commonMain.dependencies { |
| 35 | implementation(KOTLIN_STDLIB_COMMON) |
George Mount | 842c8c1 | 2020-01-08 16:03:42 -0800 | [diff] [blame] | 36 | |
Nikolay Igotti | 99a9b13 | 2020-04-07 15:03:05 +0300 | [diff] [blame] | 37 | implementation project(":ui:ui-util") |
| 38 | implementation project(":compose:compose-runtime") |
| 39 | } |
| 40 | jvmMain.dependencies { |
| 41 | implementation(KOTLIN_STDLIB) |
| 42 | } |
| 43 | androidMain.dependencies { |
| 44 | api "androidx.annotation:annotation:1.1.0" |
| 45 | } |
George Mount | 842c8c1 | 2020-01-08 16:03:42 -0800 | [diff] [blame] | 46 | |
Nikolay Igotti | 99a9b13 | 2020-04-07 15:03:05 +0300 | [diff] [blame] | 47 | commonTest.dependencies { |
| 48 | implementation kotlin("test-junit") |
| 49 | } |
| 50 | } |
George Mount | 842c8c1 | 2020-01-08 16:03:42 -0800 | [diff] [blame] | 51 | } |
| 52 | |
| 53 | androidx { |
| 54 | name = "AndroidX UI Geometry" |
| 55 | publish = Publish.SNAPSHOT_AND_RELEASE |
| 56 | mavenVersion = LibraryVersions.UI |
| 57 | mavenGroup = LibraryGroups.UI |
| 58 | inceptionYear = "2020" |
| 59 | description = "AndroidX UI classes related to dimensions without units." |
| 60 | } |
| 61 | |
| 62 | tasks.withType(KotlinCompile).configureEach { |
| 63 | kotlinOptions { |
Nikolay Igotti | 99a9b13 | 2020-04-07 15:03:05 +0300 | [diff] [blame] | 64 | freeCompilerArgs += ["-XXLanguage:+InlineClasses"] |
George Mount | 842c8c1 | 2020-01-08 16:03:42 -0800 | [diff] [blame] | 65 | useIR = true |
| 66 | } |
Nikolay Igotti | 99a9b13 | 2020-04-07 15:03:05 +0300 | [diff] [blame] | 67 | } |