| /* |
| * Copyright 2021 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. |
| */ |
| |
| import androidx.build.LibraryType |
| import androidx.build.SupportConfig |
| |
| import static androidx.build.SdkHelperKt.getSdkPath |
| |
| plugins { |
| id("AndroidXPlugin") |
| id("kotlin") |
| id("kotlin-kapt") |
| } |
| |
| dependencies { |
| implementation(libs.autoCommon) |
| implementation(libs.autoServiceAnnotations) |
| implementation(libs.gradleIncapHelper) |
| implementation(libs.guava) |
| implementation(libs.javapoet) |
| implementation(libs.kotlinStdlib) |
| |
| kapt(libs.gradleIncapHelperProcessor) |
| kapt(libs.autoService) |
| |
| testImplementation(libs.junit) |
| testImplementation(libs.googleCompileTesting) |
| testImplementation(libs.truth) |
| |
| testRuntimeOnly(project(":resourceinspection:resourceinspection-annotation")) |
| testRuntimeOnly(project(":annotation:annotation")) |
| testRuntimeOnly(fileTree( |
| dir: "${getSdkPath(project)}/platforms/$SupportConfig.COMPILE_SDK_VERSION/", |
| include : "android.jar")) |
| testRuntimeOnly(libs.intellijAnnotations) |
| testRuntimeOnly(libs.jsr250) |
| } |
| |
| androidx { |
| name = "Android Resource Inspection - Annotation Processor" |
| type = LibraryType.ANNOTATION_PROCESSOR |
| mavenGroup = LibraryGroups.RESOURCEINSPECTION |
| inceptionYear = "2021" |
| description = "Annotation processors for Android resource and layout inspection" |
| } |
| |
| 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" |
| } |