release.gradle 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /**
  2. * Use For Upload
  3. */
  4. version = gradle.versionName
  5. def siteUrl = 'https://github.com/sangcomz/FishBun' // Homepage URL of the library
  6. def gitUrl = 'https://github.com/sangcomz/FishBun.git' // Git repository URL
  7. group = "com.sangcomz" // Maven Group ID for the artifact
  8. install {
  9. repositories.mavenInstaller {
  10. // This generates POM.xml with proper parameters
  11. pom {
  12. project {
  13. packaging 'aar'
  14. // Add your description here
  15. name 'fishbun'
  16. description = 'The project aims to provide a album.'
  17. url siteUrl
  18. // Set your license
  19. licenses {
  20. license {
  21. name 'The Apache Software License, Version 2.0'
  22. url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
  23. }
  24. }
  25. developers {
  26. developer {
  27. id 'sangcomz'
  28. name 'Jeong SeokWon'
  29. email 'sangcomz@naver.com'
  30. }
  31. }
  32. scm {
  33. connection gitUrl
  34. developerConnection gitUrl
  35. url siteUrl
  36. }
  37. }
  38. }
  39. }
  40. }
  41. task sourcesJar(type: Jar) {
  42. from android.sourceSets.main.java.srcDirs
  43. classifier = 'sources'
  44. }
  45. afterEvaluate {
  46. javadoc.classpath += project.android.libraryVariants.toList().first().javaCompile.classpath
  47. }
  48. task javadoc(type: Javadoc) {
  49. source = android.sourceSets.main.java.srcDirs
  50. classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
  51. }
  52. task javadocJar(type: Jar, dependsOn: javadoc) {
  53. classifier = 'javadoc'
  54. from javadoc.destinationDir
  55. }
  56. artifacts {
  57. archives javadocJar
  58. archives sourcesJar
  59. }
  60. if (project.rootProject.file('local.properties').isFile()) {
  61. Properties properties = new Properties()
  62. properties.load(project.rootProject.file('local.properties').newDataInputStream())
  63. // https://github.com/bintray/gradle-bintray-plugin
  64. bintray {
  65. user = properties.getProperty("bintray.user", '')
  66. key = properties.getProperty("bintray.apikey", '')
  67. publish = true
  68. configurations = ['archives']
  69. pkg {
  70. repo = "maven"
  71. // it is the name that appears in bintray when logged
  72. name = "fishbun"
  73. websiteUrl = siteUrl
  74. vcsUrl = gitUrl
  75. licenses = ["Apache-2.0"]
  76. publish = true
  77. }
  78. }
  79. github {
  80. owner = 'sangcomz'
  81. repo = 'Fishbun'
  82. token = properties.getProperty("github_access_tokens", ' ')
  83. tagName = version
  84. targetCommitish = 'master'
  85. body = """## Release Note
  86. * Fix Bug (#138, #137)
  87. * Update Glide / Picasso (#139) """
  88. name = version
  89. }
  90. }