build.gradle 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. apply plugin: 'com.android.application'
  2. apply from: 'capacitor.build.gradle'
  3. apply plugin: 'kotlin-android'
  4. apply plugin: 'org.jetbrains.kotlin.plugin.compose'
  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 87
  13. versionName "0.11.0"
  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. }
  21. buildTypes {
  22. release {
  23. minifyEnabled false
  24. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  25. }
  26. }
  27. buildFeatures {
  28. compose true
  29. }
  30. composeOptions {
  31. kotlinCompilerExtensionVersion rootProject.ext.composeCompilerVersion
  32. }
  33. kotlinOptions {
  34. jvmTarget = '21'
  35. }
  36. }
  37. repositories {
  38. flatDir {
  39. dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
  40. }
  41. }
  42. dependencies {
  43. implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
  44. implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
  45. implementation fileTree(include: ['*.jar'], dir: 'libs')
  46. implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
  47. implementation platform("androidx.compose:compose-bom:$composeBomVersion")
  48. implementation "androidx.activity:activity-compose:$androidxActivityVersion"
  49. implementation "androidx.compose.ui:ui"
  50. implementation "androidx.compose.foundation:foundation"
  51. implementation "androidx.compose.material3:material3"
  52. implementation "androidx.compose.material:material-icons-extended"
  53. implementation "androidx.compose.runtime:runtime"
  54. implementation "androidx.compose.animation:animation"
  55. implementation "androidx.navigation:navigation-compose:$androidxNavigationVersion"
  56. implementation "com.google.android.material:material:$materialVersion"
  57. implementation project(':capacitor-android')
  58. implementation 'androidx.documentfile:documentfile:1.0.1'
  59. testImplementation "junit:junit:$junitVersion"
  60. androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
  61. androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
  62. implementation project(':capacitor-cordova-android-plugins')
  63. }
  64. try {
  65. def servicesJSON = file('google-services.json')
  66. if (servicesJSON.text) {
  67. apply plugin: 'com.google.gms.google-services'
  68. }
  69. } catch (Exception e) {
  70. logger.warn("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
  71. }