-
-
Notifications
You must be signed in to change notification settings - Fork 117
/
build.gradle
92 lines (82 loc) · 2.85 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
import java.nio.charset.StandardCharsets
plugins {
id 'java-library'
// A Gradle plugin that provides Maven-like dependency management and exclusions
// @see https://docs.spring.io/dependency-management-plugin/docs/1.1.1/reference/html/#getting-started
id "io.spring.dependency-management" version "1.1.1"
}
ext {
defaultCharset = StandardCharsets.UTF_8.name()
springBoot3Modules = [
"jt-808-server-sample-bare-boot3",
"jt-808-server-spring-boot-starter",
"jt-1078-server-spring-boot-starter",
"jt-1078-server-sample-webflux-boot3",
"jt-1078-server-sample-webmvc-boot3",
"jt-dashboard-server",
"jt-dashboard-server-spring-boot-starter",
"jt-dashboard-client",
"jt-dashboard-client-spring-boot-starter",
"jt-demo-808-server-webflux-boot3",
"jt-demo-808-server-webmvc-boot3",
"jt-demo-1078-server-webflux-boot3",
"jt-demo-1078-server-webmvc-boot3",
"jt-demo-dashboard-webflux-boot3",
"jt-demo-dashboard-webmvc-boot3",
]
}
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
compileOnly {
extendsFrom annotationProcessor
}
}
configure(rootProject) {
configurations.archives.artifacts.clear()
apply from: getBuildScriptPath("ide.gradle")
}
configure(allprojects) { project ->
group = projectGroup
version = projectVersion
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}
// 1. java-env config
configure(subprojects.findAll {
(it.name != "docs") && (it.name != 'samples')
}) { subProject ->
apply from: getBuildScriptPath("common-java-env-config.gradle")
apply from: getBuildScriptPath("ide.gradle")
}
// 2. maven config
apply from: getBuildScriptPath("repo-credentials.gradle")
def modulesToPublishToMavenRepo = [
"jt-core",
"jt-808-server-support",
"jt-808-server-spring-boot-autoconfigure",
"jt-808-server-spring-boot-starter-boot2",
"jt-808-server-spring-boot-starter",
// "jt-1078-server-support",
// "jt-1078-server-spring-boot-autoconfigure",
// "jt-1078-server-spring-boot-starter",
// "jt-1078-server-spring-boot-starter-boot2",
// "jt-dashboard-common",
// "jt-dashboard-client",
// "jt-dashboard-client-spring-boot-starter",
// "jt-dashboard-server",
// "jt-dashboard-server-spring-boot-starter",
]
configure(subprojects.findAll {
modulesToPublishToMavenRepo.contains(it.name)
}) { subProject ->
apply from: getBuildScriptPath("common-maven-config.gradle")
}
def getBuildScriptPath(String path) {
return "${rootProject.file("build-script/script").path}/${path}"
}