This repository has been archived by the owner on Nov 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
75 lines (64 loc) · 2.15 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id 'com.android.application' version '8.0.2' apply false
id 'com.android.library' version '8.0.2' apply false
id 'org.jetbrains.kotlin.android' version '1.8.20' apply false
id 'org.jetbrains.kotlin.jvm' version '1.8.20' apply false
}
subprojects {
def moduleRelativePath = projectDir.toString() - rootDir.toString()
if (name == 'app') {
apply plugin: 'com.android.application'
} else if (name == 'android'
|| name == 'di'
|| name == 'data'
|| name == 'ui'
) {
apply plugin: 'com.android.library'
}
if (plugins.findPlugin('com.android.base') != null) {
apply plugin: 'kotlin-android'
android {
namespace 'dev.supasintatiyanupanwong.apps.android.bpi' +
moduleRelativePath.replace(File.separator, '.')
compileSdkVersion 33
defaultConfig {
minSdkVersion 24
targetSdkVersion 33
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
viewBinding = true
}
}
} else {
apply plugin: 'java-library'
apply plugin: 'kotlin'
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
if (!moduleRelativePath.startsWith(File.separator + 'base' + File.separator)) {
dependencies {
if (name == 'app' || name == 'data') {
api project(':base:data')
}
if (name == 'app' || name == 'di') {
api project(':base:di')
}
if (name == 'app' || name == 'domain') {
api project(':base:domain')
}
if (name == 'app' || name == 'ui') {
api project(':base:ui')
}
}
}
tasks.withType(KotlinCompile).configureEach {
kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8
}
}