-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
109 lines (90 loc) · 3.49 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
plugins {
id 'base'
id 'idea'
id 'java-platform'
id 'org.springframework.boot' version '3.2.7'
id 'io.spring.dependency-management' version '1.1.6'
}
group 'cn.huangdayu.things'
version '2024.1.0'
ext {
thingsFrameworkVersion = '2024.1.0'
springAlibabaVersion = '2023.0.1.2'
springBootVersion = '3.2.7'
springCloudVersion = '2023.0.3'
kouplelessVersion = "2.1.4"
nacosVersion = '2.4.0'
hutoolVersion = '5.8.31'
camelVersion = '4.7.0'
fastjson2Version = '2.0.52'
}
subprojects { project ->
group "cn.huangdayu.things"
version "${thingsFrameworkVersion}"
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'maven-publish'
apply plugin: 'io.spring.dependency-management'
if (project.name.endsWith("-app")) {
apply plugin: 'org.springframework.boot'
bootJar.destinationDirectory = file("$rootDir/build/libs")
bootJar.enabled = true
}
tasks.withType(GradleBuild).configureEach {
build {
args = ['-x test']
}
}
dependencies {
implementation platform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
implementation platform("org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}")
implementation platform("com.alibaba.cloud:spring-cloud-alibaba-dependencies:${springAlibabaVersion}")
implementation platform("com.alibaba.nacos:nacos-all:${nacosVersion}")
implementation platform("cn.hutool:hutool-bom:${hutoolVersion}")
implementation platform("org.apache.camel.springboot:camel-spring-boot-dependencies:${camelVersion}")
implementation "org.slf4j:slf4j-api"
implementation 'jakarta.annotation:jakarta.annotation-api'
implementation "com.alibaba.fastjson2:fastjson2:${fastjson2Version}"
compileOnly 'org.projectlombok:lombok:1.18.34'
annotationProcessor 'org.projectlombok:lombok:1.18.34'
testCompileOnly 'org.projectlombok:lombok:1.18.34'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.34'
testImplementation "org.springframework.boot:spring-boot-starter-test"
testImplementation 'junit:junit:4.13.2'
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
options.compilerArgs.add('-parameters')
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_21
}
configurations.configureEach {
resolutionStrategy.cacheChangingModulesFor 0, "minutes"
}
repositories {
mavenCentral()
maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'https://repo1.maven.org/maven2/' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifactId "${project.name}"
}
}
}
publishing {
repositories {
maven {
credentials {
allowInsecureProtocol = true
username project.hasProperty('username') ? project.getProperty('username') : 'admin'
password project.hasProperty('password') ? project.getProperty('password') : 'admin'
}
url "http://localhost/repository/maven-${project.version.endsWith('-SNAPSHOT') ? 'snapshots' : 'releases'}/"
}
}
}
}