我对Maven Snapshot的含义以及为什么要构建一个它有点困惑?
我正在尝试配置 Android 库项目以将多个工件部署到本地托管的 Maven 存储库。我已经足够了,两个工件都生成了自己的 POM,并且使用以下脚本将其正确部署到存储库:
android {
// Publish both debug and release
publishNonDefault true
}
uploadArchives {
repositories.mavenDeployer {
def majorVersion = 1
def minorVersion = 1
def buildVersion = project.properties.get('RELEASE', '0').toInteger()
addFilter('release') { artifact, file ->
file.name.contains('release')
}
addFilter('debug') { artifact, file ->
file.name.contains('debug')
}
activePomFilters.each { filter ->
pom(filter.name) {
groupId = 'com.redacted'
artifactId = 'redacted'
packaging = 'aar'
version = "${majorVersion}.${minorVersion}.${buildVersion}"
if (!project.hasProperty('RELEASE')) {
version += "-SNAPSHOT"
}
if (filter.name == 'debug') {
artifactId += …Run Code Online (Sandbox Code Playgroud)