Sergey Vasilinets | b3e31f3 | 2017-11-08 17:23:06 -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 | |
Owen Gray | 74cc259 | 2020-09-24 15:05:40 -0400 | [diff] [blame] | 17 | import androidx.build.LibraryType |
Louis Pullen-Freilich | 3967d9f | 2019-05-10 13:42:30 +0100 | [diff] [blame] | 18 | import androidx.build.SdkHelperKt |
Owen Gray | 74cc259 | 2020-09-24 15:05:40 -0400 | [diff] [blame] | 19 | import androidx.build.SupportConfig |
| 20 | |
Aurimas Liutikas | 65d3d60 | 2019-04-01 23:08:13 -0700 | [diff] [blame] | 21 | plugins { |
| 22 | id("AndroidXPlugin") |
| 23 | id("kotlin") |
| 24 | } |
Sergey Vasilinets | b3e31f3 | 2017-11-08 17:23:06 -0800 | [diff] [blame] | 25 | |
Ember Rose | c662e1a | 2022-09-16 14:37:50 -0400 | [diff] [blame] | 26 | androidx.configureAarAsJarForConfiguration("testImplementation") |
Aurimas Liutikas | 7d0ea332 | 2022-09-13 18:47:56 -0700 | [diff] [blame] | 27 | |
Sergey Vasilinets | b3e31f3 | 2017-11-08 17:23:06 -0800 | [diff] [blame] | 28 | dependencies { |
Aurimas Liutikas | bc1dbeb | 2021-05-04 13:36:59 -0700 | [diff] [blame] | 29 | implementation(libs.xpp3) |
| 30 | implementation(libs.xmlpull) |
| 31 | implementation(libs.kotlinStdlib) |
Sergey Vasilinets | 16e05dc | 2017-11-30 15:03:51 -0800 | [diff] [blame] | 32 | |
Aurimas Liutikas | bc1dbeb | 2021-05-04 13:36:59 -0700 | [diff] [blame] | 33 | implementation(libs.javapoet) |
| 34 | implementation(libs.kotlinPoet) |
Sergey Vasilinets | 16e05dc | 2017-11-30 15:03:51 -0800 | [diff] [blame] | 35 | |
Aurimas Liutikas | bc1dbeb | 2021-05-04 13:36:59 -0700 | [diff] [blame] | 36 | testImplementation(libs.junit) |
| 37 | testImplementation(libs.googleCompileTesting) |
Dustin Lam | df27d25 | 2022-08-23 17:12:47 +0000 | [diff] [blame] | 38 | testImplementation(projectOrArtifact(":room:room-compiler-processing-testing"), { |
Jeremy Woods | 08a683e | 2021-05-20 16:32:11 -0700 | [diff] [blame] | 39 | exclude group: "androidx.room", module: "room-compiler-processing" |
| 40 | }) |
Jim Sproch | 9e38b4f | 2021-01-06 14:21:06 -0800 | [diff] [blame] | 41 | testImplementation(fileTree( |
Alan Viverette | bb04f2e | 2020-04-09 17:13:37 -0400 | [diff] [blame] | 42 | dir: "${SdkHelperKt.getSdkPath(project)}/platforms/$SupportConfig.COMPILE_SDK_VERSION/", |
| 43 | include : "android.jar" |
Jim Sproch | 9e38b4f | 2021-01-06 14:21:06 -0800 | [diff] [blame] | 44 | )) |
Ember Rose | c662e1a | 2022-09-16 14:37:50 -0400 | [diff] [blame] | 45 | testImplementationAarAsJar(project(":navigation:navigation-common")) |
| 46 | testImplementationAarAsJar(project(":lifecycle:lifecycle-viewmodel-savedstate")) |
Sergey Vasilinets | b3e31f3 | 2017-11-08 17:23:06 -0800 | [diff] [blame] | 47 | } |
| 48 | |
Sergey Vasilinets | 16e05dc | 2017-11-30 15:03:51 -0800 | [diff] [blame] | 49 | tasks.findByName("test").doFirst { |
| 50 | // android.jar and xmlpull has the same classes, but android.jar has stubs instead of real |
| 51 | // implementation, so we move android.jar to end of classpath |
| 52 | def classpath = it.classpath.getFiles() |
| 53 | def androidJar = classpath.find { it.name == "android.jar" } |
Aurimas Liutikas | 6bbd61f | 2018-06-04 15:00:40 -0700 | [diff] [blame] | 54 | it.classpath = files(classpath.minus(androidJar).plus(androidJar)) |
Sergey Vasilinets | 16e05dc | 2017-11-30 15:03:51 -0800 | [diff] [blame] | 55 | } |
| 56 | |
Aurimas Liutikas | 2ad3161 | 2019-04-01 04:23:03 -0700 | [diff] [blame] | 57 | androidx { |
Jim Sproch | 9e38b4f | 2021-01-06 14:21:06 -0800 | [diff] [blame] | 58 | name = "Android Navigation TypeSafe Arguments Generator" |
Owen Gray | 74cc259 | 2020-09-24 15:05:40 -0400 | [diff] [blame] | 59 | type = LibraryType.OTHER_CODE_PROCESSOR |
Sergey Vasilinets | b3e31f3 | 2017-11-08 17:23:06 -0800 | [diff] [blame] | 60 | mavenGroup = LibraryGroups.NAVIGATION |
Jim Sproch | 9e38b4f | 2021-01-06 14:21:06 -0800 | [diff] [blame] | 61 | inceptionYear = "2017" |
Sergey Vasilinets | b3e31f3 | 2017-11-08 17:23:06 -0800 | [diff] [blame] | 62 | description = "Android Navigation TypeSafe Arguments Generator" |
Sergey Vasilinets | b3e31f3 | 2017-11-08 17:23:06 -0800 | [diff] [blame] | 63 | } |