-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
142 lines (121 loc) · 4.84 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
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
id 'dagger.hilt.android.plugin'
}
ext.versionMajor = 0
ext.versionMinor = 8
ext.versionPatch = 0
ext.versionClassifier = "alpha"
ext.minimumSdkVersion = 24
def generateVersionCode() {
return ext.minimumSdkVersion * 10000000 + ext.versionMajor * 10000 + ext.versionMinor * 100 + ext.versionPatch
}
def generateVersionName() {
String versionName = "${ext.versionMajor}.${ext.versionMinor}.${ext.versionPatch}"
if (ext.versionClassifier != null && !ext.versionClassifier.isEmpty()) {
versionName += "-" + ext.versionClassifier
}
return versionName
}
def localProperties = new Properties()
if (rootProject.file("local.properties").exists()) {
localProperties.load(new FileInputStream(rootProject.file("local.properties")))
}
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file("keystore.properties")
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android {
signingConfigs {
'release-signed' {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
compileSdk 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.shevaalex.android.plugev"
minSdk project.ext.minimumSdkVersion
targetSdk 30
versionCode generateVersionCode()
versionName generateVersionName()
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
manifestPlaceholders = [ googleMapsKey : localProperties.getProperty("googleMapsApiKey", "") ]
buildConfigField "String", "OPEN_CHARGE_MAP_KEY", "\"${localProperties['openChargeMapKey']}\""
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.'release-signed'
}
create("snapshot") {
initWith(getByName("debug"))
applicationIdSuffix = ".snapshot"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
useIR = true
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion compose_version
}
}
dependencies {
//Testing
testImplementation 'io.mockk:mockk:1.10.6'
testImplementation 'junit:junit:4.13.2'
testImplementation 'com.google.truth:truth:1.1.2'
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.4.3'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
//Core
implementation 'androidx.core:core-ktx:1.6.0'
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.3.0'
//Compose
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose.ui:ui-tooling:$compose_version"
implementation 'androidx.activity:activity-compose:1.3.0'
//Accompanist
def accompVersion = "0.12.0"
implementation "com.google.accompanist:accompanist-insets:$accompVersion"
implementation "com.google.accompanist:accompanist-systemuicontroller:$accompVersion"
//Lifecycle + Compose lifecycle
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha07'
//Maps + Utility Library + ktx extensions
implementation 'com.google.android.gms:play-services-maps:17.0.1'
implementation 'com.google.maps.android:maps-ktx:2.3.0'
implementation 'com.google.maps.android:android-maps-utils:2.2.3'
implementation 'com.google.maps.android:maps-utils-ktx:3.0.0'
//Location services
implementation 'com.google.android.gms:play-services-location:18.0.0'
//LeakCanary
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.7'
//Retrofit + Gson + OkHttp interceptor
def retrofitVersion = "2.9.0"
implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion"
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
implementation 'com.squareup.okhttp3:logging-interceptor:4.9.0'
//Hilt
implementation "com.google.dagger:hilt-android:$hilt_version"
kapt "com.google.dagger:hilt-compiler:$hilt_version"
}