Files
moe-tests/build.gradle
T
2026-10-05 20:54:46 +05:30

91 lines
2.5 KiB
Groovy

/*
* Copyright (c) DuxTechnica
*
* Licensed under the DuxTechnica Limited Use Source Code License Agreement (DT-LUSCL); you may not
* use this file except in compliance with the License. You may obtain a copy of the License by
* contacting:
*
* Dux Technica, [email protected]
*
* This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins {
id "java"
id "jacoco"
}
version = "v1-SNAPSHOT"
repositories {
mavenLocal()
mavenCentral()
maven {
url "https://maven.indroneel.co/repo/snapshots"
}
}
dependencies {
implementation "daxi.moe:daxi.moe.main:v1-SNAPSHOT"
implementation "org.junit.jupiter:junit-jupiter:5.10.2"
implementation "org.junit.platform:junit-platform-launcher:1.10.2"
implementation "org.slf4j:jul-to-slf4j:2.0.7"
implementation "ch.qos.logback:logback-classic:1.4.6"
implementation "org.codehaus.janino:janino:3.1.9"
}
tasks.named("test", Test) {
useJUnitPlatform()
systemProperty "junit.jupiter.extensions.autodetection.enabled", "true"
/*
filter {
includeTestsMatching("fully.qualified.package.*")
}
*/
testLogging {
events "started", "passed", "failed", "skipped"
showStandardStreams = true
displayGranularity 2
reports
finalizedBy jacocoTestReport
}
}
jacocoTestReport {
dependsOn test
reports {
xml.required = true
csv.required = false
//html.outputLocation = layout.buildDirectory.dir('jacocoHtml')
}
afterEvaluate {
def classDir = file("${projectDir}/../scanpath-v1/target/classes")
def sourceDir = file("${projectDir}/../scanpath-v1/src/main/java")
def mainSrcDir = file("${projectDir}/../moe/moe-main/src/main/java")
def jsonSrcDir = file("${projectDir}/../moe/moe-json/src/main/java")
def yamlSrcDir = file("${projectDir}/../moe/moe-yaml/src/main/java")
def tomlSrcDir = file("${projectDir}/../moe/moe-toml/src/main/java")
def mainClsDir = file("${projectDir}/../moe/moe-main/target/classes")
def jsonClsDir = file("${projectDir}/../moe/moe-json/target/classes")
def yamlClsDir = file("${projectDir}/../moe/moe-yaml/target/classes")
def tomlClsDir = file("${projectDir}/../moe/moe-toml/target/classes")
sourceDirectories.setFrom(files(sourceDir, mainSrcDir, jsonSrcDir, yamlSrcDir, tomlSrcDir))
classDirectories.setFrom(files(
fileTree(dir: mainClsDir),
fileTree(dir: jsonClsDir),
fileTree(dir: yamlClsDir),
fileTree(dir: tomlClsDir)
))
}
}