maven.gradle 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. apply plugin: 'maven'
  2. def GROUP = "com.tencent.qgame"
  3. def ARTIFACT_ID = "animplayer"
  4. def VERSION = "2.0.6"
  5. def IS_SNAPSHOTS = true
  6. def SNAPSHOTS_VERSION = "5"
  7. def USER_NAME = System.env.VAP_USER_NAME
  8. def KEY = System.env.VAP_KEY
  9. uploadArchives{
  10. repositories.mavenDeployer{
  11. // 配置本地仓库路径,项目根目录下的repository目录中
  12. def repoUrl = "https://mirrors.tencent.com/repository/maven/thirdparty"
  13. def version = VERSION
  14. print("")
  15. if (IS_SNAPSHOTS) {
  16. version = VERSION + "." + SNAPSHOTS_VERSION + "-SNAPSHOT"
  17. repoUrl = "https://mirrors.tencent.com/repository/maven/thirdparty-snapshots"
  18. }
  19. repository(url: repoUrl) {
  20. authentication(userName: USER_NAME, password: KEY)
  21. pom.groupId = GROUP
  22. pom.artifactId = ARTIFACT_ID
  23. pom.version = version
  24. }
  25. snapshotRepository(url: repoUrl) {
  26. authentication(userName: USER_NAME, password: KEY)
  27. pom.groupId = GROUP
  28. pom.artifactId = ARTIFACT_ID
  29. pom.version = version
  30. }
  31. }
  32. }