forked from hylexus/jt-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
95 lines (81 loc) · 2.64 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
import java.nio.charset.StandardCharsets
buildscript {
repositories {
mavenLocal()
[
'http://maven.aliyun.com/nexus/content/repositories/jcenter',
'http://maven.aliyun.com/nexus/content/groups/public/',
"https://plugins.gradle.org/m2/",
"https://repo.spring.io/plugins-release",
].each { repo ->
maven { url repo }
}
mavenCentral()
}
dependencies {
classpath("io.spring.gradle:propdeps-plugin:0.0.9.RELEASE")
classpath "io.spring.gradle:dependency-management-plugin:1.0.8.RELEASE"
classpath "org.springframework.boot:spring-boot-gradle-plugin:2.1.7.RELEASE"
classpath 'com.github.marcpoppleton:git-changelog:0.1.3'
}
}
plugins {
id 'java'
id 'maven'
id "io.spring.dependency-management" version "1.0.7.RELEASE" apply false
}
ext {
jar_version_guava = "23.0"
jar_version_netty = "4.1.19.Final"
jar_version_commons_io = "2.6"
jar_version_ok_http = "3.14.2"
jar_version_fast_json = "1.2.59"
jar_version_oaks = "1.0.4"
jar_version_commons_collection = "3.2.2"
jar_version_blocking_map = "0.91"
jar_version_hibernate_validator = "6.0.17.Final"
defaultCharset = StandardCharsets.UTF_8.name()
defaultJavaVersion = JavaVersion.VERSION_1_8
}
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-spring", "jt-808-server-support", "jt-808-server-spring-boot-stater"]
configure(subprojects.findAll {
modulesToPublishToMavenRepo.contains(it.name)
}) { subProject ->
apply from: getBuildScriptPath("common-maven-config.gradle")
}
// 3. changelog.md
apply from: getBuildScriptPath("change-log-config.gradle")
def getBuildScriptPath(String path) {
return "${project(":build-script").projectDir}/script/${path}"
}