-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
110 lines (87 loc) · 2.77 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 {
ext {
lombokVersion = "4.1.6"
dependencyManagementVersion = "1.0.9.RELEASE"
springBootVersion = "2.2.6.RELEASE"
}
repositories {
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://maven.aliyun.com/repository/public" }
}
dependencies {
classpath "io.freefair.gradle:lombok-plugin:$lombokVersion"
classpath "io.spring.gradle:dependency-management-plugin:$dependencyManagementVersion"
classpath "org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion"
}
}
allprojects {
group 'com.incarcloud'
version '1.0-SNAPSHOT'
apply plugin: "java"
apply plugin: "io.spring.dependency-management"
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
repositories {
maven { url "https://maven.aliyun.com/repository/public" }
maven { url "https://repository.incarcloud.com/content/groups/public" }
}
dependencyManagement {
imports {
mavenBom "org.springframework.boot:spring-boot-dependencies:$springBootVersion"
}
dependencies {
dependency "com.incarcloud:boar-datapack-ic:2.5-SNAPSHOT"
dependency "com.alibaba:fastjson:1.2.68"
dependency "com.alibaba:druid-spring-boot-starter:1.1.22"
dependency "org.apache.commons:commons-lang3:3.10"
}
}
}
subprojects {
apply plugin: "checkstyle"
apply plugin: "io.freefair.lombok"
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
all {
exclude group: "org.springframework.boot", module: "spring-boot-starter-logging"
}
}
compileJava {
options.encoding = "UTF-8"
options.compilerArgs << "-Xlint:unchecked"
}
compileTestJava {
options.encoding = "UTF-8"
options.compilerArgs << "-Xlint:unchecked"
}
task sourceJar(type: Jar) {
from sourceSets.main.java.srcDirs
classifier "sources"
}
task checkstyle(type: Checkstyle) {
configFile file("${rootDir}/config/checkstyle/checkstyle.xml")
ignoreFailures true
showViolations true
source = fileTree("src")
include "**/*.java"
exclude "**/test/**"
exclude "**/build/**"
classpath = files()
}
test {
useJUnitPlatform()
}
task removeLombokConfig() {
def subProjectPath = project.projectDir
if (null != subProjectPath) {
def lombokConfigFile = new File(subProjectPath, "lombok.config")
if (lombokConfigFile.exists()) {
lombokConfigFile.delete()
}
}
}
defaultTasks "assemble"
}