Skip to content

Instantly share code, notes, and snippets.

@iam111
Last active December 29, 2023 12:55
Show Gist options
  • Save iam111/84f4804168c56036e73767f5e6e5fd4f to your computer and use it in GitHub Desktop.
Save iam111/84f4804168c56036e73767f5e6e5fd4f to your computer and use it in GitHub Desktop.
For gradle below 8
afterEvaluate {
publishing {
publications {
// Creates a Maven publication called "release".
release(MavenPublication) {
from components.release
setGroupId groupId
setArtifactId artifactId
version android.defaultConfig.versionName
}
}
repositories {
maven {
url "http://127.0.0.1:8081/repository/maven-releases/" //use the url what you've copied in nexus bashboard repository
credentials {
//here your nexus username and password will be used
username = 'admin'
password = '<your_nexus_password>'
}
allowInsecureProtocol = true // remove this line if you are using https:// instead of http://
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment