Jeff Gaston | d72edf2 | 2021-08-24 11:53:54 -0400 | [diff] [blame] | 1 | apply plugin: "kotlin" |
| 2 | apply from: "../kotlin-dsl-dependency.gradle" |
Jeff Gaston | 5e3e7de | 2022-04-21 14:49:47 -0400 | [diff] [blame] | 3 | apply plugin: "java-gradle-plugin" |
Jeff Gaston | d72edf2 | 2021-08-24 11:53:54 -0400 | [diff] [blame] | 4 | |
| 5 | buildscript { |
| 6 | project.ext.supportRootFolder = project.projectDir.getParentFile().getParentFile() |
| 7 | apply from: "../repos.gradle" |
| 8 | repos.addMavenRepositories(repositories) |
| 9 | dependencies { |
| 10 | classpath(libs.kotlinGradlePluginz) |
| 11 | } |
| 12 | } |
| 13 | |
Jeff Gaston | d72edf2 | 2021-08-24 11:53:54 -0400 | [diff] [blame] | 14 | dependencies { |
Aurimas Liutikas | 6d38ebc | 2022-08-04 16:04:12 -0700 | [diff] [blame] | 15 | implementation(project(":jetpad-integration")) |
| 16 | |
| 17 | // Gradle APIs |
| 18 | implementation(gradleApi()) |
| 19 | compileOnly(findGradleKotlinDsl()) |
| 20 | |
| 21 | // Plugins we use and configure |
| 22 | implementation(libs.androidGradlePluginz) |
| 23 | implementation(libs.androidToolsCommon) // for com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION |
| 24 | implementation(libs.kotlinGradlePluginz) |
| 25 | implementation(libs.dokkaGradlePluginz) |
| 26 | |
| 27 | // variety of json parsers |
| 28 | implementation(libs.gson) |
| 29 | implementation(libs.json) // b/241475613 |
| 30 | implementation(libs.jsonSimple) |
| 31 | |
| 32 | // XML parsers used in MavenUploadHelper.kt |
| 33 | implementation(libs.dom4j) { |
Alan Viverette | 6b52a14 | 2022-03-21 16:49:27 -0400 | [diff] [blame] | 34 | // Optional dependency where Ivy fails to parse the POM file. |
| 35 | exclude(group:"net.java.dev.msv", module:"xsdlib") |
| 36 | } |
Aurimas Liutikas | 6d38ebc | 2022-08-04 16:04:12 -0700 | [diff] [blame] | 37 | implementation(libs.xerces) |
| 38 | |
| 39 | implementation(libs.shadow) // used by BundleInsideHelper.kt |
| 40 | implementation(libs.apacheAnt) // used in AarManifestTransformerTask.kt for unziping |
| 41 | implementation(libs.toml) |
| 42 | implementation(libs.apacheCommonIo) // used in CheckApiEquivalenceTask.kt |
| 43 | implementation(libs.dexMemberList) // used in ReportLibraryMetricsTask.kt |
| 44 | |
| 45 | implementation(libs.protobufGradlePluginz) // needed to compile inspection plugin |
| 46 | implementation(libs.kotlinPoet) // needed to compile material-icon-generator |
| 47 | implementation(libs.xmlpull) // needed to compile material-icon-generator |
| 48 | |
Jeff Gaston | d72edf2 | 2021-08-24 11:53:54 -0400 | [diff] [blame] | 49 | // dependencies that aren't used by buildSrc directly but that we resolve here so that the |
| 50 | // 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] | 51 | runtimeOnly(libs.hiltAndroidGradlePluginz) |
| 52 | runtimeOnly(libs.javapoet) // for hiltAndroidGradlePluginz to workaround https://github.com/google/dagger/issues/3068 |
| 53 | runtimeOnly(libs.kspGradlePluginz) |
| 54 | runtimeOnly(libs.wireGradlePluginz) |
Jeff Gaston | d72edf2 | 2021-08-24 11:53:54 -0400 | [diff] [blame] | 55 | } |
| 56 | |
Jeff Gaston | d72edf2 | 2021-08-24 11:53:54 -0400 | [diff] [blame] | 57 | project.tasks.withType(Jar) { task -> |
| 58 | task.reproducibleFileOrder = true |
| 59 | task.preserveFileTimestamps = false |
| 60 | } |
Jeff Gaston | 5e3e7de | 2022-04-21 14:49:47 -0400 | [diff] [blame] | 61 | |
| 62 | validatePlugins { |
| 63 | enableStricterValidation = true |
| 64 | } |