-
Notifications
You must be signed in to change notification settings - Fork 0
/
0001-build-without-asciidoctor-bintray-and-system-rules.patch
367 lines (355 loc) · 15 KB
/
0001-build-without-asciidoctor-bintray-and-system-rules.patch
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
From d6ae143a7f559bc29cf5c5a3ad3f4ee957b1c794 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Radek=20Ma=C5=88=C3=A1k?= <[email protected]>
Date: Sat, 2 Mar 2019 15:54:33 +0100
Subject: [PATCH] build without asciidoctor, bintray and system-rules, disables
tests and javadoc
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Radek Maňák <[email protected]>
---
build.gradle | 85 ++-----------------------------
picocli-codegen/build.gradle | 38 +-------------
picocli-shell-jline2/build.gradle | 36 -------------
picocli-shell-jline3/build.gradle | 36 -------------
settings.gradle | 1 -
5 files changed, 5 insertions(+), 191 deletions(-)
diff --git a/build.gradle b/build.gradle
index ae743a8b..5d141626 100644
--- a/build.gradle
+++ b/build.gradle
@@ -2,32 +2,18 @@ group 'info.picocli'
description 'Java command line parser with both an annotations API and a programmatic API. Usage help with ANSI styles and colors. Autocomplete. Nested subcommands. Easily included as source to avoid adding a dependency.'
version "$projectVersion"
-buildscript {
- repositories {
- jcenter()
- }
-
- dependencies {
- classpath "org.asciidoctor:asciidoctor-gradle-plugin:$asciidoctorGradlePluginVersion"
- classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:$gradleBintrayPluginVersion"
- }
-}
-
-apply plugin: 'org.asciidoctor.convert'
apply plugin: 'distribution'
apply plugin: 'maven-publish'
-apply plugin: 'com.jfrog.bintray'
allprojects {
apply plugin: 'groovy'
apply plugin: 'java'
apply plugin: 'java-library' // to avoid https://github.com/gradle/gradle/issues/1118
- sourceCompatibility = !org.gradle.api.JavaVersion.current().isJava9Compatible() ?
- 1.5 : org.gradle.api.JavaVersion.current().isJava11Compatible() ? 1.7 : 1.6
- targetCompatibility = !org.gradle.api.JavaVersion.current().isJava9Compatible() ?
- 1.5 : org.gradle.api.JavaVersion.current().isJava11Compatible() ? 1.7 : 1.6
+ sourceCompatibility = 1.6
+ targetCompatibility = 1.6
repositories {
+ xmvn()
jcenter()
}
@@ -46,8 +32,7 @@ allprojects {
testCompile "junit:junit:$junitVersion",
"org.hamcrest:hamcrest-core:$hamcrestCoreVersion",
"org.fusesource.jansi:jansi:$jansiVersion",
- "org.codehaus.groovy:groovy-all:$groovyVersion",
- "com.github.stefanbirkner:system-rules:$systemRulesVersion"
+ "org.codehaus.groovy:groovy-all:$groovyVersion"
}
tasks.withType(GroovyCompile) {
@@ -78,23 +63,13 @@ allprojects {
classifier = 'javadoc'
from javadoc.destinationDir
}
- task testJar(type: Jar, dependsOn: compileTestJava) {
- from sourceSets.test.output
- classifier = 'tests'
- }
task sourcesJar(type: Jar) {
from sourceSets.main.java.srcDirs
classifier = 'sources'
}
- task testSourcesJar(type: Jar) {
- from sourceSets.test.java.srcDirs
- classifier = 'test-sources'
- }
artifacts {
archives javadocJar
archives sourcesJar
- archives testSourcesJar
- archives testJar
archives jar
}
distributions {
@@ -103,8 +78,6 @@ allprojects {
contents {
from jar
from sourcesJar
- from testJar
- from testSourcesJar
from javadocJar
from ('LICENSE')
from ("$rootDir/RELEASE-NOTES.md")
@@ -157,19 +130,6 @@ jar {
}
javadoc.options.overview = "src/main/java/overview.html"
-javadoc.dependsOn('asciidoctor')
-asciidoctor {
- sourceDir = file('docs')
- outputDir = file('build/docs')
- logDocuments = true
-}
-// jacoco 0.8.2 does not work with Java 13; gradle 4.x has no JavaVersion enum value for Java 12
-if (org.gradle.api.JavaVersion.current().isJava11Compatible()) {
- project.logger.lifecycle("skipping jacoco test for Java version ${org.gradle.api.JavaVersion.current()}")
-} else {
- project.logger.lifecycle("applying jacoco build file for Java version ${org.gradle.api.JavaVersion.current()}")
- apply from: "gradle/jacoco.gradle"
-}
task bumpReadmeVersion {
doLast {
// README.md
@@ -240,48 +200,11 @@ ext {
bintrayWebsiteUrl = 'http://picocli.info'
bintrayLabels = ['cli', 'cli framework', 'java', 'command line', 'ergonomic', 'library', 'parser', 'ansi', 'colors', 'annotations', 'reflection', 'usage', 'help', 'customizable', 'stand-alone application', 'main method', 'picocli']
}
-bintray {
- user = bintrayUsername
- key = bintrayApiKey
- publications = ['MyPublication']
- dryRun = bintrayDryRun //[Default: false] Whether to run this as dry-run, without deploying
- publish = bintrayPublish //[Default: false] Whether version should be auto published after an upload
- override = bintrayOverride //[Default: false] Whether to override version artifacts already published
- //Package configuration. The plugin will use the repo and name properties to check if the package already exists. In that case, there's no need to configure the other package properties (like userOrg, desc, etc).
- pkg {
- repo = 'picocli'
- name = bintrayPackage
- userOrg = 'remkop'
- licenses = ['Apache-2.0']
- desc = description
- websiteUrl = bintrayWebsiteUrl
- issueTrackerUrl = 'https://github.com/remkop/picocli/issues'
- vcsUrl = 'https://github.com/remkop/picocli.git'
- labels = bintrayLabels
- publicDownloadNumbers = false
- githubRepo = 'remkop/picocli' //Optional Github repository
- githubReleaseNotesFile = 'RELEASE-NOTES.md' //Optional Github readme file
- version {
- name = "$projectVersion"
- desc = description
- released = new Date()
- vcsTag = "v$projectVersion"
- mavenCentralSync {
- sync = mavenOssSync //[Default: true] Determines whether to sync the version to Maven Central.
- user = mavenOssUser //OSS user token: mandatory
- password = mavenOssPassword //OSS user password: mandatory
- close = '1' //Optional property. By default the staging repository is closed and artifacts are released to Maven Central. You can optionally turn this behaviour off (by puting 0 as value) and release the version manually.
- }
- }
- }
-}
publishing {
publications {
MyPublication(MavenPublication) {
from components.java
artifact sourcesJar
- artifact testJar
- artifact testSourcesJar
artifact javadocJar
groupId 'info.picocli'
artifactId bintrayPackage
diff --git a/picocli-codegen/build.gradle b/picocli-codegen/build.gradle
index 061f4f97..787d4686 100644
--- a/picocli-codegen/build.gradle
+++ b/picocli-codegen/build.gradle
@@ -2,7 +2,6 @@ plugins {
id 'java'
id 'distribution'
id 'maven-publish'
- id 'com.jfrog.bintray'
}
group 'info.picocli'
@@ -30,46 +29,11 @@ ext {
bintrayWebsiteUrl = 'https://github.com/remkop/picocli/tree/master/picocli-codegen'
bintrayLabels = ['cli', 'cli framework', 'command line', 'codegen', 'picocli']
}
-bintray {
- user = bintrayUsername
- key = bintrayApiKey
- publications = ['MyPublication']
- dryRun = bintrayDryRun //[Default: false] Whether to run this as dry-run, without deploying
- publish = bintrayPublish //[Default: false] Whether version should be auto published after an upload
- override = bintrayOverride //[Default: false] Whether to override version artifacts already published
- //Package configuration. The plugin will use the repo and name properties to check if the package already exists. In that case, there's no need to configure the other package properties (like userOrg, desc, etc).
- pkg {
- repo = 'picocli'
- name = bintrayPackage
- userOrg = 'remkop'
- licenses = ['Apache-2.0']
- desc = description
- websiteUrl = bintrayWebsiteUrl
- issueTrackerUrl = 'https://github.com/remkop/picocli/issues'
- vcsUrl = 'https://github.com/remkop/picocli.git'
- labels = bintrayLabels
- publicDownloadNumbers = false
- version {
- name = "$projectVersion"
- desc = description
- released = new Date()
- vcsTag = "v$projectVersion"
- mavenCentralSync {
- sync = mavenOssSync //[Default: true] Determines whether to sync the version to Maven Central.
- user = mavenOssUser //OSS user token: mandatory
- password = mavenOssPassword //OSS user password: mandatory
- close = '1' //Optional property. By default the staging repository is closed and artifacts are released to Maven Central. You can optionally turn this behaviour off (by puting 0 as value) and release the version manually.
- }
- }
- }
-}
publishing {
publications {
MyPublication(MavenPublication) {
from components.java
artifact sourcesJar
- artifact testJar
- artifact testSourcesJar
artifact javadocJar
groupId 'info.picocli'
artifactId bintrayPackage
@@ -85,4 +49,4 @@ publishing {
}
}
}
-}
+}
\ No newline at end of file
diff --git a/picocli-shell-jline2/build.gradle b/picocli-shell-jline2/build.gradle
index 63245e4d..8a454e67 100644
--- a/picocli-shell-jline2/build.gradle
+++ b/picocli-shell-jline2/build.gradle
@@ -2,7 +2,6 @@ plugins {
id 'java'
id 'distribution'
id 'maven-publish'
- id 'com.jfrog.bintray'
}
group 'info.picocli'
@@ -32,46 +31,11 @@ ext {
bintrayWebsiteUrl = 'https://github.com/remkop/picocli/tree/master/picocli-shell-jline2'
bintrayLabels = ['cli', 'interactive', 'commandline', 'shell', 'picocli', 'jline']
}
-bintray {
- user = bintrayUsername
- key = bintrayApiKey
- publications = ['MyPublication']
- dryRun = bintrayDryRun //[Default: false] Whether to run this as dry-run, without deploying
- publish = bintrayPublish //[Default: false] Whether version should be auto published after an upload
- override = bintrayOverride //[Default: false] Whether to override version artifacts already published
- //Package configuration. The plugin will use the repo and name properties to check if the package already exists. In that case, there's no need to configure the other package properties (like userOrg, desc, etc).
- pkg {
- repo = 'picocli'
- name = bintrayPackage
- userOrg = 'remkop'
- licenses = ['Apache-2.0']
- desc = description
- websiteUrl = bintrayWebsiteUrl
- issueTrackerUrl = 'https://github.com/remkop/picocli/issues'
- vcsUrl = 'https://github.com/remkop/picocli.git'
- labels = bintrayLabels
- publicDownloadNumbers = false
- version {
- name = "$projectVersion"
- desc = description
- released = new Date()
- vcsTag = "v$projectVersion"
- mavenCentralSync {
- sync = mavenOssSync //[Default: true] Determines whether to sync the version to Maven Central.
- user = mavenOssUser //OSS user token: mandatory
- password = mavenOssPassword //OSS user password: mandatory
- close = '1' //Optional property. By default the staging repository is closed and artifacts are released to Maven Central. You can optionally turn this behaviour off (by puting 0 as value) and release the version manually.
- }
- }
- }
-}
publishing {
publications {
MyPublication(MavenPublication) {
from components.java
artifact sourcesJar
- artifact testJar
- artifact testSourcesJar
artifact javadocJar
groupId 'info.picocli'
artifactId bintrayPackage
diff --git a/picocli-shell-jline3/build.gradle b/picocli-shell-jline3/build.gradle
index 79b0c56e..8a88d2de 100644
--- a/picocli-shell-jline3/build.gradle
+++ b/picocli-shell-jline3/build.gradle
@@ -2,7 +2,6 @@ plugins {
id 'java'
id 'distribution'
id 'maven-publish'
- id 'com.jfrog.bintray'
}
group 'info.picocli'
@@ -32,46 +31,11 @@ ext {
bintrayWebsiteUrl = 'https://github.com/remkop/picocli/tree/master/picocli-shell-jline3'
bintrayLabels = ['cli', 'interactive', 'commandline', 'shell', 'picocli', 'jline']
}
-bintray {
- user = bintrayUsername
- key = bintrayApiKey
- publications = ['MyPublication']
- dryRun = bintrayDryRun //[Default: false] Whether to run this as dry-run, without deploying
- publish = bintrayPublish //[Default: false] Whether version should be auto published after an upload
- override = bintrayOverride //[Default: false] Whether to override version artifacts already published
- //Package configuration. The plugin will use the repo and name properties to check if the package already exists. In that case, there's no need to configure the other package properties (like userOrg, desc, etc).
- pkg {
- repo = 'picocli'
- name = bintrayPackage
- userOrg = 'remkop'
- licenses = ['Apache-2.0']
- desc = description
- websiteUrl = bintrayWebsiteUrl
- issueTrackerUrl = 'https://github.com/remkop/picocli/issues'
- vcsUrl = 'https://github.com/remkop/picocli.git'
- labels = bintrayLabels
- publicDownloadNumbers = false
- version {
- name = "$projectVersion"
- desc = description
- released = new Date()
- vcsTag = "v$projectVersion"
- mavenCentralSync {
- sync = mavenOssSync //[Default: true] Determines whether to sync the version to Maven Central.
- user = mavenOssUser //OSS user token: mandatory
- password = mavenOssPassword //OSS user password: mandatory
- close = '1' //Optional property. By default the staging repository is closed and artifacts are released to Maven Central. You can optionally turn this behaviour off (by puting 0 as value) and release the version manually.
- }
- }
- }
-}
publishing {
publications {
MyPublication(MavenPublication) {
from components.java
artifact sourcesJar
- artifact testJar
- artifact testSourcesJar
artifact javadocJar
groupId 'info.picocli'
artifactId bintrayPackage
diff --git a/settings.gradle b/settings.gradle
index c7999ff9..7b11ef0a 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,5 +1,4 @@
rootProject.name = 'picocli'
-include 'picocli-examples'
include 'picocli-shell-jline2'
include 'picocli-shell-jline3'
include 'picocli-codegen'
--
2.20.1