aboutsummaryrefslogtreecommitdiffstats
path: root/android/app/build.gradle
blob: 372fd2716cd9c097f5e933e4f79c42c7ee32b621 (plain) (blame)
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
75
76
77
78
79
80
81
82
83
84
plugins {
    id 'com.android.application'
}

android {
    compileSdk rootProject.ext.compileSdkVersion

    namespace "io.coinos"

    defaultConfig {
        applicationId "io.coinos"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 11
        versionName "1.0.11"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

        aaptOptions {
            // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
            ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
        }
    }

    signingConfigs {
        release {
            keyAlias = System.getenv("KEY_ALIAS") ?: "coinos"
            keyPassword = System.getenv("KEY_PASSWORD") ?: "MPJzfq97"
            storeFile = file(System.getenv("STORE_FILE") ?: "coinos.keystore")
            storePassword = System.getenv("STORE_PASSWORD") ?: "MPJzfq97"
        }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.release

            // Rename APK to app-release-unsigned.apk
            applicationVariants.all { variant ->
                if (variant.buildType.name == "release") {
                    variant.outputs.all { output ->
                        output.outputFileName = "app-release-unsigned.apk"
                    }
                }
            }
        }
    }
}

repositories {
    flatDir {
        dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
    }
}

configurations.all {
    exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk7'
    exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk8'
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
    implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
    implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
    implementation "androidx.webkit:webkit:$androidxWebkitVersion"
    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")
}