| import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
| |
| buildscript { |
| def supportRootFolder = project.projectDir.getParentFile() |
| repositories { |
| maven { |
| url "${supportRootFolder}/../../prebuilts/androidx/external" |
| } |
| } |
| |
| apply from: "build_dependencies.gradle" |
| |
| dependencies { |
| classpath build_libs.kotlin.gradle_plugin |
| } |
| |
| configurations.classpath.resolutionStrategy { |
| eachDependency { details -> |
| if (details.requested.group == 'org.jetbrains.kotlin') { |
| details.useVersion build_versions.kotlin |
| } |
| } |
| } |
| } |
| |
| apply from: "out.gradle" |
| init.chooseOutDir() |
| |
| ext.supportRootFolder = project.projectDir.getParentFile() |
| apply from: "local_dokka.gradle" |
| apply from: 'repos.gradle' |
| apply from: "build_dependencies.gradle" |
| apply plugin: "kotlin" |
| apply from: "kotlin-dsl-dependency.gradle" |
| |
| allprojects { |
| repos.addMavenRepositories(repositories) |
| |
| tasks.withType(KotlinCompile).configureEach { |
| kotlinOptions { |
| jvmTarget = "1.8" |
| freeCompilerArgs += ["-Werror"] |
| } |
| } |
| } |
| |
| dependencies { |
| compileOnly(findGradleKotlinDsl()) |
| implementation build_libs.agp |
| implementation build_libs.dex_member_list |
| implementation build_libs.dokka_gradle |
| implementation build_libs.kotlin.gradle_plugin |
| implementation build_libs.kotlinpoet |
| implementation gradleApi() |
| implementation project("jetpad-integration") |
| // needed by inspection plugin |
| implementation "com.google.protobuf:protobuf-gradle-plugin:0.8.8" |
| implementation "org.anarres.jarjar:jarjar-gradle:1.0.1" |
| } |
| |
| apply plugin: "java-gradle-plugin" |
| |
| sourceSets { |
| main.java.srcDirs += "${supportRootFolder}/benchmark/gradle-plugin/src/main/kotlin" |
| main.resources.srcDirs += "${supportRootFolder}/benchmark/gradle-plugin/src/main/resources" |
| |
| main.java.srcDirs += "${supportRootFolder}/inspection/inspection-gradle-plugin/src/main/kotlin" |
| main.resources.srcDirs += "${supportRootFolder}/inspection/inspection-gradle-plugin/src/main" + |
| "/resources" |
| |
| main.java.srcDirs += "${supportRootFolder}/ui/ui-material/icons/generator/src/main/kotlin" |
| } |
| |
| gradlePlugin { |
| plugins { |
| benchmark { |
| id = 'androidx.benchmark' |
| implementationClass = 'androidx.benchmark.gradle.BenchmarkPlugin' |
| } |
| inspection { |
| id = 'androidx.inspection' |
| implementationClass = 'androidx.inspection.gradle.InspectionPlugin' |
| } |
| } |
| } |