-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
123 lines (108 loc) · 3.43 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
buildscript {
ext {
kotlinVersion = '1.3.11'
springBootVersion = '2.1.1.RELEASE'
dokka_version = '0.9.17'
}
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
classpath "org.jetbrains.dokka:dokka-gradle-plugin:${dokka_version}"
classpath('gradle.plugin.com.palantir.gradle.docker:gradle-docker:0.13.0')
}
}
plugins {
id "org.jetbrains.kotlin.jvm" version "1.3.10"
id "org.jetbrains.kotlin.plugin.spring" version "1.3.10"
id "io.spring.dependency-management" version "1.0.6.RELEASE"
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'org.jetbrains.dokka'
apply plugin: 'jacoco'
apply plugin: 'com.palantir.docker'
jar {
baseName = "libra"
version = '2.0.0'
}
group = 'com.nuc'
version = '2.0.0'
sourceCompatibility = 1.8
compileKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = "1.8"
}
}
repositories {
// jcenter()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
// jpa
implementation('org.springframework.boot:spring-boot-starter-data-jpa')
implementation('org.springframework.boot:spring-boot-starter-jdbc')
// web
implementation('org.springframework.boot:spring-boot-starter-web')
// kotlin
implementation("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
// mysql 驱动
runtimeOnly('mysql:mysql-connector-java:8.0.16')
// compile group: 'mysql', name: 'mysql-connector-java', version: '8.0.16'
// swagger 2
implementation group: 'io.springfox', name: 'springfox-swagger2', version: '2.8.0'
implementation group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.8.0'
// aop
implementation('org.springframework.boot:spring-boot-starter-aop')
// security
implementation('org.springframework.boot:spring-boot-starter-security')
//jwt
implementation 'io.jsonwebtoken:jjwt:0.9.0'
// fastjson
implementation('com.alibaba:fastjson:1.2.46')
// RabbitMq
implementation('org.springframework.boot:spring-boot-starter-amqp')
// word 分词,词频
compile group: 'com.hankcs', name: 'hanlp', version: 'portable-1.7.1'
// sentry 日志监控
implementation 'io.sentry:sentry-spring:1.7.16'
// Kotlin-Reflect-Tools-For-JVM
implementation 'wu.seal:kotlin-reflect-tools-for-jvm:1.1.2'
// druid
implementation 'com.alibaba:druid:1.1.12'
// jna
implementation 'net.java.dev.jna:jna:5.2.0'
// 热更新
implementation 'org.springframework.boot:spring-boot-devtools'
// test
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
dokka {
outputFormat = 'html'
outputDirectory = "$buildDir/javadoc"
}
task unpack(type: Copy) {
dependsOn bootJar
from(zipTree(tasks.bootJar.outputs.files.singleFile))
into("build/dependency")
}
docker {
name "${project.group}/${bootJar.baseName}"
copySpec.from(tasks.unpack.outputs).into("dependency")
buildArgs(['DEPENDENCY': "dependency"])
}