blob: 67cbe863f91ca23711e2719f50a0410164c238fe [file] [log] [blame]
Alan Viverette63ef1552023-01-25 14:40:34 -05001/*
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
Tiem Songee0da742024-01-03 14:08:46 -080017/**
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 */
Omar Ismail8c545f72024-08-21 17:45:15 +010024import androidx.build.KotlinTarget
25import androidx.build.LibraryType
Alan Viverette63ef1552023-01-25 14:40:34 -050026
27plugins {
Aurimas Liutikasfcece8b2024-01-12 16:31:12 -080028 id("AndroidXPlugin")
29 id("kotlin")
30 id("java-gradle-plugin")
Alan Viverette63ef1552023-01-25 14:40:34 -050031}
32
33apply from: "../../buildSrc/kotlin-dsl-dependency.gradle"
34
Aurimas Liutikasec61c242024-03-14 16:58:22 +000035configurations {
36 // Config for plugin classpath to be used during tests
37 testPlugin {
38 canBeConsumed = false
39 canBeResolved = true
40 }
41}
42
Alan Viverette63ef1552023-01-25 14:40:34 -050043dependencies {
Radha Nakade29ada922024-06-10 11:38:58 -070044 runtimeOnly(findGradleKotlinDsl())
45
Julia McClellanf7798d52024-11-14 15:20:49 -050046 // Pinned AGP and lint versions that use an older version of Kotlin (pre 2.1) to avoid bumping
47 // the Kotlin target of this project to 2.1.
48 api("com.android.tools.build:gradle-api:8.8.0-alpha06")
49 api("com.android.tools:common:31.8.0-alpha06")
50 api("com.android.tools:sdk-common:31.8.0-alpha06")
Radha Nakade29ada922024-06-10 11:38:58 -070051 api(libs.guava)
52
Alan Viverette63ef1552023-01-25 14:40:34 -050053 implementation(gradleApi())
Julia McClellanf7798d52024-11-14 15:20:49 -050054 implementation("com.android.tools:repository:31.8.0-alpha06")
Alan Viverette63ef1552023-01-25 14:40:34 -050055 implementation(libs.apacheCommonIo)
Alan Viverette09784f32023-01-04 14:47:01 -050056 implementation(libs.apacheAnt)
Alan Viverette63ef1552023-01-25 14:40:34 -050057 implementation(libs.kotlinStdlib)
58
Aurimas Liutikas61353f82024-10-10 11:05:29 -070059 testPlugin(libs.androidGradlePlugin)
Aurimas Liutikasec61c242024-03-14 16:58:22 +000060
Julia McClellanf7798d52024-11-14 15:20:49 -050061 testImplementation("com.android.tools.build:gradle:8.8.0-alpha06")
Alan Viverette63ef1552023-01-25 14:40:34 -050062 testImplementation(gradleTestKit())
63 testImplementation(project(":internal-testutils-gradle-plugin"))
64 testImplementation(libs.androidToolsAnalyticsProtos)
Radha Nakade29ada922024-06-10 11:38:58 -070065 testImplementation(libs.asm)
66 testImplementation(libs.builder)
Alan Viverette63ef1552023-01-25 14:40:34 -050067 testImplementation(libs.junit)
68 testImplementation(libs.kotlinTest)
Radha Nakade29ada922024-06-10 11:38:58 -070069 testImplementation(libs.gson)
Alan Viverette63ef1552023-01-25 14:40:34 -050070 testImplementation(libs.truth)
71}
72
Aurimas Liutikasec61c242024-03-14 16:58:22 +000073tasks.withType(PluginUnderTestMetadata.class).named("pluginUnderTestMetadata").configure {
74 it.pluginClasspath.from(configurations.testPlugin)
75}
76
Alan Viverette63ef1552023-01-25 14:40:34 -050077gradlePlugin {
78 plugins {
79 stableAidl {
80 id = "androidx.stableaidl"
81 implementationClass = "androidx.stableaidl.StableAidlPlugin"
82 }
83 }
84}
85
86androidx {
87 name = "Stable AIDL Gradle Plugin"
88 type = LibraryType.GRADLE_PLUGIN
89 inceptionYear = "2022"
90 description = "Stable AIDL Gradle Plugin"
Omar Ismail8c545f72024-08-21 17:45:15 +010091 kotlinTarget = KotlinTarget.KOTLIN_1_9
Alan Viverette63ef1552023-01-25 14:40:34 -050092}