Bug 1868259 - Refactor buildscript {} to be at the top of build.gradle r=tthibaud,geckoview-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D195517
This commit is contained in:
Gabriel Luong 2023-12-08 17:46:36 +00:00
Родитель bc785a10b5
Коммит 259f5e9723
1 изменённых файлов: 24 добавлений и 24 удалений

Просмотреть файл

@ -2,6 +2,30 @@ import org.tomlj.Toml
import org.tomlj.TomlParseResult
import org.tomlj.TomlTable
buildscript {
repositories {
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
maven {
url repository
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
allowInsecureProtocol = true
}
}
}
}
ext.kotlin_version = '1.8.21'
dependencies {
classpath 'org.mozilla.apilint:apilint:0.5.2'
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'org.apache.commons:commons-exec:1.3'
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.18.0'
classpath 'org.tomlj:tomlj:1.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
def tryInt = { string ->
if (string == null) {
return string
@ -132,30 +156,6 @@ allprojects {
buildDir "${topobjdir}/gradle/build"
buildscript {
repositories {
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
maven {
url repository
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
allowInsecureProtocol = true
}
}
}
}
ext.kotlin_version = '1.8.21'
dependencies {
classpath 'org.mozilla.apilint:apilint:0.5.2'
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'org.apache.commons:commons-exec:1.3'
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.18.0'
classpath 'org.tomlj:tomlj:1.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
// A stream that processes bytes line by line, prepending a tag before sending
// each line to Gradle's logging.
class TaggedLogOutputStream extends org.apache.commons.exec.LogOutputStream {