-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
47 lines (41 loc) · 1.53 KB
/
build.gradle
File metadata and controls
47 lines (41 loc) · 1.53 KB
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
buildscript {
ext {
kotlin_version = '1.8.10'
}
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.0.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
ext {
/**
* 하나의 예시로, extension-android 에서 extension-standard 를 임포트하고 싶으면
* kal 프로젝트 단독으로 열어 빌드할 경우에는 implementation(project(':extension-standard')) 와 같이 작성하면 빌드가 되나
* 서브모듈로 사용하여 빌드할 경우에는 implementation(project(':kal:extension-standard')) 과 같이 모듈명을 앞에 prefix 로 넣어줘야 빌드가 된다.
*
* 즉, kal Project 가 어딘가에 서브 모듈로 임포트돼 사용되는게 아니라 단독으로 열어서 빌드를 할 경우는
* kal 프로젝트 내 모듈에서 다른 모듈을 implementation 할 때 프로젝트 명을 implementation 명세에 prefix 로 넣을 필요가 없으나,
* 모듈로써 사용될 경우에는 모듈 명을 implementation 명세 앞에 prefix 로 넣어줘야 빌드가 된다.
*/
getImplementationPrefix = { parentProjectName ->
if (parentProjectName == rootProject.name) {
return ""
} else {
return ":${parentProjectName}"
}
}
}