Reputation: 763
I've used the following standard code to upload my library to bintray.
I have two modules, a 'sample' module for testing and a 'library' module. I want to use a custom artifactId when I upload this to bintray but instead the artifactId gets changed to "library" (the module name) and I don't want this!
I know I could rename my "library" module to the desired name but I also want to keep this structure of module names.
I want something like: com.mydomain.something:CUSTOM-NAME:version
.
And NOT something like: com.mydomain.something:LIBRARY:version
.
ext {
bintrayRepo = 'maven'
bintrayName = 'MyLibrary'
// Maven metadata
publishedGroupId = 'com.domain.name'
libraryName = 'MyLibrary'
artifact = 'custom-name'
libraryDescription = 'description'
libraryVersion = '0.0.1'
developerId = 'someone'
developerName = 'someone'
developerEmail = '[email protected]'
}
I know all of this is possible since I've seen a couple of repositories using this module name structure and having "custom" artifactId on bintray/JCenter.
Example:
Upvotes: 3
Views: 395
Reputation: 25194
All you have to do is add
archivesBaseName = 'myartifactid'
to your library
module gradle file. This will rename all archive outputs, so not only aar but also javadoc and sources, for example.
Upvotes: 4
Reputation: 5604
Using the Bintray release plugin
When using com.novoda:bintray-release
, use artifactId
instead of artifact
in build.gradle
publish
configuration:
publish {
// ...
artifactId = sporkArtifactId
// ...
}
Using your second example's gradle-maven-push
See the build.gradle that applies gradle-mvn-push.gradle
The settings are defined in gradle.properties:
POM_NAME=FloatingActionButton
POM_ARTIFACT_ID=floatingactionbutton
POM_PACKAGING=aar
Upvotes: 0