Skip to content

Commit ac2ddea

Browse files
committed
Update build.gradle
1 parent 90ef953 commit ac2ddea

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: app/build.gradle

+5-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ android {
1717
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
1818
}
1919
}
20+
21+
// multiple flavours. produces the following artifacts: -productionRelease.aar, -sandboxRelease.aar, -productionDebug.aar, -sandboxDebug.aar
2022
productFlavors {
2123
production {
2224
buildConfigField 'String', 'ENV', '"PRODUCTION"'
@@ -26,13 +28,15 @@ android {
2628
}
2729
}
2830

31+
// default build flavour
2932
defaultPublishConfig "productionRelease"
33+
// true to publish all flavour artifacts
3034
publishNonDefault true
3135
}
3236

37+
// Publish default flavour as main artifact, otherwise the maven pom is not generated
3338
if( android.productFlavors.size() > 0 ) {
3439
android.libraryVariants.all { variant ->
35-
// Publish a main artifact, otherwise the maven pom is not generated
3640
if( android.publishNonDefault && variant.name == android.defaultPublishConfig ) {
3741
def bundleTask = tasks["bundle${name.capitalize()}"]
3842
artifacts {

0 commit comments

Comments
 (0)