This repository has been archived by the owner on Dec 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
68 lines (56 loc) · 1.5 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
plugins {
id 'idea'
id 'java-library'
id 'distribution'
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
java {
sourceCompatibility = '21'
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
ext {
set('springCloudVersion', "2023.0.0")
}
allprojects {
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
repositories {
maven { url 'https://repo.spring.io/snapshot' }
maven { url 'https://maven.aliyun.com/repository/public/' }
mavenLocal()
mavenCentral()
}
}
subprojects {
apply plugin: 'idea'
apply plugin: 'java-library'
dependencies {
implementation platform('org.springframework.boot:spring-boot-dependencies:3.2.1-SNAPSHOT')
implementation platform('org.springframework.cloud:spring-cloud-dependencies:2023.0.0')
}
afterEvaluate {
if (project.plugins.hasPlugin('org.springframework.boot')) {
build {
dependsOn 'copyJar'
}
clean {
dependsOn 'deleteJar'
}
tasks.register('copyJar', Copy) {
from bootJar
// working directory is module/build
into "${rootProject.projectDir}/.jar-output"
}
tasks.register('deleteJar', Delete) {
delete "${rootProject.projectDir}/.jar-output/" + bootJar.archiveFileName.get()
}
}
}
}