build.gradle 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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"
  7. version = "0.0.24"
  8. android {
  9. compileSdkVersion 30
  10. defaultConfig {
  11. minSdkVersion 21
  12. targetSdkVersion 30
  13. versionCode 24
  14. versionName "0.0.24"
  15. consumerProguardFiles "consumer-rules.pro"
  16. renderscriptTargetApi 21
  17. renderscriptSupportModeEnabled true // Enable RS support
  18. }
  19. buildTypes {
  20. release {
  21. minifyEnabled false
  22. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  23. }
  24. }
  25. }
  26. install {
  27. repositories.mavenInstaller {
  28. // This generates POM.xml with proper parameters
  29. pom {
  30. project {
  31. packaging 'aar'
  32. name 'dialogx'
  33. url siteUrl
  34. licenses {
  35. license {
  36. name 'The Apache Software License, Version 2.0'
  37. url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
  38. }
  39. }
  40. developers {
  41. developer {
  42. id 'myzchh'//设置自己ID
  43. name 'myzchh'//设置自己名字
  44. email 'myzcxhh@live.cn'//设置自己邮箱
  45. }
  46. }
  47. scm {
  48. connection gitUrl
  49. developerConnection gitUrl
  50. url siteUrl
  51. }
  52. }
  53. }
  54. }
  55. }
  56. task sourcesJar(type: Jar) {
  57. from android.sourceSets.main.java.srcDirs
  58. classifier = 'sources'
  59. }
  60. artifacts {
  61. archives sourcesJar
  62. }
  63. Properties properties = new Properties()
  64. properties.load(project.rootProject.file('local.properties').newDataInputStream())
  65. bintray {
  66. user = properties.getProperty("bintray.user")
  67. key = properties.getProperty("bintray.apikey")
  68. configurations = ['archives']
  69. pkg {
  70. repo = "maven"
  71. name = "dialogX" //项目在JCenter的名字
  72. websiteUrl = siteUrl
  73. vcsUrl = gitUrl
  74. licenses = ["Apache-2.0"]
  75. publish = true
  76. }
  77. }
  78. dependencies {
  79. implementation fileTree(dir: "libs", include: ["*.jar"])
  80. implementation 'androidx.appcompat:appcompat:1.2.0+'
  81. api files('libs\\DialogXInterface.jar')
  82. }