This repository was archived by the owner on Feb 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
125 lines (100 loc) · 3.21 KB
/
build.gradle
File metadata and controls
125 lines (100 loc) · 3.21 KB
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
buildscript {
ext {
kotlinVersion = '1.2.10'
springBootVersion = '1.5.9.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-noarg:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
//apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'kotlin-allopen'
apply plugin: 'kotlin-spring'
apply plugin: "kotlin-noarg"
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
group = 'cn.com.guardiantech.aofgo'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
repositories {
mavenLocal()
mavenCentral()
maven { url 'http://nexus.codetector.cn/repository/aofgo/' }
}
noArg {
annotation('cn.com.guardiantech.aofgo.backend.annotation.Controller')
annotation('javax.persistence.Entity')
annotation('cn.com.guardiantech.aofgo.backend.annotation.NoArg')
invokeInitializers = true
}
sourceCompatibility = 1.8
ext {
springCloudVersion = 'Edgware.RELEASE'
log4j2Version = '2.8.2'
slf4jVersion = '1.7.25'
mysql_version = '6.0.6'
}
configurations.all {
exclude group: "ch.qos.logback"
}
dependencies {
compile("org.springframework.boot:spring-boot-starter-data-jpa")
compile('org.springframework.boot:spring-boot-starter-validation')
compile('org.springframework.boot:spring-boot-starter-web')
compile('org.springframework.boot:spring-boot-starter-mail')
// Kotlin Language Libraries
compile("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
compile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
compile group: 'commons-codec', name: 'commons-codec', version: '1.11'
compile group: 'com.google.guava', name: 'guava', version: '23.0'
// Logging
compile "org.apache.logging.log4j:log4j-api:$log4j2Version",
"org.apache.logging.log4j:log4j-core:$log4j2Version",
"org.apache.logging.log4j:log4j-slf4j-impl:$log4j2Version",
"org.apache.logging.log4j:log4j-jcl:$log4j2Version",
"org.slf4j:slf4j-api:$slf4jVersion"
runtime group: 'mysql', name: 'mysql-connector-java', version: '6.0.6'
testCompile('org.springframework.boot:spring-boot-starter-test')
testRuntime('com.h2database:h2')
}
ext.debug = project.hasProperty('debug') && (Boolean.parseBoolean(project.property("debug") as String))
bootRun {
// support passing -Dsystem.property=value to bootRun task
systemProperties = System.properties as Map<String, ?>
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
task copyLibraries(type: Copy) {
from configurations.runtime
into("$buildDir/out/std/libs")
}
processResources {
if (!debug) {
println("Building Release")
exclude("log4j2-test.xml")
} else {
println("Building DEBUG")
}
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}