blob: 935497b60586b152011676b6cd3163f7580c564d [file] [log] [blame]
/*
* Copyright 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
def build_versions = [:]
build_versions.studio = new Properties()
new File(buildscript.sourceFile.parentFile, "studio_versions.properties").withInputStream { build_versions.studio.load(it) }
build_versions.agp = build_versions.studio["agp"]
build_versions.lint = build_versions.studio["lint"]
build_versions.kotlin = "1.4.31"
build_versions.kotlin_coroutines = "1.4.3"
build_versions.ksp = "1.4.30-1.0.0-alpha05"
build_versions.hilt = "2.33-beta"
def agpOverride = System.getenv("GRADLE_PLUGIN_VERSION")
if (agpOverride != null) {
logger.warn("Using custom version ${agpOverride} of AGP due to GRADLE_PLUGIN_VERSION being set.")
build_versions.agp = agpOverride
}
// gets the version of Dokka defined in source
def getSourceDokkaVersion() {
def dokkaProps = new Properties()
FileInputStream f = new FileInputStream(project.file("${project.ext.supportRootFolder}/../../external/dokka/gradle.properties"))
dokkaProps.load(f)
f.close()
return dokkaProps["dokka_version"]
}
if (System.getenv("BUILD_DOKKA") != null) {
build_versions.dokka = getSourceDokkaVersion()
} else {
build_versions.dokka = "0.9.17-g013"
}
rootProject.ext["build_versions"] = build_versions
def build_libs = [:]
build_libs.agp = "com.android.tools.build:gradle:${build_versions.agp}"
build_libs.lint = [
core: "com.android.tools.lint:lint:${build_versions.lint}",
api: "com.android.tools.lint:lint-api:${build_versions.lint}",
tests: "com.android.tools.lint:lint-tests:${build_versions.lint}"
]
build_libs.kotlin = [
stdlib: "org.jetbrains.kotlin:kotlin-stdlib:${build_versions.kotlin}",
gradle_plugin: "org.jetbrains.kotlin:kotlin-gradle-plugin:${build_versions.kotlin}",
ksp_gradle_plugin: "com.google.devtools.ksp:symbol-processing-gradle-plugin:${build_versions.ksp}"
]
build_libs.dex_member_list = "com.jakewharton.dex:dex-member-list:4.1.1"
build_libs.dokka_gradle = [
"org.jetbrains.dokka:dokka-android-gradle-plugin:${build_versions.dokka}",
]
build_libs.kotlinpoet = "com.squareup:kotlinpoet:1.4.0"
build_libs.hilt_plugin = "com.google.dagger:hilt-android-gradle-plugin:${build_versions.hilt}"
rootProject.ext["build_libs"] = build_libs