apply plugin: 'maven' def GROUP = "com.tencent.qgame" def ARTIFACT_ID = "animplayer" def VERSION = "2.0.6" def IS_SNAPSHOTS = true def SNAPSHOTS_VERSION = "5" def USER_NAME = System.env.VAP_USER_NAME def KEY = System.env.VAP_KEY uploadArchives{ repositories.mavenDeployer{ // 配置本地仓库路径,项目根目录下的repository目录中 def repoUrl = "https://mirrors.tencent.com/repository/maven/thirdparty" def version = VERSION print("") if (IS_SNAPSHOTS) { version = VERSION + "." + SNAPSHOTS_VERSION + "-SNAPSHOT" repoUrl = "https://mirrors.tencent.com/repository/maven/thirdparty-snapshots" } repository(url: repoUrl) { authentication(userName: USER_NAME, password: KEY) pom.groupId = GROUP pom.artifactId = ARTIFACT_ID pom.version = version } snapshotRepository(url: repoUrl) { authentication(userName: USER_NAME, password: KEY) pom.groupId = GROUP pom.artifactId = ARTIFACT_ID pom.version = version } } }