Sergey Vasilinets | 968529a | 2018-01-03 16:13:53 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2017 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 | |
Sergey Vasilinets | 98971a7 | 2018-04-18 10:33:33 -0700 | [diff] [blame] | 17 | import static androidx.build.dependencies.DependenciesKt.* |
Jake Wharton | 792bd53 | 2018-09-13 16:49:07 -0400 | [diff] [blame] | 18 | import androidx.build.CompilationTarget |
Sergey Vasilinets | 98971a7 | 2018-04-18 10:33:33 -0700 | [diff] [blame] | 19 | import androidx.build.LibraryGroups |
| 20 | import androidx.build.LibraryVersions |
Aurimas Liutikas | b63ef63 | 2019-04-01 04:37:49 -0700 | [diff] [blame] | 21 | import androidx.build.AndroidXExtension |
Aurimas Liutikas | 75e93a0 | 2019-05-28 16:31:38 -0700 | [diff] [blame] | 22 | import androidx.build.Publish |
Aurimas Liutikas | e587806 | 2019-12-04 15:10:08 -0800 | [diff] [blame] | 23 | import androidx.build.SdkResourceGenerator |
Sergey Vasilinets | 968529a | 2018-01-03 16:13:53 -0800 | [diff] [blame] | 24 | |
Aurimas Liutikas | 65d3d60 | 2019-04-01 23:08:13 -0700 | [diff] [blame] | 25 | plugins { |
| 26 | id("AndroidXPlugin") |
| 27 | id("kotlin") |
| 28 | id("java-gradle-plugin") |
| 29 | } |
Sergey Vasilinets | 968529a | 2018-01-03 16:13:53 -0800 | [diff] [blame] | 30 | |
Sergey Vasilinets | 968529a | 2018-01-03 16:13:53 -0800 | [diff] [blame] | 31 | dependencies { |
Jeremy Woods | d9095c6 | 2020-09-29 16:03:54 -0700 | [diff] [blame] | 32 | implementation("com.android.tools.build:gradle:4.0.1") |
Aurimas Liutikas | 8a1c039 | 2019-12-02 11:31:04 -0800 | [diff] [blame] | 33 | implementation(KOTLIN_GRADLE_PLUGIN) |
Aurimas Liutikas | e587806 | 2019-12-04 15:10:08 -0800 | [diff] [blame] | 34 | api(project(":navigation:navigation-safe-args-generator")) |
| 35 | api(gradleApi()) |
Aurimas Liutikas | 8a1c039 | 2019-12-02 11:31:04 -0800 | [diff] [blame] | 36 | implementation(GSON) |
Aurimas Liutikas | e587806 | 2019-12-04 15:10:08 -0800 | [diff] [blame] | 37 | testImplementation(gradleTestKit()) |
Sergey Vasilinets | fe3324b | 2020-01-06 15:57:39 +0000 | [diff] [blame] | 38 | testImplementation(project(":internal-testutils-gradle-plugin")) |
Aurimas Liutikas | 8a1c039 | 2019-12-02 11:31:04 -0800 | [diff] [blame] | 39 | testImplementation(JUNIT) |
Sergey Vasilinets | 968529a | 2018-01-03 16:13:53 -0800 | [diff] [blame] | 40 | } |
| 41 | |
Aurimas Liutikas | e587806 | 2019-12-04 15:10:08 -0800 | [diff] [blame] | 42 | SdkResourceGenerator.generateForHostTest(project) |
Sergey Vasilinets | 973a5c0 | 2018-01-11 23:39:12 -0800 | [diff] [blame] | 43 | |
Sergey Vasilinets | 968529a | 2018-01-03 16:13:53 -0800 | [diff] [blame] | 44 | gradlePlugin { |
| 45 | plugins { |
Daniel Santiago Rivera | 0744687 | 2019-01-10 12:59:41 -0800 | [diff] [blame] | 46 | safeargsJava { |
Ian Lake | 1503d52 | 2018-02-15 13:43:50 -0800 | [diff] [blame] | 47 | id = "androidx.navigation.safeargs" |
Daniel Santiago Rivera | 0744687 | 2019-01-10 12:59:41 -0800 | [diff] [blame] | 48 | implementationClass = "androidx.navigation.safeargs.gradle.SafeArgsJavaPlugin" |
| 49 | } |
| 50 | safeargsKotlin { |
| 51 | id = "androidx.navigation.safeargs.kotlin" |
| 52 | implementationClass = "androidx.navigation.safeargs.gradle.SafeArgsKotlinPlugin" |
Sergey Vasilinets | 968529a | 2018-01-03 16:13:53 -0800 | [diff] [blame] | 53 | } |
| 54 | } |
| 55 | } |
| 56 | |
Aurimas Liutikas | 2ad3161 | 2019-04-01 04:23:03 -0700 | [diff] [blame] | 57 | androidx { |
Sergey Vasilinets | 968529a | 2018-01-03 16:13:53 -0800 | [diff] [blame] | 58 | name = "Android Navigation TypeSafe Arguments Gradle Plugin" |
Aurimas Liutikas | 75e93a0 | 2019-05-28 16:31:38 -0700 | [diff] [blame] | 59 | publish = Publish.SNAPSHOT_AND_RELEASE |
Ian Lake | 24bda69 | 2019-01-28 15:45:13 -0800 | [diff] [blame] | 60 | toolingProject = true |
Sergey Vasilinets | 968529a | 2018-01-03 16:13:53 -0800 | [diff] [blame] | 61 | mavenGroup = LibraryGroups.NAVIGATION |
| 62 | inceptionYear = "2017" |
| 63 | description = "Android Navigation TypeSafe Arguments Gradle Plugin" |
Jake Wharton | 792bd53 | 2018-09-13 16:49:07 -0400 | [diff] [blame] | 64 | compilationTarget = CompilationTarget.HOST |
Sergey Vasilinets | 968529a | 2018-01-03 16:13:53 -0800 | [diff] [blame] | 65 | } |