| /* |
| * Copyright (C) 2017 The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| /** |
| * This file was created using the `create_project.py` script located in the |
| * `<AndroidX root>/development/project-creator` directory. |
| * |
| * Please use that script when creating a new project, rather than copying an existing project and |
| * modifying its settings. |
| */ |
| import androidx.build.KotlinTarget |
| import androidx.build.LibraryType |
| import androidx.build.SdkHelperKt |
| |
| plugins { |
| id("AndroidXPlugin") |
| id("kotlin") |
| } |
| |
| androidx.configureAarAsJarForConfiguration("testImplementation") |
| |
| // android.jar and xmlpull has the same classes, but android.jar has stubs instead of real |
| // implementation, so we remove org.xmlpull.* from android.jar used for tests |
| tasks.register("strippedAndroidJar", Jar).configure { |
| it.from(zipTree(SdkHelperKt.getSdkDependency(project).getFiles().first())) |
| it.exclude("org/xmlpull/**") |
| it.archiveFileName.set("stripped-android.jar") |
| } |
| |
| dependencies { |
| implementation(libs.xpp3) |
| implementation(libs.xmlpull) |
| implementation(libs.kotlinStdlib) |
| |
| implementation(libs.javapoet) |
| implementation(libs.kotlinPoet) |
| |
| testImplementation(libs.googleCompileTesting) |
| testImplementation(libs.guava) |
| testImplementation(libs.hamcrestCore) |
| testImplementation(libs.junit) |
| testImplementation(libs.truth) |
| testImplementation(project(":room:room-compiler-processing-testing"), { |
| exclude group: "androidx.room", module: "room-compiler-processing" |
| }) |
| testImplementationAarAsJar(project(":navigation:navigation-common")) |
| testImplementationAarAsJar(project(":lifecycle:lifecycle-viewmodel-savedstate")) |
| testImplementation(tasks.named("strippedAndroidJar").map { it.outputs.files }) |
| } |
| |
| tasks.withType(Test).configureEach { |
| // https://github.com/google/compile-testing/issues/222 |
| it.jvmArgs "--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED" |
| } |
| |
| androidx { |
| name = "Navigation TypeSafe Arguments Generator" |
| type = LibraryType.OTHER_CODE_PROCESSOR |
| inceptionYear = "2017" |
| description = "Android Navigation TypeSafe Arguments Generator" |
| kotlinTarget = KotlinTarget.KOTLIN_1_9 |
| } |