-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
138 lines (132 loc) · 5.13 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
apply plugin: 'com.android.application'
apply plugin: "androidx.navigation.safeargs"
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
android {
compileSdkVersion 29
buildToolsVersion '29.0.3'
defaultConfig {
manifestPlaceholders = [appIcon: "@mipmap/ic_launcher_new", appLabel: "@string/app_name"]
applicationId "com.diveboard.mobile"
minSdkVersion 19
targetSdkVersion 29
javaCompileOptions {
annotationProcessorOptions {
arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
}
}
multiDexEnabled = true
}
signingConfigs {
release {
def propFile = file("upload-keystore.properties")
if (propFile.canRead()) {
def keystorePropertiesFile = rootProject.file(propFile)
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
} else {
println(propFile.name + ' is not present, skipping')
android.buildTypes.release.signingConfig = null
}
}
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}
// flavorDimensions "version"
// productFlavors {
// beta {
// dimension "version"
// applicationIdSuffix ".beta"
// versionNameSuffix "-beta"
// manifestPlaceholders = [appIcon: "@mipmap/ic_launcher_beta", appLabel: "@string/app_name_beta"]
// }
// }
lintOptions {
checkReleaseBuilds false
abortOnError false
disable 'DuplicatePlatformClasses'
}
buildFeatures {
dataBinding = true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
configurations.all {
resolutionStrategy.force "org.antlr:antlr4-runtime:4.7.1"
resolutionStrategy.force "org.antlr:antlr4-tool:4.7.1"
}
}
/*tasks.withType(JavaCompile) {
options.compilerArgs << '-Xlint:unchecked'
options.deprecation = true
}*/
dependencies {
def room_version = "2.2.2"
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.android.gms:play-services-analytics:17.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.preference:preference:1.1.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0'
implementation 'com.facebook.android:facebook-login:4.41.0'
implementation 'com.uservoice:uservoice-android-sdk:1.1.2'
implementation 'com.github.Ilhasoft:data-binding-validator:2.0.0'
implementation 'com.android.volley:volley:1.1.1'
implementation 'com.google.code.gson:gson:2.8.5'
implementation "androidx.navigation:navigation-fragment:2.1.0"
implementation 'com.jakewharton:disklrucache:2.0.2'
implementation 'com.google.android.material:material:1.0.0'
implementation "androidx.room:room-runtime:$room_version"
implementation "androidx.room:room-rxjava2:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"
implementation 'androidx.multidex:multidex:2.0.1'
implementation platform('com.google.firebase:firebase-bom:26.6.0')
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.github.stfalcon-studio:StfalconImageViewer:master-SNAPSHOT'
implementation files('libs/ratethisapp-debug.aar')
implementation 'com.github.PhilJay:MPAndroidChart:3.1.0'
}
//workaround against missing 'exclude' option for android resources
//need to exclude all non-xml files
task hideGpg {
doLast {
ant.move file: 'src/release/res/values/google_maps_api.xml.gpg',
todir: "$buildDir/tmp/gpg/"
}
}
task restoreGpg {
doLast {
ant.move file: "$buildDir/tmp/gpg/google_maps_api.xml.gpg",
todir: "src/release/res/values/"
}
}
project.afterEvaluate {
mergeReleaseResources.dependsOn hideGpg
mergeReleaseResources.finalizedBy restoreGpg
}