Skip to content

Commit 6f2492c

Browse files
committed
Bug 1868259 - Refactor buildscript {} to be at the top of build.gradle r=tthibaud,geckoview-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D195517 UltraBlame original commit: d1fa343eb9bc8553f0c8352be15f2e2f07243ffb
1 parent 3996f3f commit 6f2492c

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

build.gradle

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,30 @@ import org.tomlj.Toml
22
import org.tomlj.TomlParseResult
33
import org.tomlj.TomlTable
44

5+
buildscript {
6+
repositories {
7+
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
8+
maven {
9+
url repository
10+
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
11+
allowInsecureProtocol = true
12+
}
13+
}
14+
}
15+
}
16+
17+
ext.kotlin_version = '1.8.21'
18+
19+
dependencies {
20+
classpath 'org.mozilla.apilint:apilint:0.5.2'
21+
classpath 'com.android.tools.build:gradle:7.4.2'
22+
classpath 'org.apache.commons:commons-exec:1.3'
23+
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.18.0'
24+
classpath 'org.tomlj:tomlj:1.1.0'
25+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
26+
}
27+
}
28+
529
def tryInt = { string ->
630
if (string == null) {
731
return string
@@ -132,30 +156,6 @@ allprojects {
132156

133157
buildDir "${topobjdir}/gradle/build"
134158

135-
buildscript {
136-
repositories {
137-
gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
138-
maven {
139-
url repository
140-
if (gradle.mozconfig.substs.ALLOW_INSECURE_GRADLE_REPOSITORIES) {
141-
allowInsecureProtocol = true
142-
}
143-
}
144-
}
145-
}
146-
147-
ext.kotlin_version = '1.8.21'
148-
149-
dependencies {
150-
classpath 'org.mozilla.apilint:apilint:0.5.2'
151-
classpath 'com.android.tools.build:gradle:7.4.2'
152-
classpath 'org.apache.commons:commons-exec:1.3'
153-
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.18.0'
154-
classpath 'org.tomlj:tomlj:1.1.0'
155-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
156-
}
157-
}
158-
159159
// A stream that processes bytes line by line, prepending a tag before sending
160160
// each line to Gradle's logging.
161161
class TaggedLogOutputStream extends org.apache.commons.exec.LogOutputStream {

0 commit comments

Comments
 (0)