build.gradle 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. plugins {
  2. id 'com.android.application'
  3. }
  4. android {
  5. namespace 'com.compdfkit.pdfviewer'
  6. compileSdk rootProject.ext.android.COMPILESDK
  7. defaultConfig {
  8. applicationId "com.compdfkit.pdfviewer"
  9. minSdk rootProject.ext.android.MINSDK
  10. targetSdk rootProject.ext.android.TARGETSDK
  11. versionCode rootProject.ext.android.VERSIONCODE as int
  12. versionName rootProject.ext.sdk.COMPDFKIT_SDK_VERSION
  13. }
  14. buildTypes {
  15. release {
  16. minifyEnabled false
  17. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  18. android.applicationVariants.all { variant ->
  19. variant.outputs.all {
  20. if (outputFileName.toLowerCase().endsWith('unsigned.apk')) {
  21. outputFileName = "ComPDFKit.apk"
  22. }
  23. }
  24. }
  25. }
  26. debug {
  27. android.applicationVariants.all { variant ->
  28. variant.outputs.all {
  29. if (outputFileName.toLowerCase().endsWith('debug.apk')) {
  30. outputFileName = "ComPDFKit.apk"
  31. }
  32. }
  33. }
  34. }
  35. }
  36. compileOptions {
  37. sourceCompatibility JavaVersion.VERSION_1_8
  38. targetCompatibility JavaVersion.VERSION_1_8
  39. }
  40. buildFeatures {
  41. viewBinding = true
  42. }
  43. }
  44. dependencies {
  45. implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
  46. implementation 'androidx.appcompat:appcompat:1.6.1'
  47. implementation 'com.google.android.material:material:1.8.0'
  48. implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
  49. api project(path: ':ComPDFKit_Tools')
  50. // or
  51. // implementation ('com.compdf:compdfkit-tools:2.1.3')
  52. }