-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
63 lines (52 loc) · 1.83 KB
/
build.gradle.kts
File metadata and controls
63 lines (52 loc) · 1.83 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
plugins {
val kotlinVersion: String = System.getProperty("kotlinVersion")
kotlin("jvm") version kotlinVersion
id("org.jlleitschuh.gradle.ktlint") version "10.1.0"
`maven-publish`
id("dev.reactant.gradle") version System.getProperty("reactantVersion")
}
val reactantVersion = System.getProperty("reactantVersion")
group = "dev.reactant"
allprojects {
group = "dev.reactant"
repositories {
mavenCentral()
maven { url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") }
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") }
}
apply(plugin = "dev.reactant.gradle")
useReactantPreconfiguredTesting()
}
subprojects {
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "org.jlleitschuh.gradle.ktlint")
apply(plugin = "org.gradle.maven-publish")
version = reactantVersion
ktlint {
enableExperimentalRules.set(true)
disabledRules.set(setOf("no-wildcard-imports"))
}
}
ktlint {
version.set("0.40.0")
}
tasks.generateReactantPackageInfo { enabled = false }
tasks.generateSpigotPluginConfig { enabled = false }
tasks.jacocoTestReport {
setOnlyIf { true }
additionalSourceDirs.setFrom(subprojects.map { it.sourceSets.main.get().allSource.srcDirs })
sourceDirectories.setFrom(subprojects.map { it.sourceSets.main.get().allSource.srcDirs })
classDirectories.setFrom(subprojects.map { it.sourceSets.main.get().output })
executionData.setFrom({ project.fileTree(".") { include("**/build/jacoco/test.exec") } })
reports {
xml.isEnabled = true
xml.destination = file("$buildDir/reports/jacoco/report.xml")
}
}
afterEvaluate {
tasks.jacocoTestReport.get().dependsOn(
subprojects.mapNotNull {
it.tasks.findByName("jacocoTestReport")
}
)
}