build.gradle 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. plugins {
  2. id 'io.sentry.android.gradle' version '4.1.1'
  3. }
  4. apply plugin: 'com.android.application'
  5. android {
  6. namespace "com.logseq.app"
  7. compileSdkVersion rootProject.ext.compileSdkVersion
  8. defaultConfig {
  9. applicationId "com.logseq.app"
  10. minSdkVersion rootProject.ext.minSdkVersion
  11. targetSdkVersion rootProject.ext.targetSdkVersion
  12. versionCode 80
  13. versionName "0.10.6"
  14. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  15. aaptOptions {
  16. // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
  17. // Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
  18. ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
  19. }
  20. manifestPlaceholders = [LOGSEQ_SENTRY_DSN: "$System.env.LOGSEQ_SENTRY_DSN"]
  21. }
  22. buildTypes {
  23. release {
  24. minifyEnabled false
  25. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  26. }
  27. }
  28. }
  29. repositories {
  30. flatDir{
  31. dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
  32. }
  33. }
  34. dependencies {
  35. implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
  36. implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
  37. implementation fileTree(include: ['*.jar'], dir: 'libs')
  38. implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
  39. implementation project(':capacitor-android')
  40. implementation 'androidx.documentfile:documentfile:1.0.1'
  41. testImplementation "junit:junit:$junitVersion"
  42. androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
  43. androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
  44. implementation project(':capacitor-cordova-android-plugins')
  45. }
  46. apply from: 'capacitor.build.gradle'
  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. }
  55. sentry {
  56. org = "logseq"
  57. projectName = "logseq"
  58. // this will upload your source code to Sentry to show it as part of the stack traces
  59. // disable if you don't want to expose your sources
  60. includeSourceContext = false
  61. }