Skip to content

Commit b76d453

Browse files
authored
Merge pull request #1154 from abelsromero/issue-853-deprecate-destinationDir-option-for-v2.5.x
Deprecate destinationDir option for v2.5.x
2 parents fa43680 + f8448fe commit b76d453

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

CHANGELOG.adoc

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ Improvement::
2121
* Upgrade to asciidoctorj-diagram 2.2.4 (#1140)
2222
* Upgrade to jruby 9.3.10.0 (#1138) (@alexlevinfr)
2323

24+
Bug Fixes::
25+
* Fix destinationDir not having effect. Deprecate destinationDir in favour of toDir (@abelsromero) (#853, #941)
26+
2427
Build / Infrastructure::
2528

2629
* Replace use of deprecated 'numbered' attribute by 'sectnums' (#1127) (@abelsromero)

asciidoctorj-api/src/main/java/org/asciidoctor/Options.java

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.asciidoctor;
22

3+
import java.io.File;
34
import java.io.OutputStream;
45
import java.util.ArrayList;
56
import java.util.Arrays;
@@ -171,6 +172,14 @@ public void setCompact(boolean compact) {
171172
this.options.put(COMPACT, compact);
172173
}
173174

175+
/**
176+
* Destination output directory.
177+
*
178+
* @param destinationDir
179+
* destination directory.
180+
* @deprecated Use {@link #setToDir(String)} instead.
181+
*/
182+
@Deprecated
174183
public void setDestinationDir(String destinationDir) {
175184
this.options.put(DESTINATION_DIR, destinationDir);
176185
}

asciidoctorj-api/src/main/java/org/asciidoctor/OptionsBuilder.java

+5-3
Original file line numberDiff line numberDiff line change
@@ -305,13 +305,15 @@ public OptionsBuilder parseHeaderOnly(boolean parseHeaderOnly) {
305305

306306
/**
307307
* Destination output directory.
308-
*
308+
*
309309
* @param destinationDir
310-
* destination directory.
310+
* destination directory.
311311
* @return this instance.
312+
* @deprecated Use {@link #toDir(File)} instead.
312313
*/
314+
@Deprecated
313315
public OptionsBuilder destinationDir(File destinationDir) {
314-
this.options.setDestinationDir(destinationDir.getAbsolutePath());
316+
this.options.setToDir(destinationDir.getAbsolutePath());
315317
return this;
316318
}
317319

0 commit comments

Comments
 (0)