-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
116 lines (100 loc) · 4.45 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
//file:noinspection GroovyAssignabilityCheck
//file:noinspection GrUnresolvedAccess
buildscript {
// Defining versions in a single place
ext {
// sdk versions
compile_sdk_version = 34
build_tools_version = "30.0.3"
min_sdk_version = 21
target_sdk_version = 34
/* to check the latest version @see
https://play.google.com/console/u/0/developers/6867856033872987263/app/4975238491076611804/releases/overview
*/
version_code = 22
version_name = "2.1.1"
}
repositories {
// Google's Maven repository
google()
mavenCentral()
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:8.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20"
classpath "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
// Google Services plugin (for firebase)
classpath "com.google.gms:google-services:$google_services_version"
// Crashlytics Gradle plugin
classpath "com.google.firebase:firebase-crashlytics-gradle:$firebase_crashlytics_gradle_version"
// the dependency for the Performance Monitoring plugin
classpath "com.google.firebase:perf-plugin:$firebase_perf_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
subprojects {
afterEvaluate {
dependencies {
// Add to avoid w:Kotlin runtime JAR files in the classpath should have the same version
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
// (Asynchronous programming) coroutines
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"
// Retrofit2
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
// Room Database
kapt "androidx.room:room-compiler:$room_version"
// Paging
implementation "androidx.paging:paging-runtime:$paging_version"
/* Bill of Materials for the Firebase platform.
* When using the BoM, no need to specify versions in Firebase library dependencies */
implementation platform("com.google.firebase:firebase-bom:$firebase_bom_version")
// Declaring the dependencies for the Crashlytics and Analytics libraries
implementation 'com.google.firebase:firebase-crashlytics-ktx'
// Firebase SDK for Google Analytics
implementation 'com.google.firebase:firebase-analytics-ktx'
// avoids "Service not registered" exception
implementation "com.google.android.gms:play-services-basement:$play_services_basement_version"
// Koin testing tools
testImplementation "io.insert-koin:koin-test:$koin_core_version"
// Needed JUnit version
testImplementation "io.insert-koin:koin-test-junit4:$koin_core_version"
testImplementation "com.google.truth:truth:1.1.3"
}
}
}
allprojects {
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
maven { url "https://maven.google.com" }
}
}
ext {
getParam = { key ->
def value = System.getenv(key) ?: project.findProperty("env.$key")
if (value) {
println "$key = $value"
}
return value
}
HOST_URL = getParam("HOST_URL")
COUNTRIES_API_KEY = getParam("COUNTRIES_API_KEY")
DATABASE_NAME = getParam("DATABASE_NAME")
SIGNING_KEY_DEBUG_PATH = getParam("SIGNING_KEY_DEBUG_PATH")
SIGNING_KEY_DEBUG_PASSWORD = getParam("SIGNING_KEY_DEBUG_PASSWORD")
SIGNING_KEY_DEBUG_KEY = getParam("SIGNING_KEY_DEBUG_KEY")
SIGNING_KEY_DEBUG_KEY_PASSWORD = getParam("SIGNING_KEY_DEBUG_KEY_PASSWORD")
SIGNING_KEY_RELEASE_PATH = getParam("SIGNING_KEY_RELEASE_PATH")
SIGNING_KEY_RELEASE_PASSWORD = getParam("SIGNING_KEY_RELEASE_PASSWORD")
SIGNING_KEY_RELEASE_KEY = getParam("SIGNING_KEY_RELEASE_KEY")
SIGNING_KEY_RELEASE_KEY_PASSWORD = getParam("SIGNING_KEY_RELEASE_KEY_PASSWORD")
}
tasks.register('clean') {
delete rootProject.buildDir
}