13
0

Add codecov / jacoco hooks (#554)

* Add codecov / jacoco hooks

* Upgrade codecov plugin
Dieser Commit ist enthalten in:
Octavia Togami 2020-02-21 21:50:26 -08:00 committet von GitHub
Ursprung e476be1186
Commit bfbf9a4862
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
2 geänderte Dateien mit 43 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -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 {

Datei anzeigen

@ -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")
}