build.gradle 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. plugins {
  2. id 'com.android.library'
  3. }
  4. apply from: '../compdfkit-tools-mavencentral.gradle'
  5. def getProductName() {
  6. return "ComPDFKitDemo"
  7. }
  8. def releaseTime() {
  9. return new Date().format("yyyy-MM-dd_hh-mm-ss", TimeZone.getTimeZone("GMT+08:00"))
  10. }
  11. android {
  12. namespace 'com.compdfkit.tools'
  13. compileSdk rootProject.ext.android.COMPILESDK
  14. resourcePrefix 'tools_'
  15. publishing {
  16. singleVariant('release') {
  17. withSourcesJar()
  18. withJavadocJar()
  19. }
  20. }
  21. defaultConfig {
  22. minSdk rootProject.ext.android.MINSDK
  23. targetSdk rootProject.ext.android.TARGETSDK
  24. buildConfigField("String", "COMPDFKit_SDK_VERSION", "\"${versionName}\"")
  25. buildConfigField("String", "COMPDFKit_SDK_BUILD_TAG", "\"${versionName}_${versionCode}_${releaseTime()}\"")
  26. consumerProguardFiles "proguard-rules.pro"
  27. setProperty("archivesBaseName", "ComPDFKit_Tools")
  28. vectorDrawables.useSupportLibrary = true
  29. }
  30. buildTypes {
  31. release {
  32. minifyEnabled true
  33. zipAlignEnabled true
  34. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  35. }
  36. }
  37. compileOptions {
  38. sourceCompatibility JavaVersion.VERSION_1_8
  39. targetCompatibility JavaVersion.VERSION_1_8
  40. }
  41. }
  42. dependencies {
  43. api fileTree(include: ['*.jar'], dir: 'libs')
  44. // use this
  45. api project(path:':ComPDFKit_Repo:compdfkit')
  46. api project(path:':ComPDFKit_Repo:compdfkit-ui')
  47. // or use
  48. // api ('com.compdf:compdfkit:2.1.4')
  49. // api ('com.compdf:compdfkit-ui:2.2.0-SNAPSHOT')
  50. // api project(path: ':ComPDFKit')
  51. // api project(path: ':ComPDFKit-UI')
  52. api 'com.github.bumptech.glide:glide:4.15.1'
  53. annotationProcessor 'com.github.bumptech.glide:compiler:4.15.1'
  54. api 'androidx.documentfile:documentfile:1.0.1'
  55. api 'androidx.appcompat:appcompat:1.6.1'
  56. api 'com.google.android.material:material:1.8.0'
  57. api 'androidx.constraintlayout:constraintlayout:2.1.4'
  58. }
  59. configurations.all { resolutionStrategy.cacheChangingModulesFor 0, 'seconds' }