|
1 | 1 | plugins { |
2 | | - id 'java' |
3 | | - id 'idea' |
| 2 | + id 'java' |
| 3 | + id 'idea' |
4 | 4 | } |
5 | 5 |
|
6 | 6 | tasks.withType(JavaCompile).configureEach { |
7 | | - options.encoding = "UTF-8" |
| 7 | + options.encoding = "UTF-8" |
8 | 8 | } |
9 | 9 |
|
10 | 10 | group 'fybug.nulll' |
11 | 11 | version = '0.1.0' |
12 | 12 |
|
13 | 13 | java { |
14 | | - toolchain { |
15 | | - languageVersion = JavaLanguageVersion.of(23) |
16 | | - } |
| 14 | + toolchain { |
| 15 | + languageVersion = JavaLanguageVersion.of(23) |
| 16 | + } |
17 | 17 | } |
18 | 18 |
|
19 | 19 | repositories { |
20 | | - mavenLocal() |
21 | | - mavenCentral() |
22 | | - google() |
23 | | - maven { url 'https://maven.aliyun.com/repository/releases' } |
24 | | - maven { url "https://maven.aliyun.com/repository/jcenter" } |
25 | | - maven { url "https://maven.aliyun.com/repository/mapr-public" } |
26 | | - maven { url "https://maven.aliyun.com/repository/staging-alpha" } |
27 | | - maven { url "https://maven.aliyun.com/repository/central" } |
28 | | - maven { url "https://maven.aliyun.com/repository/public/" } |
29 | | - maven { url "https://maven.aliyun.com/repository/google" } |
30 | | - maven { url "https://maven.aliyun.com/repository/gradle-plugin" } |
31 | | - maven { url "https://maven.aliyun.com/repository/spring" } |
32 | | - maven { url "https://maven.aliyun.com/repository/spring-plugin" } |
33 | | - maven { url "https://maven.aliyun.com/repository/grails-core" } |
34 | | - maven { url "https://maven.aliyun.com/repository/snapshots" } |
35 | | - maven { url "https://maven.aliyun.com/repository/apache-snapshots" } |
36 | | - maven { url "https://maven.aliyun.com/repository/staging-alpha-group" } |
| 20 | + mavenLocal() |
| 21 | + mavenCentral() |
| 22 | + google() |
| 23 | + maven { url 'https://maven.aliyun.com/repository/releases' } |
| 24 | + maven { url "https://maven.aliyun.com/repository/jcenter" } |
| 25 | + maven { url "https://maven.aliyun.com/repository/mapr-public" } |
| 26 | + maven { url "https://maven.aliyun.com/repository/staging-alpha" } |
| 27 | + maven { url "https://maven.aliyun.com/repository/central" } |
| 28 | + maven { url "https://maven.aliyun.com/repository/public/" } |
| 29 | + maven { url "https://maven.aliyun.com/repository/google" } |
| 30 | + maven { url "https://maven.aliyun.com/repository/gradle-plugin" } |
| 31 | + maven { url "https://maven.aliyun.com/repository/spring" } |
| 32 | + maven { url "https://maven.aliyun.com/repository/spring-plugin" } |
| 33 | + maven { url "https://maven.aliyun.com/repository/grails-core" } |
| 34 | + maven { url "https://maven.aliyun.com/repository/snapshots" } |
| 35 | + maven { url "https://maven.aliyun.com/repository/apache-snapshots" } |
| 36 | + maven { url "https://maven.aliyun.com/repository/staging-alpha-group" } |
37 | 37 | } |
38 | 38 |
|
39 | 39 | dependencies { |
40 | | - // 本地依赖 |
41 | | - implementation fileTree(dir: 'lib', includes: ['*.jar']) |
| 40 | + // 本地依赖 |
| 41 | + implementation fileTree(dir: 'lib', includes: ['*.jar']) |
42 | 42 |
|
43 | | - // 注释包 |
44 | | - compileOnly "jakarta.validation:jakarta.validation-api:+" |
45 | | - compileOnly "jakarta.annotation:jakarta.annotation-api:+" |
46 | | - // lombok |
47 | | - compileOnly 'org.projectlombok:lombok:+' |
48 | | - annotationProcessor 'org.projectlombok:lombok:+' |
| 43 | + // 注释包 |
| 44 | + compileOnly "jakarta.validation:jakarta.validation-api:+" |
| 45 | + compileOnly "jakarta.annotation:jakarta.annotation-api:+" |
| 46 | + // lombok |
| 47 | + compileOnly 'org.projectlombok:lombok:+' |
| 48 | + annotationProcessor 'org.projectlombok:lombok:+' |
49 | 49 |
|
50 | | - // 注释包 |
51 | | - testCompileOnly "jakarta.validation:jakarta.validation-api:+" |
52 | | - testCompileOnly "jakarta.annotation:jakarta.annotation-api:+" |
53 | | - // lombok |
54 | | - testCompileOnly "org.projectlombok:lombok:+" |
55 | | - testAnnotationProcessor "org.projectlombok:lombok:+" |
56 | | - // testImplementation "junit:junit" |
| 50 | + // 注释包 |
| 51 | + testCompileOnly "jakarta.validation:jakarta.validation-api:+" |
| 52 | + testCompileOnly "jakarta.annotation:jakarta.annotation-api:+" |
| 53 | + // lombok |
| 54 | + testCompileOnly "org.projectlombok:lombok:+" |
| 55 | + testAnnotationProcessor "org.projectlombok:lombok:+" |
| 56 | + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' |
57 | 57 | } |
58 | 58 |
|
59 | 59 | test { |
60 | | - useJUnitPlatform() |
| 60 | + dependencies { |
| 61 | + testImplementation "org.junit.platform:junit-platform-launcher" |
| 62 | + } |
| 63 | + useJUnitPlatform() |
61 | 64 | } |
62 | 65 |
|
63 | 66 | /** 清单文件内容 */ |
64 | 67 | tasks.withType(Jar).configureEach { |
65 | | - manifest { |
66 | | - attributes('Manifest-Version': '1.0', |
67 | | - 'Built-By': 'fybug/风雨bu改', |
68 | | - 'Build-Jdk-Spec': 23, |
69 | | - 'Bundle-Description': 'java并发控制工具', |
70 | | - 'Bundle-Name': 'PDConcurrent', |
71 | | - // 'Bundle-DocURL': 'https://apidoc.gitee.com/fybug/PDConcurrent/', |
72 | | - 'Bundle-Vendor': 'IntelliJ IDEA', |
73 | | - 'Bundle-Version': version, |
74 | | - 'Bundle-License': 'https://www.apache.org/licenses/LICENSE-2.0', |
75 | | - 'Created-By': 'Gradle 8.10.2') |
76 | | - } |
| 68 | + destinationDirectory = file('jar') |
| 69 | + manifest { |
| 70 | + attributes('Manifest-Version': '1.0', |
| 71 | + 'Built-By': 'fybug/风雨bu改', |
| 72 | + 'Build-Jdk-Spec': 23, |
| 73 | + 'Bundle-Description': 'java并发控制工具', |
| 74 | + 'Bundle-Name': 'PDConcurrent', |
| 75 | + // 'Bundle-DocURL': 'https://apidoc.gitee.com/fybug/PDConcurrent/', |
| 76 | + 'Bundle-Vendor': 'IntelliJ IDEA', |
| 77 | + 'Bundle-Version': version, |
| 78 | + 'Bundle-License': 'https://www.apache.org/licenses/LICENSE-2.0', |
| 79 | + 'Created-By': 'Gradle 8.10.2') |
| 80 | + } |
77 | 81 | } |
78 | 82 |
|
79 | 83 | /** 编译包 */ |
80 | 84 | tasks.register('PDConcurrent_bin', Jar) { |
81 | | - dependsOn classes |
82 | | - destinationDirectory = file('jar') |
83 | | - archiveFileName = 'PDConcurrent_bin.jar' |
84 | | - archiveClassifier = '' |
85 | | - // 打包编译输出 |
86 | | - from sourceSets.main.output |
| 85 | + archiveFileName = 'PDConcurrent_bin.jar' |
| 86 | + archiveClassifier = '' |
| 87 | + // 打包编译输出 |
| 88 | + from sourceSets.main.output |
87 | 89 | } |
88 | 90 |
|
89 | 91 | /** 源码包 */ |
90 | 92 | tasks.register('PDConcurrent_sources', Jar) { |
91 | | - dependsOn classes |
92 | | - destinationDirectory = file('jar') |
93 | | - archiveFileName = 'PDConcurrent_sources.jar' |
94 | | - archiveClassifier = 'sources' |
95 | | - // 打包源码 |
96 | | - from sourceSets.main.allSource |
| 93 | + archiveFileName = 'PDConcurrent_sources.jar' |
| 94 | + archiveClassifier = 'sources' |
| 95 | + // 打包源码 |
| 96 | + from sourceSets.main.allSource |
97 | 97 | } |
98 | 98 |
|
99 | | -tasks.register('PDConcurrent_all', Jar) { |
100 | | - dependsOn classes |
101 | | - destinationDirectory = file('jar') |
102 | | - archiveFileName = 'PDConcurrent_all.jar' |
103 | | - archiveClassifier = 'all' |
104 | | - // 打包编译输出 |
105 | | - from sourceSets.main.output |
106 | | - from { |
107 | | - // implementation 相关的引入解压并打包入新的jar中 |
108 | | - configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } |
109 | | - } |
110 | | -} |
| 99 | +//tasks.register('PDConcurrent_all', Jar) { |
| 100 | +// archiveFileName = 'PDConcurrent_all.jar' |
| 101 | +// archiveClassifier = 'all' |
| 102 | +// // 打包编译输出 |
| 103 | +// from sourceSets.main.output |
| 104 | +// from { |
| 105 | +// // implementation 相关的引入解压并打包入新的jar中 |
| 106 | +// configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } |
| 107 | +// } |
| 108 | +//} |
111 | 109 |
|
112 | 110 | tasks.register('release') { |
113 | | - dependsOn clean |
114 | | - dependsOn PDConcurrent_bin |
115 | | - dependsOn PDConcurrent_sources |
| 111 | + dependsOn PDConcurrent_bin |
| 112 | + dependsOn PDConcurrent_sources |
116 | 113 | } |
0 commit comments