Skip to content

Instantly share code, notes, and snippets.

publishing {
publications {
android.libraryVariants.all { variant ->
//use this kind of combination if you want to skip a publication
//if (variant.flavorName == "production" && variant.buildType.name == "debug") return
//if (variant.flavorName != "production" && variant.buildType.name == "release") return
def filename = "${archivesBaseName}-${variant.baseName}-${android.defaultConfig.versionName}"
//println(filename)
"${variant.name}"(MavenPublication) {
//println(variant.name)