-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
69 lines (55 loc) · 1.7 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
69
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath "com.android.tools.build:gradle:4.0.1"
}
}
apply plugin: "com.android.application"
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
def versionMajor = 2
def versionMinor = 1
def versionPatch = 1
versionName buildVersionName(versionMajor, versionMinor, versionPatch)
versionCode buildVersionCode(versionMajor, versionMinor, versionPatch)
minSdkVersion 21
targetSdkVersion 28
}
signingConfigs {
release {
def signingFile = file("signing.properties")
def signingProperties = new Properties()
if (signingFile.exists()) {
signingProperties.load(signingFile.newInputStream())
storeFile file(signingProperties["keystore.file"])
storePassword signingProperties["keystore.password"]
keyAlias signingProperties["key.alias"]
keyPassword signingProperties["key.password"]
}
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}
static def buildVersionName(versionMajor, versionMinor, versionPatch) {
return "${versionMajor}.${versionMinor}.${versionPatch}"
}
static def buildVersionCode(versionMajor, versionMinor, versionPatch) {
return versionMajor * 10 ** 2 + versionMinor * 10 ** 1 + versionPatch * 10 ** 0
}
dependencies {
repositories {
jcenter()
google()
}
implementation "com.google.android.apps.muzei:muzei-api:3.4.0"
implementation "com.google.code.gson:gson:2.8.6"
}