-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
111 lines (93 loc) · 3.14 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
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: "application"
version = '1.0-SNAPSHOT'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
compile 'ch.qos.logback:logback-classic:1.2.3'
compile 'com.mashape.unirest:unirest-java:1.4.9'
compile 'org.jsoup:jsoup:1.10.3'
compile 'com.beust:jcommander:1.72'
compile 'org.apache.commons:commons-collections4:4.1'
compile 'org.jboss.forge.roaster:roaster-api:2.20.1.Final'
compile 'org.jboss.forge.roaster:roaster-jdt:2.20.1.Final'
compile 'com.google.guava:guava:22.0'
compile 'com.googlecode.java-diff-utils:diffutils:1.3.0'
compile 'io.github.adr:e-adr:1.0.0'
// dependencies for se-repo data
compile 'org.jboss.resteasy:resteasy-atom-provider:3.1.3.Final'
compile 'org.jboss.resteasy:resteasy-jackson2-provider:3.1.3.Final'
compile 'org.jboss.resteasy:resteasy-client:3.1.3.Final'
compile 'org.jboss.resteasy:resteasy-multipart-provider:3.1.3.Final'
compile ('ch.hsr.isf.serepo:serepo-data-restinterface:1.0-SNAPSHOT') {
exclude group: 'org.slf4j'
}
// testing against se-repo
testCompile 'junit:junit:4.12'
testCompile 'org.hamcrest:hamcrest-all:1.3'
testCompile 'com.google.code.gson:gson:2.8.1'
testCompile 'ch.hsr.isf.serepo:serepo-rest:1.0-SNAPSHOT'
testCompile files("serepo/serepo-rest/target/classes") {
builtBy "compileSeRepo"
}
}
mainClassName = 'com.eadlsync.cli.EADLSyncMain'
processResources {
filesMatching("build.properties") {
expand(version: project.version,
"year": String.valueOf(Calendar.getInstance().get(Calendar.YEAR)),
"authors": "Tobias Boceck")
filteringCharset = 'UTF-8'
}
}
test {
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
}
dependsOn 'cleanTest'
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
}
}
check.dependsOn jacocoTestReport
task generateSource(dependsOn: ["initSubmodules"]) {
description 'Generates Java source files.'
}
task generateTestSource(dependsOn: ["generateSource", "compileSeRepo"]) {
description 'Generates Java source files for testing.'
}
test {
exclude 'com/eadlsync/suite/**'
}
task testUnitTest(type: Test) {
include '**/*UnitTestSuite.class'
}
task testSeRepoServerTests(type: Test) {
include '**/*SeRepoServerTestSuite.class'
}
task initSubmodules(type: Exec) {
if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
commandLine "cmd", "/c", "git", "submodule", "update", "--init", "--recursive", "--remote"
} else {
commandLine "git", "submodule", "update", "--init", "--recursive", "--remote"
}
}
task compileSeRepo(type: Exec) {
workingDir "serepo"
if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
commandLine "cmd", "/c", "mvn", "install"
} else {
commandLine "mvn", "install"
}
}
compileJava.dependsOn generateSource
compileTestJava.dependsOn generateTestSource
compileSeRepo.dependsOn initSubmodules