Alan Viverette | 63ef155 | 2023-01-25 14:40:34 -0500 | [diff] [blame] | 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 | |
Tiem Song | ee0da74 | 2024-01-03 14:08:46 -0800 | [diff] [blame] | 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 | */ |
Omar Ismail | 8c545f7 | 2024-08-21 17:45:15 +0100 | [diff] [blame] | 24 | import androidx.build.KotlinTarget |
| 25 | import androidx.build.LibraryType |
Alan Viverette | 63ef155 | 2023-01-25 14:40:34 -0500 | [diff] [blame] | 26 | |
| 27 | plugins { |
Aurimas Liutikas | fcece8b | 2024-01-12 16:31:12 -0800 | [diff] [blame] | 28 | id("AndroidXPlugin") |
| 29 | id("kotlin") |
| 30 | id("java-gradle-plugin") |
Alan Viverette | 63ef155 | 2023-01-25 14:40:34 -0500 | [diff] [blame] | 31 | } |
| 32 | |
| 33 | apply from: "../../buildSrc/kotlin-dsl-dependency.gradle" |
| 34 | |
Aurimas Liutikas | ec61c24 | 2024-03-14 16:58:22 +0000 | [diff] [blame] | 35 | configurations { |
| 36 | // Config for plugin classpath to be used during tests |
| 37 | testPlugin { |
| 38 | canBeConsumed = false |
| 39 | canBeResolved = true |
| 40 | } |
| 41 | } |
| 42 | |
Alan Viverette | 63ef155 | 2023-01-25 14:40:34 -0500 | [diff] [blame] | 43 | dependencies { |
Radha Nakade | 29ada92 | 2024-06-10 11:38:58 -0700 | [diff] [blame] | 44 | runtimeOnly(findGradleKotlinDsl()) |
| 45 | |
Julia McClellan | f7798d5 | 2024-11-14 15:20:49 -0500 | [diff] [blame] | 46 | // 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 Nakade | 29ada92 | 2024-06-10 11:38:58 -0700 | [diff] [blame] | 51 | api(libs.guava) |
| 52 | |
Alan Viverette | 63ef155 | 2023-01-25 14:40:34 -0500 | [diff] [blame] | 53 | implementation(gradleApi()) |
Julia McClellan | f7798d5 | 2024-11-14 15:20:49 -0500 | [diff] [blame] | 54 | implementation("com.android.tools:repository:31.8.0-alpha06") |
Alan Viverette | 63ef155 | 2023-01-25 14:40:34 -0500 | [diff] [blame] | 55 | implementation(libs.apacheCommonIo) |
Alan Viverette | 09784f3 | 2023-01-04 14:47:01 -0500 | [diff] [blame] | 56 | implementation(libs.apacheAnt) |
Alan Viverette | 63ef155 | 2023-01-25 14:40:34 -0500 | [diff] [blame] | 57 | implementation(libs.kotlinStdlib) |
| 58 | |
Aurimas Liutikas | 61353f8 | 2024-10-10 11:05:29 -0700 | [diff] [blame] | 59 | testPlugin(libs.androidGradlePlugin) |
Aurimas Liutikas | ec61c24 | 2024-03-14 16:58:22 +0000 | [diff] [blame] | 60 | |
Julia McClellan | f7798d5 | 2024-11-14 15:20:49 -0500 | [diff] [blame] | 61 | testImplementation("com.android.tools.build:gradle:8.8.0-alpha06") |
Alan Viverette | 63ef155 | 2023-01-25 14:40:34 -0500 | [diff] [blame] | 62 | testImplementation(gradleTestKit()) |
| 63 | testImplementation(project(":internal-testutils-gradle-plugin")) |
| 64 | testImplementation(libs.androidToolsAnalyticsProtos) |
Radha Nakade | 29ada92 | 2024-06-10 11:38:58 -0700 | [diff] [blame] | 65 | testImplementation(libs.asm) |
| 66 | testImplementation(libs.builder) |
Alan Viverette | 63ef155 | 2023-01-25 14:40:34 -0500 | [diff] [blame] | 67 | testImplementation(libs.junit) |
| 68 | testImplementation(libs.kotlinTest) |
Radha Nakade | 29ada92 | 2024-06-10 11:38:58 -0700 | [diff] [blame] | 69 | testImplementation(libs.gson) |
Alan Viverette | 63ef155 | 2023-01-25 14:40:34 -0500 | [diff] [blame] | 70 | testImplementation(libs.truth) |
| 71 | } |
| 72 | |
Aurimas Liutikas | ec61c24 | 2024-03-14 16:58:22 +0000 | [diff] [blame] | 73 | tasks.withType(PluginUnderTestMetadata.class).named("pluginUnderTestMetadata").configure { |
| 74 | it.pluginClasspath.from(configurations.testPlugin) |
| 75 | } |
| 76 | |
Alan Viverette | 63ef155 | 2023-01-25 14:40:34 -0500 | [diff] [blame] | 77 | gradlePlugin { |
| 78 | plugins { |
| 79 | stableAidl { |
| 80 | id = "androidx.stableaidl" |
| 81 | implementationClass = "androidx.stableaidl.StableAidlPlugin" |
| 82 | } |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | androidx { |
| 87 | name = "Stable AIDL Gradle Plugin" |
| 88 | type = LibraryType.GRADLE_PLUGIN |
| 89 | inceptionYear = "2022" |
| 90 | description = "Stable AIDL Gradle Plugin" |
Omar Ismail | 8c545f7 | 2024-08-21 17:45:15 +0100 | [diff] [blame] | 91 | kotlinTarget = KotlinTarget.KOTLIN_1_9 |
Alan Viverette | 63ef155 | 2023-01-25 14:40:34 -0500 | [diff] [blame] | 92 | } |