-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
executable file
·173 lines (137 loc) · 5.58 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
buildscript {
repositories {
mavenLocal()
jcenter()
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
// classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1'
classpath 'net.ltgt.gradle:gradle-apt-plugin:0.13'
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.1.0'
}
}
defaultTasks 'clean build publishToMavenLocal'
apply plugin: 'java'
apply plugin: 'scala'
apply plugin: 'idea'
apply plugin: 'application'
//apply plugin: 'com.github.johnrengelman.shadow' // to build fat jars with gradle
apply plugin: 'maven-publish'
apply plugin: 'net.ltgt.apt' // required by mapstruct
apply plugin: 'net.ltgt.apt-idea'
apply plugin: 'org.junit.platform.gradle.plugin'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
assert System.properties['java.specification.version'] == '1.8'
group 'at.irro.dipl'
version '1.0-SNAPSHOT'
description = ''
mainClassName = 'echo.core.CoreApp'
compileJava {
options.compilerArgs = [
'-Amapstruct.suppressGeneratorTimestamp=true',
'-Amapstruct.suppressGeneratorVersionInfoComment=true',
'-Xlint:deprecation'
]
}
ext {
scala_major_version = '2.12'
scala_minor_version = '4'
// log4j_version = '2.9.1'
slf4j_version = '1.7.25'
logback_version = '1.2.3'
lucene_version = '7.2.0'
jackson_version = '2.9.4'
immutables_version = '2.5.6'
guava_version = '24.1-jre'
junit_vintage_version = '4.12'
junit_jupiter_version = '5.1.0'
junit_platform_version = '1.1.0'
}
repositories {
mavenLocal()
jcenter()
}
dependencies {
compile group: 'org.scala-lang', name: 'scala-compiler', version: "${scala_major_version}.${scala_minor_version}"
compile group: 'org.scala-lang', name: 'scala-library', version: "${scala_major_version}.${scala_minor_version}"
compile group: 'org.scala-lang.modules', name: "scala-java8-compat_${scala_major_version}", version: '0.8.0'
compile group: 'com.typesafe.scala-logging', name: "scala-logging_${scala_major_version}", version: '3.8.0'
compile "org.slf4j:slf4j-api:${slf4j_version}"
//compile "org.slf4j:slf4j-simple:$slf4j_version"
compile "ch.qos.logback:logback-classic:${logback_version}"
compile "ch.qos.logback:logback-core:${logback_version}"
compile "org.apache.lucene:lucene-core:${lucene_version}"
compile "org.apache.lucene:lucene-queryparser:${lucene_version}"
compile "org.apache.lucene:lucene-analyzers-common:${lucene_version}"
compile 'org.jsoup:jsoup:1.11.2' // HTTP parser
compile 'com.google.code.gson:gson:2.8.2' // gson parser
compile 'com.rometools:rome:1.9.0'
compile 'com.rometools:rome-modules:1.9.0'
compile 'org.hashids:hashids:1.0.3'
compile "com.google.guava:guava:${guava_version}"
compile group: 'com.softwaremill.sttp', name: "core_${scala_major_version}", version: '1.1.10'
compile 'org.mapstruct:mapstruct-jdk8:1.2.0.Final'
testCompile 'org.testng:testng:6.10', 'org.easytesting:fest-assert:1.4'
apt 'org.mapstruct:mapstruct-processor:1.2.0.Final'
compileOnly "org.immutables:value:${immutables_version}:annotations" // compilation-only annotations artifact
apt "org.immutables:value:${immutables_version}" // for annotation processing only
//compile group: 'javax.persistence', name: 'persistence-api', version: '1.0'
compile group: 'org.hibernate', name: 'hibernate-entitymanager', version: '4.3.0.Final'
compile group: 'org.hibernate.javax.persistence', name: 'hibernate-jpa-2.1-api', version: '1.0.2.Final'
compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-json-org', version: jackson_version
compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: jackson_version
compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-guava', version: jackson_version
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: jackson_version
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: jackson_version
// JUnit Jupiter API and TestEngine implementation
//test.useJUnitPlatform()
testImplementation "org.junit.jupiter:junit-jupiter-api:${junit_jupiter_version}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit_jupiter_version}"
//testCompile("junit:junit:4.12")
//testRuntime("org.junit.vintage:junit-vintage-engine:4.12.0") //Support JUnit 3 and JUnit 4 tests
testCompile "org.junit.platform:junit-platform-runner:${junit_platform_version}" // Enable use of the JUnitPlatform Runner within the IDE
}
jar {
doLast {
exclude("**/resources/logback.xml")
// exclude("**/logback.xml")
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}
// Generating gradle wrapper so people don't have to have the Gradle version preinstalled
task wrapper(type: Wrapper) {
description = 'Generates gradlew[.bat] scripts'
gradleVersion = '4.6'
distributionType = Wrapper.DistributionType.ALL
}
run {
standardInput = System.in
}
run.doFirst {
// Environment variables go here.
}
test {
/*
useJUnitPlatform {
excludeTags 'slow'
includeEngines 'junit-jupiter', 'junit-vintage'
}
failFast = true
*/
// Always run tests, even when nothing changed.
dependsOn 'cleanTest'
// Show test results.
testLogging {
events "passed", "skipped", "failed"
}
}
junitPlatform {
details 'tree'
}