Created by: dvoiss
This version of the maven_push
gradle script includes getters for username and password (getRepositoryUsername
and getRepositoryPassword
) so the build will not fail if the nexus username and password are not set in the gradle.properties
file. It defaults them to empty strings if they are not available.
Note that the values in this version of the script get the username from NEXUS_USERNAME
and NEXUS_PASSWORD
instead of the current nexusUsername
and nexusPassword
.
This change will also enable jitpack to build the project. Currently there isn't a recent SNAPSHOT
build available and I'd like to be able to reference a recent commit that has a feature I want. In the example below I can add a commit or use the latest from this repo's master
branch (-SNAPSHOT
) in order to do so:
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
dependencies {
...
compile 'com.github.umano:androidslidinguppanel:-SNAPSHOT'
}
The difference in this change can be seen in the logs below at jitpack:
The log with the updated maven_push.gradle file in this branch:
BUILD SUCCESSFUL
The log of the current result:
A problem occurred configuring project ':demo'.
> A problem occurred configuring project ':library'.
> No such property: nexusUsername for class: org.gradle.api.publication.maven.internal.deployer.DefaultGroovyMavenDeployer