-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle.kts
33 lines (29 loc) · 951 Bytes
/
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
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}
tasks {
create("release") {
group = "summary"
bindChildProjectsTasks(this, "rustBuildRelease", childProjects.values)
}
create("test") {
group = "summary"
dependsOn(getByName("release"))
val exclude = listOf("kanaria_dotnet", "kanaria_extern", "kanaria_jvm")
bindChildProjectsTasks(this, "rustTestRelease", childProjects.values.filter { pj -> !exclude.any { pj.name.contains(it) } })
bindChildProjectsTasks(this, "testClasses", childProjects.values)
}
}
fun bindChildProjectsTasks(rootTask: Task, findByName: String, childProjects: Iterable<Project>) {
childProjects.forEach { childProject ->
childProject.gradle.projectsEvaluated {
childProject.tasks.findByName(findByName)?.also {
rootTask.dependsOn(it)
}
}
}
}