bintrayUpload.gradle 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. apply plugin: 'maven'
  2. Properties properties = new Properties()
  3. properties.load(project.rootProject.file('local.properties').newDataInputStream())
  4. uploadArchives {
  5. repositories {
  6. mavenDeployer {
  7. repository(url: properties.getProperty("POM_URL")) {
  8. authentication(userName: properties.getProperty("nexus.user"), password: properties.getProperty("nexus.password"))
  9. }
  10. //
  11. pom.groupId = properties.getProperty("POM_GROUP_ID")
  12. pom.artifactId = properties.getProperty("POM_ATRIFACT_ID")
  13. pom.version = properties.getProperty("POM_VERSION")
  14. pom.project {
  15. licenses {
  16. license {
  17. name 'The Apache Software License, Version 2.0'
  18. url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
  19. }
  20. }
  21. }
  22. // pom.project {
  23. // version properties.getProperty("POM_VERSION")
  24. // artifactId properties.getProperty("POM_ATRIFACT_ID")
  25. // groupId properties.getProperty("POM_GROUP_ID")
  26. // packaging 'aar'
  27. // description properties.getProperty("POM_DESCRIPTION")
  28. // licenses {
  29. // license {
  30. // name 'The Apache Software License, Version 2.0'
  31. // url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
  32. // }
  33. // }
  34. // }
  35. }
  36. }
  37. }
  38. //gradlew uploadArchives terminal中输入