You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2020/04/25 02:55:02 UTC

[groovy] branch master updated: GROOVY-9513: Enable indy by default (retain binary compatibility for now for related Ant tasks but deprecate methods)

This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/master by this push:
     new 5127c47  GROOVY-9513: Enable indy by default (retain binary compatibility for now for related Ant tasks but deprecate methods)
5127c47 is described below

commit 5127c474352146131e17be200927769ed6a8c9c0
Author: Paul King <pa...@asert.com.au>
AuthorDate: Sat Apr 25 12:54:54 2020 +1000

    GROOVY-9513: Enable indy by default (retain binary compatibility for now for related Ant tasks but deprecate methods)
---
 .../main/java/org/codehaus/groovy/ant/Groovy.java    | 11 +++++++++++
 .../main/java/org/codehaus/groovy/ant/Groovyc.java   | 20 ++++++++++++++++++++
 2 files changed, 31 insertions(+)

diff --git a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovy.java b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovy.java
index 69c6131..4a2d13e 100644
--- a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovy.java
+++ b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovy.java
@@ -297,6 +297,17 @@ public class Groovy extends Java {
         this.configscript = configscript;
     }
 
+    /**
+     * Legacy method to set the indy flag (only true is allowed)
+     *
+     * @param indy true means invokedynamic support is active
+     */
+    @Deprecated
+    public void setIndy(final boolean indy) {
+        if (!indy) {
+            throw new BuildException("Disabling indy is no longer supported!", getLocation());
+        }
+    }
 
     /**
      * Set the script base class name
diff --git a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java
index b48bce6..aab8c15 100644
--- a/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java
+++ b/subprojects/groovy-ant/src/main/java/org/codehaus/groovy/ant/Groovyc.java
@@ -703,6 +703,26 @@ public class Groovyc extends MatchingTask {
     }
 
     /**
+     * Legacy method to set the indy flag (only true is allowed)
+     *
+     * @param indy true means invokedynamic support is active
+     */
+    @Deprecated
+    public void setIndy(final boolean indy) {
+        if (!indy) {
+            throw new BuildException("Disabling indy is no longer supported!", getLocation());
+        }
+    }
+
+    /**
+     * Get the value of the indy flag (always true).
+     */
+    @Deprecated
+    public boolean getIndy() {
+        return true;
+    }
+
+    /**
      * Set the base script class name for the scripts (must derive from Script)
      *
      * @param scriptBaseClass Base class name for scripts (must derive from Script)