blob: 7ac3cae7cf7587366dced0d99cf5bf2053170657 [file] [log] [blame]
Aurimas Liutikasc3c23ea2022-06-24 16:24:23 -07001
Jeff Gastond72edf22021-08-24 11:53:54 -04002apply plugin: "kotlin"
3apply from: "../kotlin-dsl-dependency.gradle"
Jeff Gaston5e3e7de2022-04-21 14:49:47 -04004apply plugin: "java-gradle-plugin"
Jeff Gastond72edf22021-08-24 11:53:54 -04005
6buildscript {
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 Gastond72edf22021-08-24 11:53:54 -040015dependencies {
Aurimas Liutikas6d38ebc2022-08-04 16:04:12 -070016 implementation(project(":jetpad-integration"))
17
18 // Gradle APIs
19 implementation(gradleApi())
20 compileOnly(findGradleKotlinDsl())
21
22 // Plugins we use and configure
23 implementation(libs.androidGradlePluginz)
24 implementation(libs.androidToolsCommon) // for com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
25 implementation(libs.kotlinGradlePluginz)
Aurimas Liutikas6d38ebc2022-08-04 16:04:12 -070026
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 Viverette6b52a142022-03-21 16:49:27 -040034 // Optional dependency where Ivy fails to parse the POM file.
35 exclude(group:"net.java.dev.msv", module:"xsdlib")
36 }
Aurimas Liutikas6d38ebc2022-08-04 16:04:12 -070037 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 Gastond72edf22021-08-24 11:53:54 -040049 // 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 Liutikas6d38ebc2022-08-04 16:04:12 -070051 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 Gastond72edf22021-08-24 11:53:54 -040055}
56
Jim Sprochef5fb012022-12-06 15:28:12 -080057java {
58 sourceCompatibility = JavaVersion.VERSION_11
59 targetCompatibility = JavaVersion.VERSION_11
60}
61
Jeff Gastond72edf22021-08-24 11:53:54 -040062project.tasks.withType(Jar) { task ->
63 task.reproducibleFileOrder = true
64 task.preserveFileTimestamps = false
65}
Jeff Gaston5e3e7de2022-04-21 14:49:47 -040066
67validatePlugins {
68 enableStricterValidation = true
69}