-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
114 lines (101 loc) · 3.33 KB
/
build.gradle
File metadata and controls
114 lines (101 loc) · 3.33 KB
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
110
111
112
113
114
plugins {
id 'java'
id 'idea'
}
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
}
group 'fybug.nulll'
version = '0.0.2 expand 3'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(23)
}
}
repositories {
mavenLocal()
mavenCentral()
google()
maven { url 'https://maven.aliyun.com/repository/releases' }
maven { url "https://maven.aliyun.com/repository/jcenter" }
maven { url "https://maven.aliyun.com/repository/mapr-public" }
maven { url "https://maven.aliyun.com/repository/staging-alpha" }
maven { url "https://maven.aliyun.com/repository/central" }
maven { url "https://maven.aliyun.com/repository/public/" }
maven { url "https://maven.aliyun.com/repository/google" }
maven { url "https://maven.aliyun.com/repository/gradle-plugin" }
maven { url "https://maven.aliyun.com/repository/spring" }
maven { url "https://maven.aliyun.com/repository/spring-plugin" }
maven { url "https://maven.aliyun.com/repository/grails-core" }
maven { url "https://maven.aliyun.com/repository/snapshots" }
maven { url "https://maven.aliyun.com/repository/apache-snapshots" }
maven { url "https://maven.aliyun.com/repository/staging-alpha-group" }
}
dependencies {
// 本地依赖
implementation fileTree(dir: 'lib', includes: ['*.jar'])
// 注释包
compileOnly "jakarta.validation:jakarta.validation-api:+"
compileOnly "jakarta.annotation:jakarta.annotation-api:+"
// lombok
compileOnly 'org.projectlombok:lombok:+'
annotationProcessor 'org.projectlombok:lombok:+'
// 注释包
testCompileOnly "jakarta.validation:jakarta.validation-api:+"
testCompileOnly "jakarta.annotation:jakarta.annotation-api:+"
// lombok
testCompileOnly "org.projectlombok:lombok:+"
testAnnotationProcessor "org.projectlombok:lombok:+"
testRuntimeOnly "org.junit.jupiter:junit-jupiter:5.12.0-RC2"
}
test {
dependencies {
testImplementation "org.junit.jupiter:junit-jupiter:5.12.0-RC2"
}
useJUnitPlatform()
}
/** 清单文件内容 */
tasks.withType(Jar).configureEach {
destinationDirectory = file('jar')
manifest {
attributes('Manifest-Version': '1.0',
'Built-By': 'fybug/风雨bu改',
'Build-Jdk-Spec': 23,
'Bundle-Description': '描述',
'Bundle-Name': 'PDCache',
// 'Bundle-DocURL': 'https://apidoc.gitee.com/fybug/PDConcurrent/',
'Bundle-Vendor': 'IntelliJ IDEA',
'Bundle-Version': version,
'Bundle-License': 'https://www.apache.org/licenses/LICENSE-2.0',
'Created-By': 'Gradle 8.10.2')
}
}
/** 编译包 */
tasks.register('PDCache', Jar) {
archiveFileName = 'PDCache.jar'
archiveClassifier = ''
// 打包编译输出
from sourceSets.main.output
}
tasks.register('PDCache_bin', Jar) {
archiveFileName = 'PDCache_bin.jar'
archiveClassifier = 'bin'
// 打包编译输出
from sourceSets.main.output
from {
// implementation 相关的引入解压并打包入新的jar中
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}
/** 源码包 */
tasks.register('PDCache_sources', Jar) {
archiveFileName = 'PDCache_sources.jar'
archiveClassifier = 'sources'
// 打包源码
from sourceSets.main.allSource
}
tasks.register('release') {
dependsOn PDCache
dependsOn PDCache_bin
dependsOn PDCache_sources
}