build.gradle 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. apply plugin: 'com.android.library'
  2. apply plugin: 'com.github.dcendents.android-maven'
  3. apply plugin: 'com.jfrog.bintray'
  4. def siteUrl = 'https://github.com/kongzue/DialogX' //项目在github主页地址
  5. def gitUrl = 'https://github.com/kongzue/DialogX.git' //Git仓库的地址
  6. group = "com.kongzue.dialogx.style.ios"
  7. version = "0.0.19"
  8. android {
  9. compileSdkVersion 30
  10. defaultConfig {
  11. minSdkVersion 21
  12. targetSdkVersion 30
  13. versionCode 19
  14. versionName "0.0.19"
  15. }
  16. buildTypes {
  17. release {
  18. minifyEnabled false
  19. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  20. }
  21. }
  22. }
  23. install {
  24. repositories.mavenInstaller {
  25. // This generates POM.xml with proper parameters
  26. pom {
  27. project {
  28. packaging 'aar'
  29. name 'dialogXiOSStyle'
  30. url siteUrl
  31. licenses {
  32. license {
  33. name 'The Apache Software License, Version 2.0'
  34. url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
  35. }
  36. }
  37. developers {
  38. developer {
  39. id 'myzchh'//设置自己ID
  40. name 'myzchh'//设置自己名字
  41. email 'myzcxhh@live.cn'//设置自己邮箱
  42. }
  43. }
  44. scm {
  45. connection gitUrl
  46. developerConnection gitUrl
  47. url siteUrl
  48. }
  49. }
  50. }
  51. }
  52. }
  53. task sourcesJar(type: Jar) {
  54. from android.sourceSets.main.java.srcDirs
  55. classifier = 'sources'
  56. }
  57. artifacts {
  58. archives sourcesJar
  59. }
  60. Properties properties = new Properties()
  61. properties.load(project.rootProject.file('local.properties').newDataInputStream())
  62. bintray {
  63. user = properties.getProperty("bintray.user")
  64. key = properties.getProperty("bintray.apikey")
  65. configurations = ['archives']
  66. pkg {
  67. repo = "maven"
  68. name = "dialogXiOSStyle" //项目在JCenter的名字
  69. websiteUrl = siteUrl
  70. vcsUrl = gitUrl
  71. licenses = ["Apache-2.0"]
  72. publish = true
  73. }
  74. }
  75. dependencies {
  76. implementation fileTree(dir: "libs", include: ["*.jar"])
  77. implementation project(path: ':DialogX')
  78. implementation project(path: ':DialogXInterface')
  79. }