Skip to content

Commit

Permalink
Bug 1868259 - Refactor buildscript {} to be at the top of build.gradl…
Browse files Browse the repository at this point in the history
…e r=tthibaud,geckoview-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D195517
  • Loading branch information
gabrielluong committed Dec 8, 2023
1 parent 760c889 commit a7175e3
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit a7175e3

Please sign in to comment.