generated from dohack-io/template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
88 lines (71 loc) · 2.31 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
plugins {
id 'java' // java support
id 'application' // creates a JVM executable
id 'com.diffplug.gradle.spotless' version '3.23.0'// code format
id 'org.springframework.boot' version '2.1.8.RELEASE'
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
}
ext {
//version (changing these should be considered thoroughly!)
javaVersion = JavaVersion.VERSION_1_8
scriptsLocation = 'gradle' + File.separator + 'scripts' + File.separator //location of script plugins
mainClass = 'de.dohack.dolphins.DolphinsApplication'
}
//apply plugin: 'org.springframework.boot'
apply from: scriptsLocation + 'spotless.gradle'
apply from: scriptsLocation + 'checkJavaVersion.gradle'
repositories {
mavenLocal() //searches in local maven repository, typically ~/.m2/repository
jcenter() //searches in bintray's repository 'jCenter', which contains Maven Central
}
dependencies {
// logging
compile 'org.apache.logging.log4j:log4j-1.2-api:2.+' // log4j
compile 'org.apache.logging.log4j:log4j-core:2.+' // log4j
// database
compile 'org.postgresql:postgresql:+'
compile 'org.hibernate:hibernate-entitymanager:5.4.5.Final'
// testing
testCompile 'junit:junit:+'
// Spring Boot
implementation 'org.springframework.boot:spring-boot-dependencies:2.1.8.RELEASE'
// implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
compile 'org.springframework.boot:spring-boot-starter-data-jpa'
//remove annoying warning
implementation 'com.google.code.findbugs:jsr305:3.0.2'
}
wrapper {
gradleVersion = '5.4.1'
}
version = '0.1-SNAPSHOT'
description = 'DOLPHINS'
group = 'de.dohack'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
application {
mainClassName = mainClass
}
run {
//Gradle uses an empty Input as default, leading to a non - blocking behaviour and thus an immediate shutdown
standardInput = System.in
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
jar {
manifest {
attributes(
'Main-Class': mainClass
)
}
}