-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
130 lines (111 loc) · 3.68 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'org.xtext:xtext-gradle-plugin:2.0.6'
classpath 'net.researchgate:gradle-release:2.6.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.0'
classpath 'org.owasp:dependency-check-gradle:5.2.1'
}
}
apply plugin: 'application'
apply plugin: 'org.xtext.xtend'
apply plugin: 'net.researchgate.release'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven'
apply plugin: 'org.owasp.dependencycheck'
apply from: "$rootDir/gradle/publishing.gradle"
apply from: 'code-style/codestyle.gradle'
group = 'org.testeditor.web'
sourceCompatibility = 1.10
targetCompatibility = 1.10
repositories {
jcenter()
maven {
url "http://dl.bintray.com/test-editor/maven"
}
maven {
url "http://dl.bintray.com/franzbecker/maven"
}
}
ext.versions = [
dropwizard: '1.3.16',
xtext: '2.18.0',
testEditorDropwizard: '0.19.4'
]
ext.configPath = "./"
if (project.hasProperty('localconfig')) {
ext.configFile = 'config.local.yml'
} else {
ext.configFile = 'config.yml'
}
sourceSets {
main.xtendOutputDir = 'src/main/xtend-gen'
test.xtendOutputDir = 'src/test/xtend-gen'
}
dependencies {
implementation "org.eclipse.xtend:org.eclipse.xtend.lib:$versions.xtext"
implementation "org.testeditor.web:org.testeditor.web.dropwizard:$versions.testEditorDropwizard"
implementation "commons-io:commons-io:2.6"
implementation "org.apache.commons:commons-text:1.4"
implementation "org.testeditor.web:org.testeditor.web.dropwizard:$versions.testEditorDropwizard"
implementation 'org.eclipse.jgit:org.eclipse.jgit:5.1.2.201810061102-r'
testImplementation "junit:junit:4.12"
testImplementation "io.dropwizard:dropwizard-testing:$versions.dropwizard"
testImplementation "org.assertj:assertj-core:3.12.0"
testImplementation "org.mockito:mockito-core:3.1.0"
testImplementation "org.eclipse.xtext:org.eclipse.xtext.testing:$versions.xtext"
testImplementation "org.testeditor.web:org.testeditor.web.dropwizard.testing:$versions.testEditorDropwizard"
testImplementation 'org.eclipse.jgit:org.eclipse.jgit.junit:5.1.2.201810061102-r'
}
mainClassName = 'org.testeditor.web.backend.testexecution.dropwizard.TestExecutionApplication'
run {
main mainClassName
args 'server', configPath + configFile
}
test {
testLogging {
showStandardStreams = true
exceptionFormat = 'full'
events "standardOut", "started", "passed", "skipped", "failed"
}
}
dependencyCheck {
failBuildOnCVSS=11
suppressionFile=file("suppressions.xml").getCanonicalPath()
autoUpdate=true
cveValidForHours=1
format='ALL'
data {
directory='./.owasp-dependency-check-db'
}
}
task docker(type:Exec) {
dependsOn(assemble)
executable 'sh'
args '-c', """
(([ -d testeditor ] && rm -Rf testeditor) || true) &&
cd build/distributions && (rm testexecution.tar || true) &&
rm test-editor-testexecution-*.zip &&
mv test-editor-testexecution-*.tar testexecution.tar &&
tar -xf testexecution.tar &&
mv test-editor-testexecution-* ../../testeditor &&
cd ../.. &&
docker build -t testeditor/testexecution:snapshot .
"""
}
/*
* Configure release plugin.
* Remove tasks "updateVersion" and "commitNewVersion" as we don't want the new SNAPSHOT
* version commit on the master branch.
*/
tasks.release.tasks -= [":updateVersion", ":commitNewVersion"]
release {
preTagCommitMessage = '[release]'
tagCommitMessage = '[release]'
newVersionCommitMessage = '[release] new version'
tagTemplate = 'v${version}'
}
afterReleaseBuild.dependsOn bintrayUpload