Skip to content

Instantly share code, notes, and snippets.

@liminal
Created February 23, 2017 19:21
Show Gist options
  • Save liminal/95210b60dd361b6900c8d900a8781650 to your computer and use it in GitHub Desktop.
Save liminal/95210b60dd361b6900c8d900a8781650 to your computer and use it in GitHub Desktop.
snippet for uploading your apks to a nexus repository manager
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)
}
}
}
}
}
@pronane
Copy link

pronane commented Jan 22, 2018

How do you call this from command line? Im assuming it can be used for any maven repo e.g. bintray.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment