1buildscript { 2 ext { 3 kotlin_version = "2.0.21" 4 agp_version = System.getenv('AGP_VERSION') ?: "8.1.1" 5 ksp_version = "$kotlin_version-1.0.28" 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 id 'com.github.johnrengelman.shadow' version '8.1.1' 16 id 'org.jetbrains.kotlin.android' version "$kotlin_version" apply false 17} 18 19allprojects { 20 repositories { 21 google() 22 mavenCentral() 23 } 24} 25 26// Avoids conflict with BUILD file 27project.buildDir = 'buildOut' 28 29subprojects { 30 project.buildDir = 'buildOut' 31 afterEvaluate { 32 dependencies { 33 // This is needed to align older versions of kotlin-stdlib. 34 // The main issue is that in v1.8.0 the jdk7 and jdk8 artifacts were 35 // merged into kotlin-stdlib, so without this alignment we end up 36 // getting duplicate classes by pulling in both artifacts. 37 // See: https://kotlinlang.org/docs/whatsnew18.html#usage-of-the-latest-kotlin-stdlib-version-in-transitive-dependencies 38 implementation(platform("org.jetbrains.kotlin:kotlin-bom:$kotlin_version")) 39 } 40 } 41} 42