forked from mirrors/gecko-dev
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:
parent
bc785a10b5
commit
259f5e9723
1 changed files with 24 additions and 24 deletions
48
build.gradle
48
build.gradle
|
|
@ -2,6 +2,30 @@ import org.tomlj.Toml
|
||||||
import org.tomlj.TomlParseResult
|
import org.tomlj.TomlParseResult
|
||||||
import org.tomlj.TomlTable
|
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 ->
|
def tryInt = { string ->
|
||||||
if (string == null) {
|
if (string == null) {
|
||||||
return string
|
return string
|
||||||
|
|
@ -132,30 +156,6 @@ allprojects {
|
||||||
|
|
||||||
buildDir "${topobjdir}/gradle/build"
|
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
|
// A stream that processes bytes line by line, prepending a tag before sending
|
||||||
// each line to Gradle's logging.
|
// each line to Gradle's logging.
|
||||||
class TaggedLogOutputStream extends org.apache.commons.exec.LogOutputStream {
|
class TaggedLogOutputStream extends org.apache.commons.exec.LogOutputStream {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue