Add codecov / jacoco hooks (#554)
* Add codecov / jacoco hooks * Upgrade codecov plugin
Dieser Commit ist enthalten in:
Ursprung
e476be1186
Commit
bfbf9a4862
@ -1,5 +1,10 @@
|
||||
import org.ajoberstar.grgit.Grgit
|
||||
|
||||
plugins {
|
||||
id("org.enginehub.codecov")
|
||||
jacoco
|
||||
}
|
||||
|
||||
logger.lifecycle("""
|
||||
*******************************************
|
||||
You are building WorldEdit!
|
||||
@ -14,8 +19,41 @@ logger.lifecycle("""
|
||||
*******************************************
|
||||
""")
|
||||
|
||||
applyCommonConfiguration()
|
||||
applyRootArtifactoryConfig()
|
||||
|
||||
val totalReport = tasks.register<JacocoReport>("jacocoTotalReport") {
|
||||
for (proj in subprojects) {
|
||||
proj.apply(plugin = "jacoco")
|
||||
proj.plugins.withId("java") {
|
||||
executionData(
|
||||
fileTree(proj.buildDir.absolutePath).include("**/jacoco/*.exec")
|
||||
)
|
||||
sourceSets(proj.the<JavaPluginConvention>().sourceSets["main"])
|
||||
reports {
|
||||
xml.isEnabled = true
|
||||
xml.destination = rootProject.buildDir.resolve("reports/jacoco/report.xml")
|
||||
html.isEnabled = true
|
||||
}
|
||||
dependsOn(proj.tasks.named("test"))
|
||||
}
|
||||
}
|
||||
}
|
||||
afterEvaluate {
|
||||
totalReport.configure {
|
||||
classDirectories.setFrom(classDirectories.files.map {
|
||||
fileTree(it).apply {
|
||||
exclude("**/*AutoValue_*")
|
||||
exclude("**/*Registration.*")
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
codecov {
|
||||
reportTask.set(totalReport)
|
||||
}
|
||||
|
||||
if (!project.hasProperty("gitCommitHash")) {
|
||||
apply(plugin = "org.ajoberstar.grgit")
|
||||
ext["gitCommitHash"] = try {
|
||||
|
@ -20,6 +20,10 @@ repositories {
|
||||
name = "sponge"
|
||||
url = uri("https://repo.spongepowered.org/maven")
|
||||
}
|
||||
maven {
|
||||
name = "EngineHub Repository"
|
||||
url = uri("https://maven.enginehub.org/repo/")
|
||||
}
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
@ -54,4 +58,5 @@ dependencies {
|
||||
implementation("net.fabricmc:fabric-loom:$loomVersion")
|
||||
implementation("net.fabricmc:sponge-mixin:$mixinVersion")
|
||||
implementation("gradle.plugin.com.mendhak.gradlecrowdin:plugin:0.1.0")
|
||||
implementation("org.enginehub.gradle:gradle-codecov-plugin:0.1.0")
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren