| import org.jetbrains.kotlin.gradle.tasks.KotlinCompile |
| |
| buildscript { |
| def supportRootFolder = project.projectDir.getParentFile() |
| apply from: "unbundled_check.gradle" |
| repositories { |
| maven { |
| url "${supportRootFolder}/../../prebuilts/androidx/external" |
| } |
| if (isUnbundledBuild(supportRootFolder)) { |
| jcenter() |
| } |
| } |
| |
| 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() |
| |
| def runningInBuildServer = System.env.DIST_DIR != null |
| if (runningInBuildServer) { |
| System.setProperty("kotlin.compiler.execution.strategy", "in-process") |
| } |
| |
| ext.supportRootFolder = project.projectDir.getParentFile() |
| apply from: 'repos.gradle' |
| apply from: "build_dependencies.gradle" |
| apply plugin: "kotlin" |
| apply from: "kotlin-dsl-dependency.gradle.kts" |
| |
| allprojects { |
| repos.addMavenRepositories(repositories) |
| |
| tasks.withType(KotlinCompile).configureEach { |
| kotlinOptions { |
| freeCompilerArgs += ["-Werror"] |
| } |
| } |
| } |
| |
| dependencies { |
| implementation build_libs.gradle |
| implementation build_libs.dex_member_list |
| implementation build_libs.error_prone_gradle |
| implementation build_libs.dokka_gradle |
| implementation build_libs.kotlin.gradle_plugin |
| implementation gradleApi() |
| implementation project("jetpad-integration") |
| } |
| |
| 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" |
| } |
| |
| gradlePlugin { |
| plugins { |
| benchmark { |
| id = 'androidx.benchmark' |
| implementationClass = 'androidx.benchmark.gradle.BenchmarkPlugin' |
| } |
| } |
| } |