mirror of
https://github.com/GTNewHorizons/Applied-Energistics-2-Unofficial.git
synced 2026-10-26 14:25:20 +00:00
* Enable Jabel and generic injection * Use RoundingMode enum values * Use enhanced for loops * Use diamond operator where appropriate * Deprecate ChainedIterator * spotless * Collapse identical catch blocks * Use try with resources * Use List.sort where possible * Anonymous type->lambda * Loop -> removeIf * Simplifiable map operations * Use enhanced instanceof * Use enhanced switch * Use bulk operations * Use zero-sized arrays in toArray * Add early exits * Remove redundant addAll * Fix missing reflection generic types * More missed language migration aids * Redundant type arguments * Redundant type casts * Fix compilation errors * Use Arrays.fill * Fix some missing generic types
41 lines
1.6 KiB
Groovy
41 lines
1.6 KiB
Groovy
|
|
SourceSet functionalTestSet = null
|
|
|
|
sourceSets {
|
|
functionalTestSet = create("functionalTest") {
|
|
java {
|
|
srcDir("src/functionalTest/java")
|
|
compileClasspath += sourceSets.patchedMc.output + sourceSets.main.output
|
|
}
|
|
}
|
|
}
|
|
|
|
configurations { configs ->
|
|
// Keep all dependencies from the main mod in the functional test mod
|
|
named(functionalTestSet.compileClasspathConfigurationName).configure {it.extendsFrom(named("compileClasspath").get())}
|
|
named(functionalTestSet.runtimeClasspathConfigurationName).configure {it.extendsFrom(named("runtimeClasspath").get())}
|
|
named(functionalTestSet.annotationProcessorConfigurationName).configure {it.extendsFrom(named("annotationProcessor").get())}
|
|
}
|
|
|
|
tasks.register(functionalTestSet.jarTaskName, Jar) {
|
|
from(functionalTestSet.output)
|
|
archiveClassifier.set("functionalTests")
|
|
// we don't care about the version number here, keep it stable to avoid polluting the tmp directory
|
|
archiveVersion.set("1.0")
|
|
destinationDirectory.set(new File(buildDir, "tmp"))
|
|
}
|
|
tasks.named("assemble").configure {
|
|
dependsOn(functionalTestSet.jarTaskName)
|
|
}
|
|
|
|
// Run tests in the default runServer/runClient configurations
|
|
tasks.named("runServer", JavaExec).configure {
|
|
dependsOn(functionalTestSet.jarTaskName)
|
|
classpath(configurations.named(functionalTestSet.runtimeClasspathConfigurationName), tasks.named(functionalTestSet.jarTaskName))
|
|
}
|
|
|
|
tasks.named("runClient", JavaExec).configure {
|
|
dependsOn(functionalTestSet.jarTaskName)
|
|
classpath(configurations.named(functionalTestSet.runtimeClasspathConfigurationName), tasks.named(functionalTestSet.jarTaskName))
|
|
}
|