You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

59 lines
1.6 KiB

  1. apply plugin: 'com.jfrog.bintray'
  2. version = libraryVersion
  3. if (project.hasProperty("android")) { // Android libraries
  4. task sourcesJar(type: Jar) {
  5. classifier = 'sources'
  6. from android.sourceSets.main.java.srcDirs
  7. }
  8. task javadoc(type: Javadoc) {
  9. source = android.sourceSets.main.java.srcDirs
  10. classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
  11. }
  12. } else { // Java libraries
  13. task sourcesJar(type: Jar, dependsOn: classes) {
  14. classifier = 'sources'
  15. from sourceSets.main.allSource
  16. }
  17. }
  18. task javadocJar(type: Jar, dependsOn: javadoc) {
  19. classifier = 'javadoc'
  20. from javadoc.destinationDir
  21. }
  22. artifacts {
  23. archives javadocJar
  24. archives sourcesJar
  25. }
  26. // Bintray
  27. Properties properties = new Properties()
  28. properties.load(project.rootProject.file('gradle.properties').newDataInputStream())
  29. bintray {
  30. user = properties.getProperty("bintray.user")
  31. key = properties.getProperty("bintray.apikey")
  32. configurations = ['archives']
  33. pkg {
  34. repo = bintrayRepo
  35. name = bintrayName
  36. desc = libraryDescription
  37. websiteUrl = siteUrl
  38. vcsUrl = gitUrl
  39. licenses = allLicenses
  40. publish = true
  41. publicDownloadNumbers = true
  42. version {
  43. desc = libraryDescription
  44. gpg {
  45. sign = true //Determines whether to GPG sign the files. The default is false
  46. passphrase = properties.getProperty("bintray.gpg.password") //Optional. The passphrase for GPG signing'
  47. }
  48. }
  49. }
  50. }