blob: db9ba26ff641044438cdd0f30e03d6b6150054ce [file] [log] [blame]
Chuck Jazdzewski2d5b49f2019-04-09 09:28:38 -07001/*
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-Freilich0350cc62019-05-02 16:46:35 +010017
18import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
19
Chuck Jazdzewski2d5b49f2019-04-09 09:28:38 -070020import static androidx.build.dependencies.DependenciesKt.*
21import androidx.build.CompilationTarget
22import androidx.build.LibraryGroups
23import androidx.build.LibraryVersions
Aurimas Liutikas75e93a02019-05-28 16:31:38 -070024import androidx.build.Publish
Chuck Jazdzewski2d5b49f2019-04-09 09:28:38 -070025
26plugins {
27 id("AndroidXPlugin")
28 id("kotlin")
29}
30
31dependencies {
Louis Pullen-Freilich08e53df2019-10-24 20:00:35 +010032 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 Jazdzewski2d5b49f2019-04-09 09:28:38 -070037}
38
Louis Pullen-Freilich0350cc62019-05-02 16:46:35 +010039tasks.withType(KotlinCompile).configureEach {
Chuck Jazdzewski2d5b49f2019-04-09 09:28:38 -070040 kotlinOptions {
41 jvmTarget = "1.8"
42 }
43}
44
Chuck Jazdzewski2d5b49f2019-04-09 09:28:38 -070045androidx {
Chuck Jazdzewski4c1c82f2019-06-18 08:51:59 -070046 name = "AndroidX Compose Hosted Compiler Plugin"
Owen Gray09d470f2019-10-02 15:14:02 -040047 // Nobody should ever get this artifact from maven; just from studio or from source
48 publish = Publish.NONE
Chuck Jazdzewski2d5b49f2019-04-09 09:28:38 -070049 toolingProject = true
50 mavenVersion = LibraryVersions.COMPOSE
51 mavenGroup = LibraryGroups.COMPOSE
52 inceptionYear = "2019"
Chuck Jazdzewski4c1c82f2019-06-18 08:51:59 -070053 description = "Contains the Kotlin compiler plugin for Compose used in Android Studio and IDEA"
Chuck Jazdzewski2d5b49f2019-04-09 09:28:38 -070054 compilationTarget = CompilationTarget.HOST
55}