You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by AndrewReitz <gi...@git.apache.org> on 2017/11/08 20:40:14 UTC
[GitHub] groovy pull request #631: Android: Remove Invoke Dynamic Call
GitHub user AndrewReitz opened a pull request:
https://github.com/apache/groovy/pull/631
Android: Remove Invoke Dynamic Call
Uses jarjar to remove org.codehaus.groovy.vmplugin.v7.IndyInterface
which has a invoke dynamic call. This call causes android compilation
to fail when targeting sdk level 26 or above but the minSdk is less
than 26.
Fixes: GROOVY-8366
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/AndrewReitz/groovy fix-invoke-dynamic-android-issue
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/groovy/pull/631.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #631
----
commit 50b157f467831cda37169a363617880da9aa1d17
Author: Andrew Reitz <an...@target.com>
Date: 2017-11-08T20:29:18Z
Android: Remove Invoke Dynamic Call
Uses jarjar to remove org.codehaus.groovy.vmplugin.v7.IndyInterface
which has a invoke dynamic call. This call causes android compilation
to fail when targeting sdk level 26 or above but the minSdk is less
than 26.
Fixes: GROOVY-8366
----
---
[GitHub] groovy pull request #631: Android: Remove Invoke Dynamic Call
Posted by AndrewReitz <gi...@git.apache.org>.
Github user AndrewReitz commented on a diff in the pull request:
https://github.com/apache/groovy/pull/631#discussion_r149974307
--- Diff: gradle/assemble.gradle ---
@@ -247,6 +247,7 @@ allprojects {
if (isRootProject) {
zipfileset(src: rootProject.configurations.runtime.files.find { it.name.startsWith('openbeans') }, excludes: 'META-INF/*')
}
+ zap pattern: 'org.codehaus.groovy.vmplugin.v7.IndyInterface'
--- End diff --
What do you think about having two android jars one without classes that use invoke dynamic and one with them still?
It looks like Android will be supporting it on ap's 26+. The issue is that Google added a check for classes using the invoke-polymorphic. Little more info here. https://issuetracker.google.com/issues/37567710
I am able to use proguard to remove the classes that cause the failure, but it increases build times greatly.
---
[GitHub] groovy pull request #631: Android: Remove Invoke Dynamic Call
Posted by blackdrag <gi...@git.apache.org>.
Github user blackdrag commented on a diff in the pull request:
https://github.com/apache/groovy/pull/631#discussion_r149848170
--- Diff: gradle/assemble.gradle ---
@@ -247,6 +247,7 @@ allprojects {
if (isRootProject) {
zipfileset(src: rootProject.configurations.runtime.files.find { it.name.startsWith('openbeans') }, excludes: 'META-INF/*')
}
+ zap pattern: 'org.codehaus.groovy.vmplugin.v7.IndyInterface'
--- End diff --
normally the Groovy version, that does not use indy, means indy is not used for Groovy itself, but the user can still use it. You pullrequest will mean that this is no longer possible. You have to at least also add the Java7 class, or else there will be class loading trouble. And the instantiation of that class would have to change. A bigger problem are the classes from org.codehaus.groovy.classgen.asm.indy, which do reference this class as well. Without further steps the groovy runtime and the compiler would get into trouble on a Java7 JVM or higher.
---