summaryrefslogtreecommitdiff
path: root/main/build.gradle
blob: ca2295e47a071c2742c8f0f34a97d8cebb50269c (plain)
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
/*
 * Copyright (c) 2012-2016 Arne Schwabe
 * Distributed under the GNU GPL v2 with additional terms. For full terms see the file doc/LICENSE.txt
 */

import com.android.builder.model.ProductFlavor

apply plugin: 'com.android.application'

repositories {
    jcenter()
}

dependencies {
    compile 'com.android.support:support-annotations:25.1.0'
    compile 'com.android.support:cardview-v7:25.1.0'
    compile 'com.android.support:recyclerview-v7:25.1.0'
    //    compile 'ch.acra:acra:4.5.0'

    testCompile 'junit:junit:4.12'
}

android {
    compileSdkVersion 25
    buildToolsVersion '25.0.2'

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 25
        versionCode = 145
        versionName = "0.6.64"
    }

    sourceSets {
        main {
            assets.srcDirs = ['src/main/assets', 'ovpnlibs/assets']
            jniLibs.srcDirs = ['ovpnlibs/jniLibs']
            jni.srcDirs = [] //disable automatic ndk-build
        }
        
        ovpn3 {
         
        }

        debug {

        }

        release {

        }
    }

    /*
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }*/

    signingConfigs {
        release
    }

    lintOptions {
        enable 'BackButton', 'EasterEgg', 'StopShip', 'IconExpectedSize', 'GradleDynamicVersion', 'NewerVersionAvailable'
        disable 'MissingTranslation'
    }

    buildTypes {
        release {
            signingConfig signingConfigs.release
        }
    }


    productFlavors {
      //ovpn3

      normal


        modern {
            minSdkVersion 21
        }
      /*                   
      x86 {
            versionCode Integer.parseInt("6" + defaultConfig.versionCode)
            ndk {
                abiFilter "x86"
            }
        }

        mips {
            versionCode Integer.parseInt("4" + defaultConfig.versionCode)
            ndk {
                abiFilter "mips"
            }
        }

        armv7 {
            versionCode Integer.parseInt("2" + defaultConfig.versionCode)
            ndk {
               abiFilter "armeabi-v7a"
            }
        }

        arm {
            versionCode Integer.parseInt("1" + defaultConfig.versionCode)
            ndk {
                abiFilter "armeabi"
            }
        }

        fat
        */
    }


}



// ~/.gradle/gradle.properties
if (project.hasProperty('keystoreFile') &&
        project.hasProperty('keystorePassword') &&
        project.hasProperty('keystoreAliasPassword')) {
    android.signingConfigs.release.storeFile = file(keystoreFile)
    android.signingConfigs.release.storePassword = keystorePassword
    android.signingConfigs.release.keyPassword = keystoreAliasPassword
    android.signingConfigs.release.keyAlias = keystoreAlias
} else {
    android.buildTypes.release.signingConfig = null
}

/*tasks.withType(com.android.build.gradle.tasks.PackageApplication) { pkgTask ->
    pkgTask.jniFolders = new HashSet<File>()
    pkgTask.jniFolders.add(new File(buildDir, 'native-libs'))
}
*/