-
Notifications
You must be signed in to change notification settings - Fork 115
/
build.gradle
68 lines (55 loc) · 1.83 KB
/
build.gradle
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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
classpath 'com.bugsnag:bugsnag-android-gradle-plugin:3.5.0'
classpath 'com.github.triplet.gradle:play-publisher:2.0.0-rc1'
}
}
plugins {
id "org.sonarqube" version "2.7"
}
allprojects {
repositories {
google()
mavenCentral()
jcenter()
}
}
ext {
compileSdkVersion = 29
buildToolsVersion = "29.0.2"
minSdkVersion = 18
targetSdkVersion = 29
versionMajor = 7
versionMinor = 1
versionPatch = 0
versionCode = versionMajor * 1000000 + versionMinor * 1000 + versionPatch
versionName = "${versionMajor}.${versionMinor}.${versionPatch}"
def Properties properties = new Properties()
if(file('local.properties').exists())
properties.load(project.rootProject.file('local.properties').newDataInputStream())
keystorePassword = getValue(properties, "KEYSTORE_PASS")
keyAlias = getValue(properties, "ALIAS_NAME")
keyPassword = getValue(properties, "ALIAS_PASS")
bugsnagToken = getValue(properties, "BUGSNAG_TOKEN")
serviceAccountEmail = getValue(properties, "SERVICE_EMAIL")
bintrayUser = getValue(properties, "BINTRAY_USER")
bintrayPassword = getValue(properties, "BINTRAY_API_KEY")
}
def getValue(def props, def name){
if(props && props[name])
return props[name]
else if(System.getenv(name))
return System.getenv(name)
else {
logger.log(LogLevel.ERROR, name + " has not been provided, add it to your local.properties file")
return "DEFAULT"
}
}