-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
87 lines (78 loc) · 3.01 KB
/
Copy pathbuild.gradle
File metadata and controls
87 lines (78 loc) · 3.01 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
buildscript {
// ext {
// springBootVersion = '2.6.4'
// springCloudVersion='2021.0.x'
// }
ext {
set('springBootVersion', "2.7.0")
set('springCloudVersion', "2021.0.3")
}
repositories {
maven { url 'https://maven.aliyun.com/repository/public/' }
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
allprojects {
apply plugin: 'idea'
apply plugin: 'java-library'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'org.springframework.boot'
//set global submodule jar version
version = 1.0
//set global jdk version
sourceCompatibility = 1.8
targetCompatibility = 1.8
//how-utf-8-text-properly-in-gradle
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
repositories {
maven { url 'https://maven.aliyun.com/repository/public/' }
mavenCentral()
}
configurations {
//remove default logger
all*.exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
}
dependencyManagement {
imports {
//https://blog.csdn.net/weixin_42338555/article/details/82895232
//spring bom helps us to declare dependencies without specifying version numbers.
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
}
subprojects {
jar {
baseName = 'codewindy-javatutorials.' + project.name
enabled = true
}
bootJar {
baseName = 'codewindy-javatutorials.' + project.name
}
//import local libs jar
// dependencies {
// compile fileTree(dir: 'libs', include: ['*.jar'])
// }
dependencies {
//import log4j2
compile group: 'org.hibernate.validator', name: 'hibernate-validator', version: '6.1.0.Final'
//compile group: 'log4j', name: 'log4j', version: '1.2.17'
compile group: 'org.springframework.boot', name: 'spring-boot-starter-log4j2', version: '2.3.5.RELEASE'
compile group: 'cn.hutool', name: 'hutool-all', version: '5.4.7'
compileOnly("org.projectlombok:lombok:1.18.16")
annotationProcessor "org.projectlombok:lombok:1.18.16"
compile group: 'com.alibaba', name: 'fastjson', version: '1.2.74'
implementation 'org.springframework.boot:spring-boot-starter-batch'
compile group: 'org.springframework.cloud', name: 'spring-cloud-starter-sleuth', version: '2.2.5.RELEASE'
compile group: 'io.springfox', name: 'springfox-swagger2', version: '3.0.0'
compile group: 'com.github.xiaoymin', name: 'knife4j-spring-boot-starter', version: '2.0.4'
implementation 'com.fasterxml.jackson.core:jackson-databind'
implementation 'org.springframework.boot:spring-boot-starter-web'
compile group: 'com.alibaba', name: 'easyexcel', version: '2.2.5'
// compile group: 'org.apache.dubbo', name: 'dubbo-spring-boot-starter', version: '2.7.8'
}
}