build.gradle 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 "consumer-rules.pro"
  21. }
  22. buildTypes {
  23. release {
  24. minifyEnabled true
  25. zipAlignEnabled true
  26. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  27. }
  28. }
  29. compileOptions {
  30. sourceCompatibility JavaVersion.VERSION_1_8
  31. targetCompatibility JavaVersion.VERSION_1_8
  32. }
  33. }
  34. dependencies {
  35. api fileTree(include: ['*.jar'], dir: 'libs')
  36. api project(path:':ComPDFKit_Repo:compdfkit')
  37. api project(path:':ComPDFKit_Repo:compdfkit-ui')
  38. api 'com.github.bumptech.glide:glide:4.15.1'
  39. annotationProcessor 'com.github.bumptech.glide:compiler:4.15.1'
  40. api 'androidx.documentfile:documentfile:1.0.1'
  41. api 'androidx.appcompat:appcompat:1.6.1'
  42. api 'com.google.android.material:material:1.8.0'
  43. api 'androidx.constraintlayout:constraintlayout:2.1.4'
  44. }