build.gradle 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. apply plugin: 'com.android.application'
  2. android {
  3. compileSdkVersion rootProject.ext.compileSdkVersion
  4. defaultConfig {
  5. applicationId "com.caner.test2"
  6. minSdkVersion rootProject.ext.minSdkVersion
  7. targetSdkVersion rootProject.ext.targetSdkVersion
  8. versionCode 1
  9. versionName "1.33"
  10. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  11. aaptOptions {
  12. // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
  13. // Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
  14. ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
  15. }
  16. }
  17. buildTypes {
  18. release {
  19. minifyEnabled false
  20. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  21. }
  22. }
  23. namespace "com.caner.test2"
  24. }
  25. repositories {
  26. flatDir{
  27. dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
  28. }
  29. }
  30. dependencies {
  31. implementation fileTree(include: ['*.jar'], dir: 'libs')
  32. implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
  33. implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
  34. implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
  35. implementation project(':capacitor-android')
  36. testImplementation "junit:junit:$junitVersion"
  37. androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
  38. androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
  39. implementation project(':capacitor-cordova-android-plugins')
  40. }
  41. android.applicationVariants.all { variant ->
  42. variant.outputs.all {
  43. outputFileName = "test2.apk"
  44. }
  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.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
  54. }