1/* 2 * Copyright 2022 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 17/** 18 * This file was created using the `create_project.py` script located in the 19 * `<AndroidX root>/development/project-creator` directory. 20 * 21 * Please use that script when creating a new project, rather than copying an existing project and 22 * modifying its settings. 23 */ 24import androidx.build.SoftwareType 25 26plugins { 27 id("AndroidXPlugin") 28 id("kotlin") 29 id("java-gradle-plugin") 30} 31 32apply from: "../../buildSrc/kotlin-dsl-dependency.gradle" 33 34configurations { 35 // Config for plugin classpath to be used during tests 36 testPlugin { 37 canBeConsumed = false 38 canBeResolved = true 39 } 40} 41 42dependencies { 43 // Pinned AGP and lint versions that use an older version of Kotlin (pre-2.1) to avoid bumping 44 // the Kotlin target of this project to 2.1. We may get a different version on the runtime 45 // classpath. 46 compileOnly("com.android.tools.build:gradle-api:8.8.0-alpha06") 47 compileOnly("com.android.tools:common:31.8.0-alpha06") 48 compileOnly("com.android.tools:sdk-common:31.8.0-alpha06") 49 compileOnly("com.android.tools:repository:31.8.0-alpha06") 50 51 api(libs.guava) 52 53 implementation(libs.apacheCommonIo) 54 implementation(libs.apacheAnt) 55 implementation(libs.kotlinStdlib) 56 57 testPlugin(libs.androidGradlePlugin) 58 59 testImplementation("com.android.tools.build:gradle:8.8.0-alpha06") 60 testImplementation(gradleTestKit()) 61 testImplementation(project(":internal-testutils-gradle-plugin")) 62 testImplementation(libs.androidToolsAnalyticsProtos) 63 testImplementation(libs.asm) 64 testImplementation(libs.builder) 65 testImplementation(libs.junit) 66 testImplementation(libs.kotlinTest) 67 testImplementation(libs.gson) 68 testImplementation(libs.truth) 69} 70 71tasks.withType(PluginUnderTestMetadata.class).named("pluginUnderTestMetadata").configure { 72 it.pluginClasspath.from(configurations.testPlugin) 73} 74 75gradlePlugin { 76 plugins { 77 stableAidl { 78 id = "androidx.stableaidl" 79 implementationClass = "androidx.stableaidl.StableAidlPlugin" 80 } 81 } 82} 83 84androidx { 85 name = "Stable AIDL Gradle Plugin" 86 type = SoftwareType.GRADLE_PLUGIN 87 inceptionYear = "2022" 88 description = "Stable AIDL Gradle Plugin" 89} 90