Skip to content

Commit

Permalink
Publishing default variant
Browse files Browse the repository at this point in the history
  • Loading branch information
jitpack-io committed Jul 6, 2015
1 parent b7dfba5 commit c71bdb4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
apply plugin: 'android-maven'

android {
compileSdkVersion 10
compileSdkVersion 19
buildToolsVersion "22.0.1"

defaultConfig {
Expand All @@ -25,6 +25,24 @@ android {
buildConfigField 'String', 'ENV', '"SANDBOX"'
}
}

defaultPublishConfig "productionRelease"
publishNonDefault true
}

if( android.productFlavors.size() > 0 ) {
android.libraryVariants.all { variant ->
// Publish a main artifact, otherwise the maven pom is not generated
if( android.publishNonDefault && variant.name == android.defaultPublishConfig ) {
def bundleTask = tasks["bundle${name.capitalize()}"]
artifacts {
archives(bundleTask.archivePath) {
classifier null
builtBy bundleTask
}
}
}
}
}

dependencies {
Expand Down
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.

0 comments on commit c71bdb4

Please sign in to comment.