Skip to content

Commit 05d478b

Browse files
Merge pull request #11 from runningcode/no/disable-unused-variants
Disable unused build variants for faster config time.
2 parents 8c06fe2 + 8aae02a commit 05d478b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

mobile_app1/build.gradle

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ buildscript {
77
dependencies {
88
classpath "com.android.tools.build:gradle:${providers.systemProperty("agpVersion").forUseAtConfigurationTime().orNull ?: '4.2.0-beta03'}"
99
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
10-
classpath "com.uber:okbuck:0.52.0"
10+
if ((providers.systemProperty('okbuck.wrapper').forUseAtConfigurationTime().orNull ?: 'false').toBoolean()) {
11+
classpath "com.uber:okbuck:0.52.0"
12+
}
1113
}
1214
}
1315
plugins {
@@ -18,6 +20,14 @@ allprojects {
1820
google()
1921
jcenter()
2022
}
23+
// Disable unused build variants
24+
plugins.withType(com.android.build.gradle.BasePlugin) {
25+
android.variantFilter { variant ->
26+
if (variant.name != 'debug') {
27+
variant.ignore = true
28+
}
29+
}
30+
}
2131
}
2232
task clean(type: Delete) {
2333
delete rootProject.buildDir

0 commit comments

Comments
 (0)