blob: 6cb909a92f40a959cef2977125accdcb7c310506 [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
Alan Viverette67befdb2023-02-21 15:08:51 -050022 // Android Gradle Plugin APIs used by Stable AIDL
23 implementation(libs.androidGradlePluginApi)
24
Aurimas Liutikas6d38ebc2022-08-04 16:04:12 -070025 // Plugins we use and configure
26 implementation(libs.androidGradlePluginz)
27 implementation(libs.androidToolsCommon) // for com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION
Alan Viverette63ef1552023-01-25 14:40:34 -050028 implementation(libs.androidToolsRepository) // com.android.repository for Stable AIDL plugin
29 implementation(libs.androidToolsSdkCommon) // com.android.ide.common for Stable AIDL plugin
Aurimas Liutikas6d38ebc2022-08-04 16:04:12 -070030 implementation(libs.kotlinGradlePluginz)
Aurimas Liutikas6d38ebc2022-08-04 16:04:12 -070031
32 // variety of json parsers
33 implementation(libs.gson)
Aurimas Liutikas6d38ebc2022-08-04 16:04:12 -070034 implementation(libs.jsonSimple)
35
36 // XML parsers used in MavenUploadHelper.kt
37 implementation(libs.dom4j) {
Alan Viverette6b52a142022-03-21 16:49:27 -040038 // Optional dependency where Ivy fails to parse the POM file.
39 exclude(group:"net.java.dev.msv", module:"xsdlib")
40 }
Aurimas Liutikas6d38ebc2022-08-04 16:04:12 -070041 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 Albano14612802022-07-26 13:15:53 -070053 implementation(libs.protobuf) // needed to compile baseline-profile gradle plugins
54 implementation(libs.agpTestingPlatformCoreProto) // needed to compile baseline-profile gradle plugins
55
Jeff Gastond72edf22021-08-24 11:53:54 -040056 // 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 Liutikas6d38ebc2022-08-04 16:04:12 -070058 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 Gastond72edf22021-08-24 11:53:54 -040062}
63
Jim Sprochef5fb012022-12-06 15:28:12 -080064java {
65 sourceCompatibility = JavaVersion.VERSION_11
66 targetCompatibility = JavaVersion.VERSION_11
67}
68
Jeff Gastond72edf22021-08-24 11:53:54 -040069project.tasks.withType(Jar) { task ->
70 task.reproducibleFileOrder = true
71 task.preserveFileTimestamps = false
72}
Jeff Gaston5e3e7de2022-04-21 14:49:47 -040073
74validatePlugins {
75 enableStricterValidation = true
76}