bintrayUpload.gradle 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. apply plugin: 'com.github.dcendents.android-maven'
  2. apply plugin: 'com.jfrog.bintray'
  3. group = groupId
  4. artifactId = artifactId
  5. version = versionCode
  6. def getPropertyFromLocalProperties(key) {
  7. File file = project.rootProject.file('local.properties')
  8. if (file.exists()) {
  9. Properties properties = new Properties()
  10. properties.load(file.newDataInputStream())
  11. return properties.getProperty(key)
  12. }
  13. }
  14. def siteUrl = 'https://tech.meituan.com/Logan.html'
  15. def gitUrl = 'https://github.com/Meituan-Dianping/Logan'
  16. bintray {
  17. user = getPropertyFromLocalProperties("bintray.user")
  18. key = getPropertyFromLocalProperties("bintray.apikey")
  19. configurations = ['archives']
  20. pkg {
  21. repo = 'maven'
  22. name = "${project.group}:${project.name}"
  23. userOrg = 'dianping'
  24. licenses = ['MIT']
  25. websiteUrl = siteUrl
  26. vcsUrl = gitUrl
  27. publish = true
  28. }
  29. }
  30. install {
  31. repositories.mavenInstaller {
  32. pom {
  33. project {
  34. packaging 'aar'
  35. groupId groupId
  36. artifactId artifactId
  37. version versionCode
  38. }
  39. }
  40. }
  41. }
  42. task sourcesJar(type: Jar) {
  43. from android.sourceSets.main.java.srcDirs
  44. classifier = 'sources'
  45. }
  46. artifacts {
  47. archives sourcesJar
  48. }