Louis Pullen-Freilich | 8f94cb4 | 2020-01-27 18:50:13 +0000 | [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 |
Louis Pullen-Freilich | 5c6b11e | 2020-02-06 18:19:09 +0000 | [diff] [blame] | 20 | import androidx.ui.material.icons.generator.tasks.IconGenerationTask |
Jim Sproch | a88c07a | 2020-06-25 13:00:03 -0700 | [diff] [blame] | 21 | import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
Louis Pullen-Freilich | 8f94cb4 | 2020-01-27 18:50:13 +0000 | [diff] [blame] | 22 | |
| 23 | import static androidx.build.dependencies.DependenciesKt.* |
| 24 | |
| 25 | plugins { |
| 26 | id("AndroidXPlugin") |
| 27 | id("com.android.library") |
| 28 | id("AndroidXUiPlugin") |
Louis Pullen-Freilich | fdf0807 | 2020-07-20 18:05:24 +0100 | [diff] [blame] | 29 | id("kotlin-multiplatform") |
Louis Pullen-Freilich | 8f94cb4 | 2020-01-27 18:50:13 +0000 | [diff] [blame] | 30 | } |
| 31 | |
Louis Pullen-Freilich | fdf0807 | 2020-07-20 18:05:24 +0100 | [diff] [blame] | 32 | kotlin { |
| 33 | android() |
| 34 | sourceSets { |
| 35 | commonMain.dependencies { |
| 36 | implementation(KOTLIN_STDLIB_COMMON) |
| 37 | api project(":compose:ui:ui") |
| 38 | } |
Louis Pullen-Freilich | 8f94cb4 | 2020-01-27 18:50:13 +0000 | [diff] [blame] | 39 | |
Louis Pullen-Freilich | fdf0807 | 2020-07-20 18:05:24 +0100 | [diff] [blame] | 40 | androidMain.dependencies { |
| 41 | implementation(KOTLIN_STDLIB) |
| 42 | } |
| 43 | } |
Louis Pullen-Freilich | 8f94cb4 | 2020-01-27 18:50:13 +0000 | [diff] [blame] | 44 | } |
| 45 | |
Louis Pullen-Freilich | fdf0807 | 2020-07-20 18:05:24 +0100 | [diff] [blame] | 46 | IconGenerationTask.registerCoreIconProject(project) |
Louis Pullen-Freilich | 5c6b11e | 2020-02-06 18:19:09 +0000 | [diff] [blame] | 47 | |
Louis Pullen-Freilich | 8f94cb4 | 2020-01-27 18:50:13 +0000 | [diff] [blame] | 48 | androidx { |
| 49 | name = "AndroidX Core Material Icons" |
| 50 | publish = Publish.SNAPSHOT_AND_RELEASE |
| 51 | mavenVersion = LibraryVersions.UI |
Louis Pullen-Freilich | 5d18263 | 2020-07-01 14:30:26 +0100 | [diff] [blame] | 52 | mavenGroup = LibraryGroups.Compose.MATERIAL |
Louis Pullen-Freilich | 8f94cb4 | 2020-01-27 18:50:13 +0000 | [diff] [blame] | 53 | inceptionYear = "2020" |
| 54 | description = "AndroidX Core Material Icons" |
| 55 | } |
Jim Sproch | a88c07a | 2020-06-25 13:00:03 -0700 | [diff] [blame] | 56 | |
| 57 | tasks.withType(KotlinCompile).configureEach { |
| 58 | kotlinOptions { |
| 59 | freeCompilerArgs += [ |
| 60 | "-Xallow-jvm-ir-dependencies" |
| 61 | ] |
| 62 | } |
| 63 | } |