/
build.gradle
109 lines (94 loc) · 2.7 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:2.1.6.RELEASE")
}
}
apply plugin: 'java'
//apply plugin: 'eclipse'
//apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'war'
bootRun {
if ( project.hasProperty('args') ) {
args project.args.split('\\s+')
}
}
bootJar {
baseName = 'spacemr-spring-boot'
version = '1.0.1'
}
bootWar {
baseName = 'spacemr'
}
war {
baseName = 'spacemr'
enabled = true
}
repositories {
mavenCentral()
}
configurations {
providedRuntime
}
compileJava {
// I only managed to get this working when I forked
// and passed 'javac' as an executable
options.compilerArgs << '-Xlint:deprecation'
// options.compilerArgs << '-Xlint:unchecked'
options.fork = true
options.forkOptions.executable = 'javac'
}
//sourceCompatibility = 1.8
//targetCompatibility = 1.8
allprojects {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
// configurations.all {
// //
// // -to generate a working war file
// //
// resolutionStrategy.eachDependency { DependencyResolveDetails details ->
// if (details.requested.group == 'org.apache.tomcat.embed') {
// details.useVersion '8.0.3'
// }
// }
// }
dependencies {
//-
compile("org.springframework.boot:spring-boot-starter-web:2.1.6.RELEASE")
compile("org.springframework:spring-tx:5.1.8.RELEASE")
compile("org.springframework:spring-jdbc:4.0.3.RELEASE")
compile group: 'com.sun.mail', name: 'javax.mail', version: '1.6.2'
compile("commons-fileupload:commons-fileupload:1.3.3")
compile("mysql:mysql-connector-java:5.1.29")
compile("org.json:json:20140107")
compile('org.freemarker:freemarker:2.3.20')
compile('org.apache.directory.studio:org.apache.commons.codec:1.8')
compile group: 'commons-net', name: 'commons-net', version: '3.6'
compile('com.zaxxer:HikariCP:2.3.8')
//- logging
compile('ch.qos.logback:logback-classic:1.2.3')
compile('ch.qos.logback:logback-core:1.2.3')
compile('org.slf4j:slf4j-api:1.7.25')
//- email
//-
providedRuntime("org.springframework.boot:spring-boot-starter-tomcat:2.1.9.RELEASE")
implementation('org.springframework.boot:spring-boot-starter-web')
testCompile("junit:junit:4.11")
}
// task myclasspath() << {
// println sourceSets.main.runtimeClasspath.asPath;
// }
task myclasspath() {
doLast {
println sourceSets.main.runtimeClasspath.asPath;
}
}