build.gradle 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. apply plugin: 'com.android.library'
  2. android {
  3. compileSdkVersion 22
  4. buildToolsVersion "22.0.1"
  5. resourcePrefix "swipemenulistview"
  6. defaultConfig {
  7. minSdkVersion 8
  8. targetSdkVersion 22
  9. versionCode 1
  10. versionName "1.0"
  11. }
  12. buildTypes {
  13. release {
  14. minifyEnabled false
  15. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  16. }
  17. }
  18. }
  19. dependencies {
  20. compile fileTree(dir: 'libs', include: ['*.jar'])
  21. compile 'com.android.support:support-v4:22.1.1'
  22. }
  23. apply plugin: 'com.github.dcendents.android-maven'
  24. apply plugin: 'com.jfrog.bintray'
  25. version = "1.3.0"
  26. def siteUrl = 'https://github.com/baoyongzhang/SwipeMenuListView'
  27. def gitUrl = 'https://github.com/baoyongzhang/SwipeMenuListView.git'
  28. group = "com.baoyz.swipemenulistview"
  29. install {
  30. repositories.mavenInstaller {
  31. pom {
  32. project {
  33. packaging 'aar'
  34. // Add your description here
  35. name 'SwipeMenuListView' //项目描述
  36. url siteUrl
  37. // Set your license
  38. licenses {
  39. license {
  40. name 'The MIT License (MIT)'
  41. url 'http://baoyz.com/licenses/LICENSE.txt'
  42. }
  43. }
  44. developers {
  45. developer {
  46. id 'baoyongzhang' //填写的一些基本信息
  47. name 'baoyongzhang'
  48. email 'baoyz94@gmail.com'
  49. }
  50. }
  51. scm {
  52. connection gitUrl
  53. developerConnection gitUrl
  54. url siteUrl
  55. }
  56. }
  57. }
  58. }
  59. }
  60. task sourcesJar(type: Jar) {
  61. from android.sourceSets.main.java.srcDirs
  62. classifier = 'sources'
  63. }
  64. task javadoc(type: Javadoc) {
  65. source = android.sourceSets.main.java.srcDirs
  66. classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
  67. }
  68. task javadocJar(type: Jar, dependsOn: javadoc) {
  69. classifier = 'javadoc'
  70. from javadoc.destinationDir
  71. }
  72. artifacts {
  73. archives javadocJar
  74. archives sourcesJar
  75. }
  76. Properties properties = new Properties()
  77. properties.load(project.rootProject.file('local.properties').newDataInputStream())
  78. bintray {
  79. user = properties.getProperty("bintray.user")
  80. key = properties.getProperty("bintray.apikey")
  81. configurations = ['archives']
  82. pkg {
  83. repo = "maven"
  84. name = "SwipeMenuListView" //发布到JCenter上的项目名字
  85. websiteUrl = siteUrl
  86. vcsUrl = gitUrl
  87. licenses = ["MIT"]
  88. publish = true
  89. }
  90. }