build.gradle 2.6 KB

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