Created
February 23, 2017 19:21
-
-
Save liminal/95210b60dd361b6900c8d900a8781650 to your computer and use it in GitHub Desktop.
snippet for uploading your apks to a nexus repository manager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'maven-publish' | |
publishing { | |
repositories { | |
maven { | |
url "http://localhost:8081/repository/maven-releases/" | |
credentials { | |
username "admin" | |
password 'admin123' | |
} | |
} | |
} | |
publications { | |
android.applicationVariants.all { variant -> | |
variant.outputs.each { output -> | |
create("apk${variant.name.capitalize()}", MavenPublication) { | |
groupId GROUP | |
artifactId POM_ARTIFACT_ID | |
version VERSION | |
artifact(output.outputFile) | |
} | |
} | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do you call this from command line? Im assuming it can be used for any maven repo e.g. bintray.