Repository navigation
Expand file tree
/
Copy pathbuild.gradle
More file actions
74 lines (69 loc) · 3.08 KB
/
Copy pathbuild.gradle
File metadata and controls
74 lines (69 loc) · 3.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
apply plugin: 'com.android.application'
android {
namespace = "org.maxfinder.app"
compileSdk = rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "org.maxfinder.app"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "0.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:!*~'
}
}
// Release signing is driven entirely by environment variables, so this repo
// never contains a keystore or any password. When the env vars are absent —
// local builds and F-Droid's build servers, which sign the APK with their
// own key — the release APK is left unsigned, which is exactly what F-Droid
// expects. When the GitHub "Release Android APK" workflow supplies them (from
// repo secrets), assembleRelease produces a signed, installable APK.
signingConfigs {
release {
def ksFile = System.getenv("MAXFINDER_KEYSTORE_FILE")
if (ksFile) {
storeFile file(ksFile)
storePassword System.getenv("MAXFINDER_KEYSTORE_PASSWORD")
keyAlias System.getenv("MAXFINDER_KEY_ALIAS")
keyPassword System.getenv("MAXFINDER_KEY_PASSWORD")
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
if (System.getenv("MAXFINDER_KEYSTORE_FILE")) {
signingConfig signingConfigs.release
}
}
}
}
repositories {
flatDir{
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
implementation project(':capacitor-android')
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
implementation project(':capacitor-cordova-android-plugins')
}
apply from: 'capacitor.build.gradle'
try {
def servicesJSON = file('google-services.json')
if (servicesJSON.text) {
apply plugin: 'com.google.gms.google-services'
}
} catch(Exception e) {
logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
}