Comments (5)
I believe this is a groovy bug. The groovy team seemed to have fixed something when calling static methods, which are defined on interfaces:
However, something has changed on Java 9. I have created a simple example that reproduces the error shown above.
Other projects seems to be having the same problem:
- palantir/gradle-docker#96
- The jshell gradle plugin I am trying to contribute to
Not sure what is the best approach here. Should this be raised as an issue in the Groovy project github?
from gradle.
According to the state of the linked Groovy issue 7879 it should be resolved since Groovy 2.4.11.
But, using
------------------------------------------------------------
Gradle 4.6
------------------------------------------------------------
Build time: 2018-02-28 13:36:36 UTC
Revision: 8fa6ce7945b640e6168488e4417f9bb96e4ab46c
Groovy: 2.4.12
Ant: Apache Ant(TM) version 1.9.9 compiled on February 2 2017
JVM: 10-ea ("Oracle Corporation" 10-ea+42)
OS: Windows 10 10.0 amd64
R:\dev\github\junit-team\junit5>gradlew build
with this Java 9 code:
java.util.spi.ToolProvider.findFirst('jar').get()
...it still fails with Method java.util.spi.ToolProvider.findFirst(Ljava/lang/String;)Ljava/util/Optional; must be InterfaceMethodref constant
from gradle.
Happens with Gradle 4.7 (Groovy 2.4.12) as well.
Seems to be fixed with Groovy 3.0-alpha-2, though:
groovy -e "java.util.spi.ToolProvider.findFirst('jar').get().run(System.out, System.err, '--version')"
WARNING: Using incubator modules: jdk.incubator.httpclient
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:/../lib/groovy-3.0.0-alpha-2.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
jar 10
from gradle.
Seems to be fixed in 2.4.16: https://issues.apache.org/jira/browse/GROOVY-8528
from gradle.
This works fine with Groovy 2.4.15
from gradle.
Related Issues (20)
- "Since" javadoc check fails when the added uses generic parameters
- `Configuration cache state could not be cached` on included build with `gradle-enterprise` plugin when running tests HOT 2
- Make all injector-getters abstract in public types
- Improve problem report aggregation and deduplication
- Build service registration from wrong classloader should give a more specific help message
- Fix docs info
- Provide a `DirectDependenciesMetadata::add` method which accepts a `Provider<MinimalExternalModuleDependency>` HOT 1
- Configuration cache errors become warnings in the report when Gradle drops stacktraces due to a hardcoded limit
- Checkstyle plugin is not compatible with Isolated Projects
- Generating Kotlin DSL accessors in 8.7-rc-3 use Any instead of actual types HOT 3
- Update annotations so they don't require a `@get:` prefix in Kotlin HOT 5
- Support storing `Externalizable` objects in the Configuration Cache
- Deprecated properties warning breaks Gradle 8.5 Tooling API when `ProgressListener` is registered HOT 1
- Fix doc info
- `configureEach` is not a drop-in replacement for `whenObjectAdded` HOT 1
- "Immutable workspace contents have been modified" failure when workspace contents are not modified HOT 10
- checkstyle plugin inappropriately depends on classes HOT 1
- Make workers run as daemon scoped HOT 2
- Worker API documentation incorrectly says process isolation creates daemons that persist across builds HOT 1
- Build scans command content is wrong HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradle.