Chuck Jazdzewski | 2d5b49f | 2019-04-09 09:28:38 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2019 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 | |
Louis Pullen-Freilich | 0350cc6 | 2019-05-02 16:46:35 +0100 | [diff] [blame] | 17 | |
| 18 | import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
| 19 | |
Chuck Jazdzewski | 2d5b49f | 2019-04-09 09:28:38 -0700 | [diff] [blame] | 20 | import static androidx.build.dependencies.DependenciesKt.* |
| 21 | import androidx.build.CompilationTarget |
| 22 | import androidx.build.LibraryGroups |
| 23 | import androidx.build.LibraryVersions |
Aurimas Liutikas | 75e93a0 | 2019-05-28 16:31:38 -0700 | [diff] [blame] | 24 | import androidx.build.Publish |
Chuck Jazdzewski | 2d5b49f | 2019-04-09 09:28:38 -0700 | [diff] [blame] | 25 | |
| 26 | plugins { |
| 27 | id("AndroidXPlugin") |
| 28 | id("kotlin") |
| 29 | } |
| 30 | |
| 31 | dependencies { |
Louis Pullen-Freilich | 08e53df | 2019-10-24 20:00:35 +0100 | [diff] [blame] | 32 | compileOnly(KOTLIN_STDLIB) |
| 33 | compileOnly("org.jetbrains.kotlin:kotlin-compiler:$KOTLIN_VERSION") |
| 34 | compileOnly("org.jetbrains.kotlin:kotlin-plugin:$KOTLIN_VERSION") |
| 35 | compileOnly("org.jetbrains.kotlin:kotlin-intellij-core:$KOTLIN_VERSION") |
| 36 | compileOnly("org.jetbrains.kotlin:kotlin-platform-api:$KOTLIN_VERSION") |
Chuck Jazdzewski | 2d5b49f | 2019-04-09 09:28:38 -0700 | [diff] [blame] | 37 | } |
| 38 | |
Louis Pullen-Freilich | 0350cc6 | 2019-05-02 16:46:35 +0100 | [diff] [blame] | 39 | tasks.withType(KotlinCompile).configureEach { |
Chuck Jazdzewski | 2d5b49f | 2019-04-09 09:28:38 -0700 | [diff] [blame] | 40 | kotlinOptions { |
| 41 | jvmTarget = "1.8" |
| 42 | } |
| 43 | } |
| 44 | |
Chuck Jazdzewski | 2d5b49f | 2019-04-09 09:28:38 -0700 | [diff] [blame] | 45 | androidx { |
Chuck Jazdzewski | 4c1c82f | 2019-06-18 08:51:59 -0700 | [diff] [blame] | 46 | name = "AndroidX Compose Hosted Compiler Plugin" |
Owen Gray | 09d470f | 2019-10-02 15:14:02 -0400 | [diff] [blame] | 47 | // Nobody should ever get this artifact from maven; just from studio or from source |
| 48 | publish = Publish.NONE |
Chuck Jazdzewski | 2d5b49f | 2019-04-09 09:28:38 -0700 | [diff] [blame] | 49 | toolingProject = true |
| 50 | mavenVersion = LibraryVersions.COMPOSE |
| 51 | mavenGroup = LibraryGroups.COMPOSE |
| 52 | inceptionYear = "2019" |
Chuck Jazdzewski | 4c1c82f | 2019-06-18 08:51:59 -0700 | [diff] [blame] | 53 | description = "Contains the Kotlin compiler plugin for Compose used in Android Studio and IDEA" |
Chuck Jazdzewski | 2d5b49f | 2019-04-09 09:28:38 -0700 | [diff] [blame] | 54 | compilationTarget = CompilationTarget.HOST |
| 55 | } |