build.gradle 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. apply plugin: 'com.android.application'
  2. apply from: 'capacitor.build.gradle'
  3. apply plugin: 'kotlin-android'
  4. android {
  5. namespace "com.logseq.app"
  6. compileSdkVersion rootProject.ext.compileSdkVersion
  7. defaultConfig {
  8. applicationId "com.logseq.app"
  9. minSdkVersion rootProject.ext.minSdkVersion
  10. targetSdkVersion rootProject.ext.targetSdkVersion
  11. versionCode 87
  12. versionName "0.11.0"
  13. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  14. aaptOptions {
  15. // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
  16. // Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
  17. ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
  18. }
  19. }
  20. buildTypes {
  21. release {
  22. minifyEnabled false
  23. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  24. }
  25. }
  26. kotlinOptions {
  27. jvmTarget = '21'
  28. }
  29. }
  30. repositories {
  31. flatDir {
  32. dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
  33. }
  34. }
  35. dependencies {
  36. implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
  37. implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
  38. implementation fileTree(include: ['*.jar'], dir: 'libs')
  39. implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
  40. implementation project(':capacitor-android')
  41. implementation 'androidx.documentfile:documentfile:1.0.1'
  42. testImplementation "junit:junit:$junitVersion"
  43. androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
  44. androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
  45. implementation project(':capacitor-cordova-android-plugins')
  46. }
  47. try {
  48. def servicesJSON = file('google-services.json')
  49. if (servicesJSON.text) {
  50. apply plugin: 'com.google.gms.google-services'
  51. }
  52. } catch (Exception e) {
  53. logger.warn("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
  54. }