xref: /aosp_15_r20/external/dagger2/java/dagger/hilt/android/plugin/build.gradle (revision f585d8a307d0621d6060bd7e80091fdcbf94fe27)
1buildscript {
2  ext {
3    kotlin_version = "1.9.20"
4    agp_version = System.getenv('AGP_VERSION') ?: "7.2.0"
5    ksp_version = "$kotlin_version-1.0.14"
6    pluginArtifactId = 'hilt-android-gradle-plugin'
7    pluginId = 'com.google.dagger.hilt.android'
8  }
9}
10
11plugins {
12  id 'org.jetbrains.kotlin.jvm' version "$kotlin_version"
13  id 'java-gradle-plugin'
14  id 'maven-publish'
15  // Use shadow version >= 7.1.1 to get log4j vulnerability patches:
16  //   https://github.com/johnrengelman/shadow/releases/tag/7.1.1
17  id 'com.github.johnrengelman.shadow' version '7.1.1'
18  id 'org.jetbrains.kotlin.android' version "$kotlin_version" apply false
19}
20
21allprojects {
22  repositories {
23    google()
24    mavenCentral()
25  }
26}
27
28// Avoids conflict with BUILD file
29project.buildDir = 'buildOut'
30
31subprojects {
32    project.buildDir = 'buildOut'
33    afterEvaluate {
34        dependencies {
35            // This is needed to align older versions of kotlin-stdlib.
36            // The main issue is that in v1.8.0 the jdk7 and jdk8 artifacts were
37            // merged into kotlin-stdlib, so without this alignment we end up
38            // getting duplicate classes by pulling in both artifacts.
39            // See: https://kotlinlang.org/docs/whatsnew18.html#usage-of-the-latest-kotlin-stdlib-version-in-transitive-dependencies
40            implementation(platform("org.jetbrains.kotlin:kotlin-bom:$kotlin_version"))
41        }
42    }
43}
44