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

[MCOMPILER-426] add flag to enable-preview java compiler feature #98

Merged
merged 2 commits into from Mar 7, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -68,7 +68,7 @@ under the License.
! The following property is used in the integration tests MCOMPILER-157
-->
<mavenPluginPluginVersion>3.5</mavenPluginPluginVersion>
<plexusCompilerVersion>2.11.0</plexusCompilerVersion>
<plexusCompilerVersion>2.11.1</plexusCompilerVersion>

<groovyVersion>2.4.21</groovyVersion>
<groovyEclipseCompilerVersion>3.7.0</groovyEclipseCompilerVersion>
Expand Down
Expand Up @@ -140,6 +140,14 @@ public abstract class AbstractCompilerMojo
@Parameter( property = "maven.compiler.parameters", defaultValue = "false" )
private boolean parameters;


/**
* Set to <code>true</code> to Enable preview language features of the java compiler
* @since 3.10.1
*/
@Parameter( property = "maven.compiler.enablePreview", defaultValue = "false" )
private boolean enablePreview;

/**
* Set to <code>true</code> to show messages about what the compiler is doing.
*/
Expand Down Expand Up @@ -695,6 +703,8 @@ public void execute()

compilerConfiguration.setParameters( parameters );

compilerConfiguration.setEnablePreview( enablePreview );

compilerConfiguration.setVerbose( verbose );

compilerConfiguration.setShowWarnings( showWarnings );
Expand Down