Deploy of AAR
luncliff opened this issue · comments
Specify maven URL.
// see https://developer.android.com/studio/build/dependencies#google-maven
repositories {
google()
jcenter()
maven { url "http://repo.nexus.com/content/repositories/releases/" }
maven { url "http://repo.nexus.com/content/repositories/snapshots/" }
maven { url "http://repo.nexus.com/content/repositories/nightly/" }
}
Publish to nightly
Publishing can be done with 1 command. Be aware of the credential issue in the CI environment.
gradle --info publish
Referenced
- https://developer.android.com/studio/build/maven-publish-plugin
- https://docs.gradle.org/current/userguide/publishing_maven.html
- https://medium.com/@nhancv/android-publish-library-project-to-nexus-repository-manager-5f2bd2711600
apply plugin: "maven-publish"
afterEvaluate {
publishing {
repositories {
maven {
url = "https://repo.nexus.com/content/repositories/nightly/"
credentials {
username = System.getenv("PUBLISH_USERNAME")
password = System.getenv("PUBLISH_PASSWORD")
}
}
}
// https://docs.oracle.com/middleware/1212/core/MAVEN/maven_version.htm
publications {
// for AAR, use components.variant
release(MavenPublication) {
from components.release
groupId = "org.luncliff"
version = "1.2.4-SNAPSHOT"
artifactId = "luncliff-muffin-release"
}
debug(MavenPublication) {
from components.debug
groupId = "org.luncliff"
version = "1.2.4-SNAPSHOT"
artifactId = "luncliff-muffin-debug"
}
}
}
}