Remove -release suffix when publishing Android library

According to http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Library-Publication , when publishNonDefault=true , the Maven publish plugin will publish additional options as additional packages with the classifier .

I have a library project that has 2 types of builds - Debug and Release. The maven plugin publishes my artifacts as
enter image description here

I use the following script to publish my library to Bintray

 group = PROJ_GROUP version = PROJ_VERSION project.archivesBaseName = PROJ_ARTIFACTID apply plugin: 'com.jfrog.bintray' apply plugin: 'maven-publish' task sourcesJar(type: Jar) { from android.sourceSets.main.java.srcDirs classifier = 'sources' } task javadoc(type: Javadoc) { source = android.sourceSets.main.java.srcDirs classpath += configurations.compile classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) // TODO #43: Figure out how to build with AAR dependencies // Gradle: error: package android.support.v4.util does not exist // Gradle: error: cannot find symbol class SimpleArrayMap failOnError false } task javadocJar(type: Jar, dependsOn: javadoc) { classifier = 'javadoc' from javadoc.destinationDir } javadoc { options{ encoding "UTF-8" charSet 'UTF-8' author true version true links "http://docs.oracle.com/javase/7/docs/api" title PROJ_ARTIFACTID } } artifacts { archives javadocJar archives sourcesJar } def pomConfig = { licenses { license { name "The Apache Software License, Version 2.0" url "http://www.apache.org/licenses/LICENSE-2.0.txt" distribution "repo" } } developers { developer { id DEVELOPER_ID name DEVELOPER_NAME email DEVELOPER_EMAIL } } } publishing { publications { mavenJava(MavenPublication) { artifactId PROJ_ARTIFACTID pom{ packaging 'aar' } pom.withXml { def root = asNode() root.appendNode('description', PROJ_DESCRIPTION) root.children().last() + pomConfig } } } } bintray { Properties properties = new Properties() properties.load(project.rootProject.file('bintray.properties').newDataInputStream()) user = properties.getProperty("BINTRAY_USER") key = properties.getProperty("BINTRAY_KEY") configurations = ['archives'] publications = ['mavenJava'] publish = false pkg { repo = 'maven' name = PROJ_NAME desc = PROJ_DESCRIPTION websiteUrl = PROJ_WEBSITEURL issueTrackerUrl = PROJ_ISSUETRACKERURL vcsUrl = PROJ_VCSURL licenses = ['Apache-2.0'] publicDownloadNumbers = false } } 

How to get the plugin to remove the -release suffix?

+5
source share

All Articles