forked from fossasia/open-event-attendee-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
198 lines (170 loc) · 7.14 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
plugins {
id "com.diffplug.gradle.spotless" version "3.23.0"
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'androidx.navigation.safeargs.kotlin'
def STRIPE_API_TOKEN = System.getenv('STRIPE_API_TOKEN') ?: "YOUR_API_KEY"
def MAPBOX_KEY = System.getenv('MAPBOX_KEY') ?: "pk.eyJ1IjoiYW5nbWFzMSIsImEiOiJjanNqZDd0N2YxN2Q5NDNuNTBiaGt6eHZqIn0.BCrxjW6rP_OuOuGtbhVEQg"
android {
dataBinding {
enabled = true
}
compileSdkVersion 28
defaultConfig {
applicationId "com.eventyay.attendee"
minSdkVersion 21
targetSdkVersion 28
versionCode 9
versionName "0.3.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
javaCompileOptions {
annotationProcessorOptions {
arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
}
}
}
buildTypes {
release {
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField "String", "DEFAULT_BASE_URL", '"https://api.eventyay.com/v1/"'
buildConfigField "String", "FRONTEND_URL", '"https://eventyay.com/"'
buildConfigField "String", "MAPBOX_KEY", '"'+MAPBOX_KEY+'"'
buildConfigField "String", "STRIPE_API_KEY", '"'+STRIPE_API_TOKEN+'"'
}
debug {
buildConfigField "String", "DEFAULT_BASE_URL", '"https://open-event-api-dev.herokuapp.com/v1/"'
buildConfigField "String", "FRONTEND_URL", '"https://fossasia.github.io/open-event-frontend/"'
buildConfigField "String", "MAPBOX_KEY", '"'+MAPBOX_KEY+'"'
buildConfigField "String", "STRIPE_API_KEY", '"'+STRIPE_API_TOKEN+'"'
}
}
flavorDimensions "default"
productFlavors {
fdroid {
dimension "default"
}
playStore {
dimension "default"
}
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
testOptions {
unitTests.returnDefaultValues = true
}
packagingOptions {
pickFirst 'kotlin/**'
}
lintOptions {
disable 'MissingTranslation'
}
androidExtensions {
experimental = true
}
aaptOptions {
cruncherEnabled = false
}
}
spotless {
kotlin {
ktlint().userData(['android': 'true', 'color': 'true',
'max_line_length': '120', 'reporter': 'checkstyle'])
target '**/*.kt'
}
}
repositories {
google()
mavenCentral()
}
dependencies {
def lifecycle_version = "2.2.0-alpha01"
def koin_version = "2.0.1"
def roomVersion = "2.1.0-rc01"
def ktx_version = "1.0.0"
def ktx2_version = "2.0.0"
def nav_version = "2.1.0-alpha04"
def anko_version = "0.10.8"
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.appcompat:appcompat:1.1.0-alpha05'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta1'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha05'
implementation 'com.google.android.material:material:1.1.0-alpha07'
implementation "androidx.browser:browser:1.0.0"
implementation 'androidx.exifinterface:exifinterface:1.0.0'
implementation "androidx.lifecycle:lifecycle-extensions:${lifecycle_version}"
implementation "androidx.lifecycle:lifecycle-common-java8:${lifecycle_version}"
implementation "androidx.lifecycle:lifecycle-reactivestreams:${lifecycle_version}"
implementation "androidx.room:room-runtime:${roomVersion}"
implementation "androidx.room:room-rxjava2:${roomVersion}"
kapt "androidx.room:room-compiler:${roomVersion}"
testImplementation "androidx.room:room-testing:${roomVersion}"
implementation 'androidx.preference:preference:1.1.0-alpha01'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
// KTX
implementation "androidx.core:core-ktx:$ktx_version"
implementation "androidx.fragment:fragment-ktx:$ktx_version"
implementation "androidx.collection:collection-ktx:$ktx_version"
implementation "androidx.lifecycle:lifecycle-reactivestreams-ktx:$ktx2_version"
// Koin
implementation "org.koin:koin-android:$koin_version"
implementation "org.koin:koin-androidx-scope:$koin_version"
implementation "org.koin:koin-androidx-viewmodel:$koin_version"
// Location Play Service
playStoreImplementation 'com.google.android.gms:play-services-location:16.0.0'
//Smart Auth Play Service
playStoreImplementation 'com.google.android.gms:play-services-auth:16.0.1'
// Timber
implementation 'com.jakewharton.timber:timber:4.7.1'
implementation 'com.jakewharton.threetenabp:threetenabp:1.2.0'
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.9.6"
implementation 'com.github.jasminb:jsonapi-converter:0.9'
implementation 'com.squareup.okhttp3:logging-interceptor:3.14.2'
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-jackson:2.5.0'
// Cards Shimmer Animation
implementation 'com.facebook.shimmer:shimmer:0.4.0'
// RxJava
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'io.reactivex.rxjava2:rxkotlin:2.3.0'
implementation 'io.reactivex.rxjava2:rxjava:2.2.9'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
// Picasso
implementation 'com.squareup.picasso:picasso:2.71828'
// Stripe
implementation 'com.stripe:stripe-android:9.1.1'
// QR Code
implementation 'com.journeyapps:zxing-android-embedded:3.6.0'
//Navigation
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version" // For Kotlin use navigation-fragment-ktx
implementation "androidx.navigation:navigation-ui-ktx:$nav_version" // For Kotlin use navigation-ui-ktx
//Anko
implementation "org.jetbrains.anko:anko-commons:$anko_version"
implementation "org.jetbrains.anko:anko-design:$anko_version"
//Mapbox java sdk
implementation 'com.mapbox.mapboxsdk:mapbox-sdk-services:4.8.0'
// Stetho
debugImplementation 'com.facebook.stetho:stetho:1.5.1'
debugImplementation 'com.facebook.stetho:stetho-okhttp3:1.5.1'
releaseImplementation 'com.github.iamareebjamal:stetho-noop:1.2.1'
testImplementation 'com.github.iamareebjamal:stetho-noop:1.2.1'
//LeakCanary
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.0-alpha-2'
testImplementation 'junit:junit:4.12'
testImplementation "io.mockk:mockk:1.9.3"
testImplementation 'org.threeten:threetenbp:1.4.0'
testImplementation "org.koin:koin-test:$koin_version"
testImplementation 'androidx.arch.core:core-testing:2.0.1'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}