Aurimas Liutikas | c3c23ea | 2022-06-24 16:24:23 -0700 | [diff] [blame] | 1 | |
Jeff Gaston | d72edf2 | 2021-08-24 11:53:54 -0400 | [diff] [blame] | 2 | apply plugin: "kotlin" |
| 3 | apply from: "../kotlin-dsl-dependency.gradle" |
Jeff Gaston | 5e3e7de | 2022-04-21 14:49:47 -0400 | [diff] [blame] | 4 | apply plugin: "java-gradle-plugin" |
Jeff Gaston | d72edf2 | 2021-08-24 11:53:54 -0400 | [diff] [blame] | 5 | |
| 6 | buildscript { |
| 7 | project.ext.supportRootFolder = project.projectDir.getParentFile().getParentFile() |
| 8 | apply from: "../repos.gradle" |
| 9 | repos.addMavenRepositories(repositories) |
| 10 | dependencies { |
| 11 | classpath(libs.kotlinGradlePluginz) |
| 12 | } |
| 13 | } |
| 14 | |
Jeff Gaston | d72edf2 | 2021-08-24 11:53:54 -0400 | [diff] [blame] | 15 | dependencies { |
Aurimas Liutikas | 6d38ebc | 2022-08-04 16:04:12 -0700 | [diff] [blame] | 16 | implementation(project(":jetpad-integration")) |
| 17 | |
| 18 | // Gradle APIs |
| 19 | implementation(gradleApi()) |
| 20 | compileOnly(findGradleKotlinDsl()) |
| 21 | |
Alan Viverette | 67befdb | 2023-02-21 15:08:51 -0500 | [diff] [blame] | 22 | // Android Gradle Plugin APIs used by Stable AIDL |
| 23 | implementation(libs.androidGradlePluginApi) |
| 24 | |
Aurimas Liutikas | 6d38ebc | 2022-08-04 16:04:12 -0700 | [diff] [blame] | 25 | // Plugins we use and configure |
| 26 | implementation(libs.androidGradlePluginz) |
| 27 | implementation(libs.androidToolsCommon) // for com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION |
Alan Viverette | 63ef155 | 2023-01-25 14:40:34 -0500 | [diff] [blame] | 28 | implementation(libs.androidToolsRepository) // com.android.repository for Stable AIDL plugin |
| 29 | implementation(libs.androidToolsSdkCommon) // com.android.ide.common for Stable AIDL plugin |
Aurimas Liutikas | 6d38ebc | 2022-08-04 16:04:12 -0700 | [diff] [blame] | 30 | implementation(libs.kotlinGradlePluginz) |
Aurimas Liutikas | 6d38ebc | 2022-08-04 16:04:12 -0700 | [diff] [blame] | 31 | |
| 32 | // variety of json parsers |
| 33 | implementation(libs.gson) |
Aurimas Liutikas | 6d38ebc | 2022-08-04 16:04:12 -0700 | [diff] [blame] | 34 | implementation(libs.jsonSimple) |
| 35 | |
| 36 | // XML parsers used in MavenUploadHelper.kt |
| 37 | implementation(libs.dom4j) { |
Alan Viverette | 6b52a14 | 2022-03-21 16:49:27 -0400 | [diff] [blame] | 38 | // Optional dependency where Ivy fails to parse the POM file. |
| 39 | exclude(group:"net.java.dev.msv", module:"xsdlib") |
| 40 | } |
Aurimas Liutikas | 6d38ebc | 2022-08-04 16:04:12 -0700 | [diff] [blame] | 41 | implementation(libs.xerces) |
| 42 | |
| 43 | implementation(libs.shadow) // used by BundleInsideHelper.kt |
| 44 | implementation(libs.apacheAnt) // used in AarManifestTransformerTask.kt for unziping |
| 45 | implementation(libs.toml) |
| 46 | implementation(libs.apacheCommonIo) // used in CheckApiEquivalenceTask.kt |
| 47 | implementation(libs.dexMemberList) // used in ReportLibraryMetricsTask.kt |
| 48 | |
| 49 | implementation(libs.protobufGradlePluginz) // needed to compile inspection plugin |
| 50 | implementation(libs.kotlinPoet) // needed to compile material-icon-generator |
| 51 | implementation(libs.xmlpull) // needed to compile material-icon-generator |
| 52 | |
Marcello Albano | 1461280 | 2022-07-26 13:15:53 -0700 | [diff] [blame] | 53 | implementation(libs.protobuf) // needed to compile baseline-profile gradle plugins |
| 54 | implementation(libs.agpTestingPlatformCoreProto) // needed to compile baseline-profile gradle plugins |
| 55 | |
Jeff Gaston | d72edf2 | 2021-08-24 11:53:54 -0400 | [diff] [blame] | 56 | // dependencies that aren't used by buildSrc directly but that we resolve here so that the |
| 57 | // root project doesn't need to re-resolve them and their dependencies on every build |
Aurimas Liutikas | 6d38ebc | 2022-08-04 16:04:12 -0700 | [diff] [blame] | 58 | runtimeOnly(libs.hiltAndroidGradlePluginz) |
| 59 | runtimeOnly(libs.javapoet) // for hiltAndroidGradlePluginz to workaround https://github.com/google/dagger/issues/3068 |
| 60 | runtimeOnly(libs.kspGradlePluginz) |
| 61 | runtimeOnly(libs.wireGradlePluginz) |
Jeff Gaston | d72edf2 | 2021-08-24 11:53:54 -0400 | [diff] [blame] | 62 | } |
| 63 | |
Jim Sproch | ef5fb01 | 2022-12-06 15:28:12 -0800 | [diff] [blame] | 64 | java { |
| 65 | sourceCompatibility = JavaVersion.VERSION_11 |
| 66 | targetCompatibility = JavaVersion.VERSION_11 |
| 67 | } |
| 68 | |
Jeff Gaston | d72edf2 | 2021-08-24 11:53:54 -0400 | [diff] [blame] | 69 | project.tasks.withType(Jar) { task -> |
| 70 | task.reproducibleFileOrder = true |
| 71 | task.preserveFileTimestamps = false |
| 72 | } |
Jeff Gaston | 5e3e7de | 2022-04-21 14:49:47 -0400 | [diff] [blame] | 73 | |
| 74 | validatePlugins { |
| 75 | enableStricterValidation = true |
| 76 | } |