Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate destinationDir option for v2.5.x #1154

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ Improvement::
* Upgrade to asciidoctorj-diagram 2.2.4 (#1140)
* Upgrade to jruby 9.3.10.0 (#1138) (@alexlevinfr)

Bug Fixes::
* Fix destinationDir not having effect. Deprecate destinationDir in favour of toDir (@abelsromero) (#853, #941)

Build / Infrastructure::

* Replace use of deprecated 'numbered' attribute by 'sectnums' (#1127) (@abelsromero)
Expand Down
9 changes: 9 additions & 0 deletions asciidoctorj-api/src/main/java/org/asciidoctor/Options.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.asciidoctor;

import java.io.File;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Arrays;
Expand Down Expand Up @@ -171,6 +172,14 @@ public void setCompact(boolean compact) {
this.options.put(COMPACT, compact);
}

/**
* Destination output directory.
*
* @param destinationDir
* destination directory.
* @deprecated Use {@link #setToDir(String)} instead.
*/
@Deprecated
public void setDestinationDir(String destinationDir) {
this.options.put(DESTINATION_DIR, destinationDir);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,13 +305,15 @@ public OptionsBuilder parseHeaderOnly(boolean parseHeaderOnly) {

/**
* Destination output directory.
*
*
* @param destinationDir
* destination directory.
* destination directory.
* @return this instance.
* @deprecated Use {@link #toDir(File)} instead.
*/
@Deprecated
public OptionsBuilder destinationDir(File destinationDir) {
this.options.setDestinationDir(destinationDir.getAbsolutePath());
this.options.setToDir(destinationDir.getAbsolutePath());
return this;
}

Expand Down