-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
54 lines (44 loc) · 1.43 KB
/
build.gradle.kts
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
apply(plugin = "com.jfrog.bintray")
apply(plugin = "maven-publish")
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:4.0.2")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${Version.kotlin}")
classpath("com.github.dcendents:android-maven-gradle-plugin:2.1")
classpath("com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4")
classpath("org.jetbrains.dokka:dokka-android-gradle-plugin:${Version.dokka}")
}
}
allprojects {
group = Publishing.groupId
version = Version.kandy
repositories {
google()
jcenter()
maven { setUrl("https://dl.bintray.com/kwezal/Kandy") }
}
}
tasks.register("clean", Delete::class) {
delete(rootProject.buildDir)
}
tasks.register("assembleAllKandyModules") {
group = "publishing"
val modules = subprojects.filter { it.name.startsWith(Publishing.artifactPrefix) }
modules.forEach {
// Remove prefix
val id = it.name.substring(Publishing.artifactPrefix.length)
if (Module.byId(id)?.hasDebugVariant == true) {
dependsOn("${it.name}:assembleDebug")
}
dependsOn("${it.name}:assembleRelease")
}
}
tasks.register("publishAllKandyModules") {
group = "publishing"
dependsOn(tasks["assembleAllKandyModules"])
tasks["assembleAllKandyModules"].finalizedBy(tasks["publishToMavenLocal"])
}