mirror of
https://github.com/FabricMC/fabric.git
synced 2025-04-20 19:04:44 -04:00
parent
6605894492
commit
168b712abd
1 changed files with 41 additions and 0 deletions
41
build.gradle
41
build.gradle
|
@ -9,6 +9,7 @@ plugins {
|
|||
id "eclipse"
|
||||
id "idea"
|
||||
id "maven-publish"
|
||||
id 'jacoco'
|
||||
id "fabric-loom" version "1.0.12" apply false
|
||||
id "com.diffplug.spotless" version "6.11.0"
|
||||
id "org.ajoberstar.grgit" version "3.1.0"
|
||||
|
@ -372,10 +373,50 @@ loom {
|
|||
name "Auto Test Client"
|
||||
vmArg "-Dfabric.autoTest"
|
||||
}
|
||||
|
||||
// Create duplicate tasks for this, as jacoco slows things down a bit
|
||||
gametestCoverage {
|
||||
inherit gametest
|
||||
name "Game Test Coverage"
|
||||
ideConfigGenerated = false
|
||||
}
|
||||
|
||||
autoTestClientCoverage {
|
||||
inherit autoTestClient
|
||||
name "Auto Test Client Coverage"
|
||||
ideConfigGenerated = false
|
||||
}
|
||||
}
|
||||
}
|
||||
test.dependsOn runGametest
|
||||
|
||||
def coverageTasks = [runGametestCoverage, runAutoTestClientCoverage]
|
||||
|
||||
jacoco {
|
||||
coverageTasks.forEach {
|
||||
applyTo it
|
||||
}
|
||||
}
|
||||
|
||||
task coverage(type: JacocoReport, dependsOn: coverageTasks) {
|
||||
coverageTasks.forEach {
|
||||
executionData it
|
||||
}
|
||||
|
||||
// Add all source as input
|
||||
allprojects { p ->
|
||||
if (p.path.startsWith(":deprecated")) return
|
||||
sourceSets p.sourceSets.main, p.sourceSets.client, p.sourceSets.testmod
|
||||
}
|
||||
|
||||
// Exclude mixins
|
||||
afterEvaluate {
|
||||
classDirectories.setFrom(files(classDirectories.files.collect {
|
||||
fileTree(dir: it, exclude: '**/mixin/**')
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
productionRuntime {
|
||||
extendsFrom configurations.minecraftLibraries
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue