This repository has been archived by the owner on Feb 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
/
build.gradle
158 lines (126 loc) · 3.65 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
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
buildscript {
ext.ver_crashlytics = '2.9.4' // https://docs.fabric.io/android/changelog.html#crashlytics
ext.ver_fabricPlugin = '1.25.4' // https://docs.fabric.io/android/changelog.html#fabric-gradle-plugin
repositories {
google()
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath "io.fabric.tools:gradle:${ver_fabricPlugin}"
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
tasks.withType(JavaCompile) {
options.compilerArgs << '-Xlint:all'
options.compilerArgs << '-Xlint:-deprecation'
options.compilerArgs << '-Xlint:-unchecked'
}
}
// task clean(type: Delete) {
// delete rootProject.buildDir
// }
apply plugin: 'com.android.application'
if (getGradle().getStartParameter().getTaskRequests().toString().contains("Withanalytics")){
apply plugin: 'io.fabric'
}
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
externalNativeBuild {
cmake {
path 'src/main/jni/CMakeLists.txt'
}
}
defaultConfig {
//noinspection MinSdkTooLow
minSdkVersion 9 // min 9 for fabric
targetSdkVersion 27
versionName '2018.07.02'
versionCode 1807020000
}
if (new File('tools/signing.properties').exists()) {
Properties props = new Properties()
props.load(new FileInputStream(file('tools/signing.properties')))
signingConfigs {
release {
storeFile file('tools/signing.keystore')
keyAlias props['keyAlias']
storePassword props['storePassword']
keyPassword props['keyPassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
}
}
flavorDimensions 'package', 'difficulty', 'analytics', 'zeemote', 'rateoffer'
productFlavors {
gplaynormal {
dimension 'package'
applicationId 'zame.GloomyDungeons.freedemo.game'
}
gplayhardcore {
dimension 'package'
applicationId 'org.zamedev.gloomydungeons1hardcore.gplay'
}
fdroidnormal {
dimension 'package'
applicationId 'zame.GloomyDungeons.opensource.game'
}
fdroidhardcore {
dimension 'package'
applicationId 'org.zamedev.gloomydungeons1hardcore.opensource'
}
normal {
dimension 'difficulty'
}
hardcore {
dimension 'difficulty'
}
withoutanalytics {
dimension 'analytics'
}
withanalytics {
dimension 'analytics'
}
withoutzeemote {
dimension 'zeemote'
}
withzeemote {
dimension 'zeemote'
}
withoutrateoffer {
dimension 'rateoffer'
}
withrateoffer {
dimension 'rateoffer'
}
}
externalNativeBuild {
cmake {
path 'src/main/cpp/CMakeLists.txt'
}
}
}
dependencies {
withanalyticsImplementation("com.crashlytics.sdk.android:crashlytics:${ver_crashlytics}@aar") {
transitive = true
}
withzeemoteImplementation fileTree(dir: 'src/withzeemote/libs', include: [ '*.jar' ])
}