1 Star 1 Fork 7

fnet/Jetty Runner

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.gradle 3.71 KB
一键复制 编辑 原始数据 按行查看 历史
Erlend Mongstad 提交于 2017-10-04 23:34 . Issue 44: Upgrade to Jetty 9.4.6
// Prior to running gradle please run the create_repo.sh or create_repo_cygwin.sh
// the script is on the scripts folder
// To run all tests and generate all reports:
// $gradle clean test check --info
// Plugins repository
buildscript {
repositories {
mavenCentral()
}
dependencies {
// Cobertura code coverage with unit tests
classpath "net.saliman:gradle-cobertura-plugin:2.2.7"
}
}
// Plugins used
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'pmd'
apply plugin: 'findbugs'
apply plugin: 'checkstyle'
apply plugin: 'cobertura'
// Source and Target are Java 8
sourceCompatibility = 1.8
targetCompatibility = 1.8
// Repositories for the project itself
// Files under lib and maven local and central
repositories {
flatDir {
dirs 'lib/compile'
}
mavenLocal()
mavenCentral()
}
// Project dependencies
dependencies {
// Third Party dependencies - Local lib folder
compile(name : 'jetty-runner-9.4.6.v20170531')
// IntelliJ CE Dependencies - Copy.com/Repo
compile('com.github.guikeller.jetty-runner:util:2017.1')
compile('com.github.guikeller.jetty-runner:idea:2017.1')
compile('com.github.guikeller.jetty-runner:idea_rt:2017.1')
compile('com.github.guikeller.jetty-runner:openapi:2017.1')
compile('com.github.guikeller.jetty-runner:annotations:2017.1')
compile('com.github.guikeller.jetty-runner:jdom:2017.1')
compile('com.github.guikeller.jetty-runner:extensions:2017.1')
// IntelliJ CE Dependencies - Test - Copy.com/Repo
testCompile('com.github.guikeller.jetty-runner:trove4j:2017.1')
testCompile('picocontainer:picocontainer:1.2')
testCompile('log4j:log4j:1.2.17')
testCompile('org.slf4j:slf4j-api:1.7.25')
testCompile('org.slf4j:slf4j-log4j12:1.7.25')
// Unit Test Dependencies - Local lib folder
testCompile('cglib:cglib-nodep:2.2.2')
testCompile('org.javassist:javassist:3.21.0-GA')
testCompile('org.objenesis:objenesis:2.6')
testCompile('junit:junit:4.11')
testCompile('org.mockito:mockito-all:1.9.5')
testCompile('org.powermock:powermock-mockito-release-full:1.5.6')
}
// Configuring plugins - Code Analysis
// JUnit
test {
reports {
junitXml.enabled = false
html.enabled = true
}
}
// FindBugs
tasks.withType(FindBugs) {
ignoreFailures = true
reports {
xml.enabled = false
html.enabled = true
}
}
// Checkstyle
tasks.withType(Checkstyle) {
ignoreFailures = true
configFile = new File('src/test/resources/checkstyle.xml')
}
// checkstyle to generate html
task checkstyleHtml << {
ant.xslt(in: checkstyleMain.reports.xml.destination,
style: 'src/test/resources/checkstyle.xslt',
out: new File(checkstyleMain.reports.xml.destination.parent, 'main.html'))
}
checkstyleMain.finalizedBy checkstyleHtml
// PMD
tasks.withType(Pmd) {
ignoreFailures = true
reports {
xml.enabled = false
html.enabled = true
}
}
// add CPD to check (Copy Paste Detector)
check << {
// Create dir
File outDir = new File('build/reports/cpd/')
outDir.mkdirs()
// Runs defines and runs the task
ant.taskdef(name: 'cpd', classname: 'net.sourceforge.pmd.cpd.CPDTask', classpath: configurations.pmd.asPath)
ant.cpd(minimumTokenCount: '100', format: 'xml', outputFile: new File(outDir , 'cpd.xml')) {
fileset(dir: "src/main/java") {
include(name: '**/*.java')
}
}
// Transform the cpd xml into html
ant.xslt( in : 'build/reports/cpd/cpd.xml',
style : 'src/test/resources/cpd.xslt',
out : 'build/reports/cpd/cpd.html')
}
// Adding Cobertura to the test goal/target - instrumentation
test.dependsOn coberturaCheck
// Thanks for using IDEA Jetty Runner
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/fnet/Jetty-runner.git
[email protected]:fnet/Jetty-runner.git
fnet
Jetty-runner
Jetty Runner
master

搜索帮助