blob: 26fd7d6e62644919a73f0171c74153052fce5a35 [file] [log] [blame]
Sergey Vasilinetsb3e31f32017-11-08 17:23:06 -08001/*
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 Gray74cc2592020-09-24 15:05:40 -040017import androidx.build.LibraryType
Louis Pullen-Freilich3967d9f2019-05-10 13:42:30 +010018import androidx.build.SdkHelperKt
Owen Gray74cc2592020-09-24 15:05:40 -040019import androidx.build.SupportConfig
20
Aurimas Liutikas65d3d602019-04-01 23:08:13 -070021plugins {
22 id("AndroidXPlugin")
23 id("kotlin")
24}
Sergey Vasilinetsb3e31f32017-11-08 17:23:06 -080025
Ember Rosec662e1a2022-09-16 14:37:50 -040026androidx.configureAarAsJarForConfiguration("testImplementation")
Aurimas Liutikas7d0ea3322022-09-13 18:47:56 -070027
Sergey Vasilinetsb3e31f32017-11-08 17:23:06 -080028dependencies {
Aurimas Liutikasbc1dbeb2021-05-04 13:36:59 -070029 implementation(libs.xpp3)
30 implementation(libs.xmlpull)
31 implementation(libs.kotlinStdlib)
Sergey Vasilinets16e05dc2017-11-30 15:03:51 -080032
Aurimas Liutikasbc1dbeb2021-05-04 13:36:59 -070033 implementation(libs.javapoet)
34 implementation(libs.kotlinPoet)
Sergey Vasilinets16e05dc2017-11-30 15:03:51 -080035
Aurimas Liutikasbc1dbeb2021-05-04 13:36:59 -070036 testImplementation(libs.junit)
37 testImplementation(libs.googleCompileTesting)
Dustin Lamdf27d252022-08-23 17:12:47 +000038 testImplementation(projectOrArtifact(":room:room-compiler-processing-testing"), {
Jeremy Woods08a683e2021-05-20 16:32:11 -070039 exclude group: "androidx.room", module: "room-compiler-processing"
40 })
Jim Sproch9e38b4f2021-01-06 14:21:06 -080041 testImplementation(fileTree(
Alan Viverettebb04f2e2020-04-09 17:13:37 -040042 dir: "${SdkHelperKt.getSdkPath(project)}/platforms/$SupportConfig.COMPILE_SDK_VERSION/",
43 include : "android.jar"
Jim Sproch9e38b4f2021-01-06 14:21:06 -080044 ))
Ember Rosec662e1a2022-09-16 14:37:50 -040045 testImplementationAarAsJar(project(":navigation:navigation-common"))
46 testImplementationAarAsJar(project(":lifecycle:lifecycle-viewmodel-savedstate"))
Sergey Vasilinetsb3e31f32017-11-08 17:23:06 -080047}
48
Sergey Vasilinets16e05dc2017-11-30 15:03:51 -080049tasks.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 Liutikas6bbd61f2018-06-04 15:00:40 -070054 it.classpath = files(classpath.minus(androidJar).plus(androidJar))
Sergey Vasilinets16e05dc2017-11-30 15:03:51 -080055}
56
Aurimas Liutikas2ad31612019-04-01 04:23:03 -070057androidx {
Jim Sproch9e38b4f2021-01-06 14:21:06 -080058 name = "Android Navigation TypeSafe Arguments Generator"
Owen Gray74cc2592020-09-24 15:05:40 -040059 type = LibraryType.OTHER_CODE_PROCESSOR
Sergey Vasilinetsb3e31f32017-11-08 17:23:06 -080060 mavenGroup = LibraryGroups.NAVIGATION
Jim Sproch9e38b4f2021-01-06 14:21:06 -080061 inceptionYear = "2017"
Sergey Vasilinetsb3e31f32017-11-08 17:23:06 -080062 description = "Android Navigation TypeSafe Arguments Generator"
Sergey Vasilinetsb3e31f32017-11-08 17:23:06 -080063}