-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
67 lines (56 loc) · 2.11 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
apply from: 'dependencies.gradle'
}
plugins {
id 'com.android.application' version '7.3.0' apply false
id 'com.android.library' version '7.3.0' apply false
id 'org.jetbrains.kotlin.android' version '1.8.10' apply false
id 'androidx.navigation.safeargs.kotlin' version '2.5.3' apply false
id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin' version '2.0.1' apply false
id 'com.google.devtools.ksp' version '1.8.10-1.0.9' apply false
}
subprojects { project ->
afterEvaluate {
if (project.plugins.hasPlugin("java")) {
addCommonConfigurationForJavaModules(project)
} else if (project.plugins.hasPlugin("com.android.application")
|| project.plugins.hasPlugin("com.android.library")) {
addCommonConfigurationForAndroidModules(project)
}
}
}
static def addCommonConfigurationForJavaModules(Project project) {
project.sourceCompatibility = JavaVersion.VERSION_1_8
project.targetCompatibility = JavaVersion.VERSION_1_8
}
def addCommonConfigurationForAndroidModules(Project project) {
project.android {
compileSdkVersion 33
defaultConfig {
minSdkVersion 25
targetSdkVersion 33
versionCode 1
versionName "1.0"
buildConfigField "String", "PHOTO_API_URL", "\"https://api.pexels.com/v1/\""
buildConfigField "String", "VIDEO_API_URL", "\"https://api.pexels.com/videos/\""
consumerProguardFiles "consumer-rules.pro"
}
buildFeatures {
viewBinding = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
}
}