slawekjaranowski commented on code in PR #201:
URL:
https://github.com/apache/maven-script-interpreter/pull/201#discussion_r3899070814
##########
src/main/java/org/apache/maven/shared/scriptinterpreter/GroovyScriptInterpreter.java:
##########
@@ -59,6 +66,27 @@ private URL toUrl(String path) {
}
}
+ /**
+ * Maps a Maven-style release value (for example <code>"8"</code>) to the
version string Groovy's
+ * {@link CompilerConfiguration#setTargetBytecode(String)} expects (for
example <code>"1.8"</code>). Groovy uses
+ * the <code>"1.x"</code> form for JDK 4 through 8, and bare version
numbers from JDK 9 onward.
+ *
+ * @param version The Maven-style release value, must not be
<code>null</code>.
+ * @return The Groovy-compatible bytecode version string.
+ */
+ static String normalizeTargetBytecode(String version) {
+ switch (version) {
+ case "4":
+ case "5":
Review Comment:
JDK 4, 5 😄
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]