-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
109 lines (85 loc) · 3.14 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
buildscript {
wrapper {
gradleVersion = GRADLE_VERSION
}
ext {
//https://plugins.gradle.org/plugin/org.springframework.boot
springBootVersion = '3.1.10'
commons = (subprojects - project(":matrix-bom"))
}
}
plugins {
id 'base'
id "org.sonarqube" version "4.2.1.3168"
id 'java-platform'
id "org.springframework.boot" version "${springBootVersion}" apply false
id "io.spring.dependency-management" version "1.1.0" apply false
id "com.google.cloud.tools.jib" version "3.4.1" apply false
}
sonar {
properties {
property "sonar.projectKey", "xxxxxxx"
property "sonar.projectName", "matrix-cloud"
property "sonar.host.url", "http://192.168.31.19:9000"
property "sonar.token", "xxxxxx"
}
}
allprojects {
group = GROUP
version = VERSION
repositories {
mavenLocal()
//华为云
maven { url 'https://repo.huaweicloud.com/repository/maven/' }
//阿里云
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url "https://maven.aliyun.com/repository/public" }
maven { url "https://maven.aliyun.com/repository/gradle-plugin" }
mavenCentral()
}
}
configure(commons) {
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'org.sonarqube'
apply plugin: 'java-library'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply from: "${rootProject.projectDir}/version.gradle"
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
compileJava {
options.encoding = "UTF-8"
}
dependencyManagement {
imports {
mavenBom "com.alibaba.cloud:spring-cloud-alibaba-dependencies:${springCloudAlibabaVersion}"
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
mavenBom "net.dreamlu:mica-bom:${micaVersion}"
}
}
dependencies {
implementation platform(project(":matrix-bom"))
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
compileOnly "org.springframework.boot:spring-boot-configuration-processor"
compileOnly "org.projectlombok:lombok"
testCompileOnly "org.projectlombok:lombok"
annotationProcessor "org.projectlombok:lombok"
annotationProcessor "org.projectlombok:lombok-mapstruct-binding:0.2.0"
testAnnotationProcessor "org.projectlombok:lombok"
implementation "io.github.linpeilie:mapstruct-plus-spring-boot-starter:${mapstructPlusVersion}"
annotationProcessor "io.github.linpeilie:mapstruct-plus-processor:${mapstructPlusVersion}"
testAnnotationProcessor "io.github.linpeilie:mapstruct-plus-processor:${mapstructPlusVersion}"
}
test {
enabled = false
useJUnitPlatform()
}
bootJar {
enabled = false
}
compileJava.options.compilerArgs.add '-parameters'
compileTestJava.options.compilerArgs.add '-parameters'
compileJava.dependsOn(processResources)
}
apply from: "${rootProject.projectDir}/deploy.gradle"