Skip to content

Instantly share code, notes, and snippets.

@wangyung
Last active June 15, 2017 03:38
Show Gist options
  • Save wangyung/29702e9770064a0461b1b367be13cd4f to your computer and use it in GitHub Desktop.
Save wangyung/29702e9770064a0461b1b367be13cd4f to your computer and use it in GitHub Desktop.
Deploy the artifact to local directory
publishing {
publications {
maven(MavenPublication) {
groupId 'THE_GROUP_ID'
artifactId project.name
version android.defaultConfig.versionName
artifact source: file("${project.buildDir}/outputs/aar/${project.name}-release.aar")
}
}
repositories {
maven {
url "file:${rootDir}/maven-repo" //assign the release directory
}
}
}
// need to apply maven-publish and this file in build.gradle
// example:
// apply plugin: 'maven-publish'
// apply from: '../deploy.gradle'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment