代码拉取完成,页面将自动刷新
apply plugin: 'maven-publish'
def getArtifactFilePath() {
return "$buildDir/outputs/aar/$maven_artifactId-$maven_version-${maven_build_type}.aar";
}
def getPublicationName() {
return maven_build_type;
}
publishing {
publications {
"${getPublicationName()}"(MavenPublication) {
groupId maven_groupId
artifactId maven_artifactId
version maven_version + "-" + maven_build_type + (maven_is_snapshot ? "-SNAPSHOT" : "")
artifact getArtifactFilePath()
// To include project dependencies
pom.withXml {
def dependencies = asNode().appendNode('dependencies')
configurations.getByName("${getPublicationName()}CompileClasspath").getResolvedConfiguration().getFirstLevelModuleDependencies().each {
def dependency = dependencies.appendNode('dependency')
dependency.appendNode('groupId', it.moduleGroup)
dependency.appendNode('artifactId', it.moduleName)
dependency.appendNode('version', it.moduleVersion)
}
asNode().appendNode("description", maven_description)
}
}
}
repositories {
maven {
if ("release".equals(maven_build_type)) {
url maven_releases_url
} else {
url maven_snapshots_url
}
credentials(HttpHeaderCredentials) {
name = "Private-Token"
if ("release".equals(maven_build_type)) {
value = maven_releases_gitLabAccessToken
} else {
value = maven_snapshots_gitLabAccessToken
}
}
authentication {
header(HttpHeaderAuthentication)
}
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。