Skip to content

Commit

Permalink
add paremeter to configure javac feature --enable-preview (#199)
Browse files Browse the repository at this point in the history
Signed-off-by: Olivier Lamy <[email protected]>
  • Loading branch information
olamy authored Mar 6, 2022
1 parent 4c656c3 commit 82ff10c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ public class CompilerConfiguration
*/
private String debugFileName;

/**
* configure <code>--enable-preview</code> of java compiler
*/
private boolean enablePreview;

// ----------------------------------------------------------------------
//
// ----------------------------------------------------------------------
Expand Down Expand Up @@ -632,6 +637,16 @@ public void setParameters(boolean parameters)
this.parameters = parameters;
}

public boolean isEnablePreview()
{
return enablePreview;
}

public void setEnablePreview(boolean enablePreview)
{
this.enablePreview = enablePreview;
}

public void setProc(String proc )
{
this.proc = proc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,11 @@ public static String[] buildCompilerArguments( CompilerConfiguration config, Str
args.add( "-parameters" );
}

if ( config.isEnablePreview() )
{
args.add( "--enable-preview" );
}

if ( config.isShowDeprecation() )
{
args.add( "-deprecation" );
Expand Down

0 comments on commit 82ff10c

Please sign in to comment.