|
25 | 25 | import org.asciidoctor.gradle.jvm.AsciidoctorJExtension;
|
26 | 26 | import org.asciidoctor.gradle.jvm.AsciidoctorJPlugin;
|
27 | 27 | import org.asciidoctor.gradle.jvm.AsciidoctorTask;
|
28 |
| -import org.gradle.api.JavaVersion; |
29 | 28 | import org.gradle.api.Project;
|
30 | 29 | import org.gradle.api.tasks.PathSensitivity;
|
31 | 30 | import org.gradle.api.tasks.Sync;
|
@@ -120,16 +119,14 @@ private void configureCommonAttributes(Project project, AbstractAsciidoctorTask
|
120 | 119 | attributes.put("github-tag", determineGitHubTag(project));
|
121 | 120 | attributes.put("artifact-release-type", artifacts.getType());
|
122 | 121 | attributes.put("artifact-download-repo", artifacts.getDownloadRepo());
|
123 |
| - attributes.put("revnumber", null); |
| 122 | + attributes.put("revnumber", project.getVersion()); |
124 | 123 | asciidoctorTask.attributes(attributes);
|
125 | 124 | }
|
126 | 125 |
|
127 | 126 | // See https://github.com/asciidoctor/asciidoctor-gradle-plugin/issues/597
|
128 | 127 | private void configureForkOptions(AbstractAsciidoctorTask asciidoctorTask) {
|
129 |
| - if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_16)) { |
130 |
| - asciidoctorTask.forkOptions((options) -> options.jvmArgs("--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", |
131 |
| - "--add-opens", "java.base/java.io=ALL-UNNAMED")); |
132 |
| - } |
| 128 | + asciidoctorTask.jvm((options) -> options.jvmArgs("--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED", |
| 129 | + "--add-opens", "java.base/java.io=ALL-UNNAMED")); |
133 | 130 | }
|
134 | 131 |
|
135 | 132 | private String determineGitHubTag(Project project) {
|
|
0 commit comments