library.gradle 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. apply plugin: 'maven-publish'
  2. publishing {
  3. publications {
  4. maven(MavenPublication) {
  5. groupId = MAVEN_GROUNP_ID
  6. artifactId = 'share'
  7. version = '1.0.2'
  8. }
  9. }
  10. repositories {
  11. maven {
  12. name = 'nexus'
  13. allowInsecureProtocol true
  14. url MAVEN_PUBLIC_URL
  15. credentials {
  16. username = MAVEN_USERNAME
  17. password = MAVEN_PASSWORD
  18. }
  19. def releasesRepoUrl = MAVEN_PUBLIC_URL
  20. def snapshotRepoUrl = MAVEN_SNAPSHOTS_URL
  21. url = version.endsWith('SNAPSHOT') ? snapshotRepoUrl : releasesRepoUrl
  22. }
  23. }
  24. }
  25. //uploadArchives {
  26. // repositories {
  27. // mavenDeployer{
  28. // repository(url:MAVEN_PUBLIC_URL){
  29. // authentication(userName: MAVEN_USERNAME, password: MAVEN_PASSWORD)
  30. // }
  31. // pom.groupId = MAVEN_GROUNP_ID
  32. // pom.artifactId = 'share'
  33. // pom.version = '1.0.2'
  34. // pom.packaging = 'aar'
  35. // }
  36. // }
  37. //}