-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
97 lines (85 loc) · 2.89 KB
/
build.gradle
File metadata and controls
97 lines (85 loc) · 2.89 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
plugins {
id 'java'
id 'idea'
}
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
}
group 'fybug.nulll'
version = '0.0.1'
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:+"
// 注释包
testCompileOnly "jakarta.validation:jakarta.validation-api:+"
testCompileOnly "jakarta.annotation:jakarta.annotation-api:+"
testImplementation platform('org.junit:junit-bom:5.10.0')
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': 'java函数式接口拓展包',
'Bundle-Name': 'PDUtilFunctionExpand',
// '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('build_bin', Jar) {
archiveFileName = 'PDUtilFunctionExpand_bin.jar'
archiveClassifier = 'bin'
// 打包编译输出
from sourceSets.main.output
}
/** 源码包 */
tasks.register('build_sources', Jar) {
archiveFileName = 'PDUtilFunctionExpand_sources.jar'
archiveClassifier = 'sources'
// 打包源码
from sourceSets.main.allSource
}
tasks.register('release') {
dependsOn build_bin
dependsOn build_sources
}