[ 
https://issues.apache.org/jira/browse/GROOVY-8366?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul King resolved GROOVY-8366.
-------------------------------
    Resolution: Won't Fix

Resolving as Won't Fix.

The issue proposed a second Android jar with the invokedynamic classes removed 
(PR #631 excluded {{org.codehaus.groovy.vmplugin.v7.IndyInterface}}). That made 
sense for Groovy 2.x, where invokedynamic was optional and only a few classes 
used it. Since Groovy 4, invokedynamic is the only bytecode mode: the Groovy 
jar and every class Groovy compiles use it, so there is no indy-free subset to 
package. D8 desugaring can't fill the gap either, because it doesn't support 
{{MethodHandle.invoke}} / {{invokeExact}} below API 26.

Groovy 4 and later on Android therefore need {{minSdk}} 26 (Android 8.0) or 
higher. Recent Android fixes (GROOVY-12384, GROOVY-12418, GROOVY-12419) target 
that baseline.

> InvokeDynamic Classes Not Compatible with Android Compiler
> ----------------------------------------------------------
>
>                 Key: GROOVY-8366
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8366
>             Project: Groovy
>          Issue Type: Bug
>          Components: Android
>         Environment: Android with minSdk < 26 using plugin 3.0.0
>            Reporter: Andrew Reitz
>            Priority: Blocker
>
> Looks like in the newest Android Gradle Plugin 3.0.0 is supporting invoke 
> dynamic on Android versions < 26.  There is now a check on versions using 
> minSdk < 26 that causes the build to fail when the grooid jar is on the 
> classpath
> More Details: 
> https://github.com/groovy/groovy-android-gradle-plugin/issues/145
> Possible Solution: Create two jars for Android one with these classes removed 
> and one with the classes still included. Should be pretty easy to do in the 
> assembly.gradle and could possibly an opportunity to change the name of 
> grooid to something else.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to