build.gradle 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.14'
  51. // or
  52. // implementation ('com.compdf:compdfkit-tools:2.1.3')
  53. }