apply plugin: 'com.android.application' apply plugin: 'kotlin-android' android { namespace "seedit.android" compileSdkVersion rootProject.ext.compileSdkVersion defaultConfig { applicationId "seedit.android" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. // Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61 ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~' } } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } kotlinOptions { jvmTarget = '17' } } repositories { google() mavenCentral() maven { url "https://maven.google.com" } flatDir{ dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs' } } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion" implementation project(':capacitor-android') implementation project(':capacitor-cordova-android-plugins') testImplementation "junit:junit:$junitVersion" androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion" androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion" implementation "org.apache.cordova:framework:$cordovaAndroidVersion" implementation 'com.squareup.okhttp3:okhttp:4.12.0' implementation 'com.squareup.okio:okio:3.9.0' } apply from: 'capacitor.build.gradle' try { def servicesJSON = file('google-services.json') if (servicesJSON.exists() && servicesJSON.text) { apply plugin: 'com.google.gms.google-services' logger.info("google-services.json found, applying Google Services plugin") } else { logger.info("google-services.json not found or empty, Google Services plugin not applied. Push Notifications won't work") } } catch(Exception e) { logger.info("Error checking google-services.json: ${e.message}. Google Services plugin not applied") }