1 Star 0 Fork 34

buyate/jpacman ctgu

forked from 金猫汇/jpacman ctgu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
build.gradle 4.23 KB
一键复制 编辑 原始数据 按行查看 历史
buyate 提交于 2023-05-17 17:05 . hw8
plugins {
id 'application'
id 'java'
id 'eclipse'
id 'pmd'
id "com.github.spotbugs" version "$spotbugspluginVersion"
id "info.solidsoft.pitest" version "1.7.4"
}
sourceSets {
defaultTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file('src/default-test/java')
}
resources.srcDir file('src/default-test/resources')
}
}
configurations {
defaultTestCompile.extendsFrom testCompile
defaultTestImplementation.extendsFrom testImplementation
defaultTestRuntime.extendsFrom testRuntime
cucumberRuntime {
extendsFrom testImplementation
}
}
repositories {
mavenLocal()
maven{url 'https://maven.aliyun.com/repository/public'}
// Use Maven Central for resolving dependencies.
mavenCentral()
}
dependencies {
implementation "com.google.guava:guava:$guavaVersion"
compileOnly "com.github.spotbugs:spotbugs-annotations:$spotbugsAnnotationsVersion"
testImplementation "org.junit.jupiter:junit-jupiter:$junitVersion"
testImplementation("org.assertj:assertj-core:$assertJVersion")
testImplementation("org.mockito:mockito-core:$mockitoVersion")
testImplementation "io.cucumber:cucumber-java:$cucumberVersion"
testImplementation "io.cucumber:cucumber-junit:$cucumberVersion"
spotbugsPlugins "com.h3xstream.findsecbugs:findsecbugs-plugin:$findsecbugspluginVersion"
}
task defaultTest(type: Test) {
testClassesDirs = sourceSets.defaultTest.output.classesDirs
classpath = sourceSets.defaultTest.runtimeClasspath
}
tasks.withType(JavaCompile){
options.encoding("utf-8")
}
defaultTest {
useJUnitPlatform()
}
//test.dependsOn defaultTest
tasks.named('test') {
// Use JUnit Platform for unit tests.
useJUnitPlatform()
}
task cucumber() {
dependsOn assemble, compileTestJava
doLast {
javaexec {
main = "io.cucumber.core.cli.Main"
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
args = ['--plugin', 'pretty', '--glue', 'nl.tudelft.jpacman.e2e.framework', 'src/test/resources']
}
}
}
pmd {
ruleSetFiles "pmd-rules.xml"
ruleSets = []
}
apply from: "$rootDir/gradle/config/scripts/style.gradle"
apply from: "$rootDir/gradle/config/scripts/coverage.gradle"
coverage.excludePackages = [
]
coverage.excludeClasses = [
]
style.excludePackages = [
]
style.excludeClasses = [
]
jacocoTestReport {
executionData tasks.withType(Test)
reports {
csv.enabled true
}
}
task staticAnalysis(type: GradleBuild) {
tasks = [
'clean',
'checkstyleMain',
'checkstyleTest',
'checkstyleDefaultTest',
'pmdMain',
'pmdTest',
'pmdDefaultTest',
'spotbugsMain',
'spotbugsTest',
'spotbugsDefaultTest',
]
}
spotbugs {
toolVersion = "$spotbugsVersion"
ignoreFailures = false
showStackTraces = true
showProgress = true
effort = 'default'
reportLevel = 'low'
reportsDir = file("$buildDir/reports/spotbugs")
// onlyAnalyze = [ 'mimic.*' ]
maxHeapSize = '2g'
extraArgs = [ '-nested:false' ]
jvmArgs = [ '-Duser.language=en' ]
}
spotbugsTest {
reports {
html {
stylesheet = 'fancy-hist.xsl'
}
}
}
spotbugsMain {
reports {
html {
stylesheet = 'fancy-hist.xsl'
}
}
}
spotbugsDefaultTest {
reports {
html {
stylesheet = 'fancy-hist.xsl'
}
}
}
mainClassName = 'nl.tudelft.jpacman.Launcher'
jar {
archivesBaseName = 'Jpacman'//基本的文件名
archiveVersion = '0.0.3' //版本
manifest { //配置jar文件的manifest
attributes(
"Manifest-Version": 1.0,
'Main-Class': 'nl.tudelft.jpacman.Launcher' //指定main方法所在的文件
)
}
//打包依赖包
from {
(configurations.runtimeClasspath).collect {
it.isDirectory() ? it : zipTree(it)
}
}
}
pitest {
targetClasses = ['nl.tudelft.jpacman.level.*']
threads = 4
outputFormats = ['HTML']
timestampedReports = true
junit5PluginVersion = '0.15'
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/wang-haoyue-buyate/jpacman-ctgu.git
[email protected]:wang-haoyue-buyate/jpacman-ctgu.git
wang-haoyue-buyate
jpacman-ctgu
jpacman ctgu
spring2022

搜索帮助