|
| 1 | +apply plugin: 'com.android.application' |
| 2 | +apply from: 'capacitor.build.gradle' |
| 3 | +apply plugin: 'org.jetbrains.kotlin.android' |
| 4 | + |
| 5 | +android { |
| 6 | + kotlinOptions { |
| 7 | + jvmTarget = '21' |
| 8 | + } |
| 9 | + |
| 10 | + namespace "com.foxdebug.acode" |
| 11 | + compileSdk rootProject.ext.compileSdkVersion |
| 12 | + android.buildFeatures.buildConfig true |
| 13 | + defaultConfig { |
| 14 | + applicationId "com.foxdebug.acode" |
| 15 | + |
| 16 | + |
| 17 | + //sdk versions and other stuff should be changed from variables.build.gradle |
| 18 | + minSdkVersion rootProject.ext.minSdkVersion |
| 19 | + targetSdkVersion rootProject.ext.targetSdkVersion |
| 20 | + |
| 21 | + //fdroid expect this as literals so no fancy logic |
| 22 | + versionCode 957 |
| 23 | + versionName "1.11.1" |
| 24 | + |
| 25 | + flavorDimensions += "default" |
| 26 | + productFlavors{ |
| 27 | + free{ |
| 28 | + applicationId = "com.foxdebug.acodefree" |
| 29 | + dimension = "default" |
| 30 | + buildConfigField("boolean", "PAID", "false") |
| 31 | + } |
| 32 | + |
| 33 | + paid{ |
| 34 | + applicationId = "com.foxdebug.acode" |
| 35 | + dimension = "default" |
| 36 | + buildConfigField("boolean", "PAID", "true") |
| 37 | + } |
| 38 | + } |
| 39 | + |
| 40 | + |
| 41 | + aaptOptions { |
| 42 | + // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. |
| 43 | + // Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61 |
| 44 | + ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~' |
| 45 | + } |
| 46 | + } |
| 47 | + |
| 48 | + buildTypes { |
| 49 | + release { |
| 50 | + minifyEnabled false |
| 51 | + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' |
| 52 | + } |
| 53 | + } |
| 54 | +} |
| 55 | + |
| 56 | +repositories { |
| 57 | + flatDir{ |
| 58 | + dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs' |
| 59 | + } |
| 60 | +} |
| 61 | + |
| 62 | +dependencies { |
| 63 | + implementation fileTree(include: ['*.jar'], dir: 'libs') |
| 64 | + implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion" |
| 65 | + implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion" |
| 66 | + implementation project(':capacitor-android') |
| 67 | + implementation project(':capacitor-cordova-android-plugins') |
| 68 | + |
| 69 | + //sftp |
| 70 | + implementation "com.sshtools:maverick-synergy-client:3.1.2" |
| 71 | +} |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | +try { |
| 76 | + def servicesJSON = file('google-services.json') |
| 77 | + if (servicesJSON.text) { |
| 78 | + apply plugin: 'com.google.gms.google-services' |
| 79 | + } |
| 80 | +} catch(Exception e) { |
| 81 | + logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work") |
| 82 | +} |
0 commit comments