build.gradle 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. defaultConfig {
  16. minSdk rootProject.ext.android.MINSDK
  17. targetSdk rootProject.ext.android.TARGETSDK
  18. buildConfigField("String", "COMPDFKit_SDK_VERSION", "\"${versionName}\"")
  19. buildConfigField("String", "COMPDFKit_SDK_BUILD_TAG", "\"${versionName}_${versionCode}_${releaseTime()}\"")
  20. consumerProguardFiles "proguard-rules.pro"
  21. setProperty("archivesBaseName", "ComPDFKit_Tools")
  22. }
  23. buildTypes {
  24. release {
  25. minifyEnabled true
  26. zipAlignEnabled true
  27. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  28. libraryVariants.all { variant ->
  29. variant.outputs.all { output ->
  30. if (outputFile != null && outputFileName.endsWith('.aar')) {
  31. outputFileName = "ComPDFKit_Tools.aar"
  32. }
  33. }
  34. }
  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. api project(path:':ComPDFKit_Repo:compdfkit')
  45. api project(path:':ComPDFKit_Repo:compdfkit-ui')
  46. // api ('com.compdf:compdfkit:1.13.0')
  47. // api ('com.compdf:compdfkit-ui:1.13.0')
  48. api 'com.github.bumptech.glide:glide:4.15.1'
  49. annotationProcessor 'com.github.bumptech.glide:compiler:4.15.1'
  50. api 'androidx.documentfile:documentfile:1.0.1'
  51. api 'androidx.appcompat:appcompat:1.6.1'
  52. api 'com.google.android.material:material:1.8.0'
  53. api 'androidx.constraintlayout:constraintlayout:2.1.4'
  54. }
  55. configurations.all { resolutionStrategy.cacheChangingModulesFor 0, 'seconds' }