Cannot build with gradle 7.4.2 on mac m1
aperrot42 opened this issue · comments
Hello, I've tried to build scenic view on a mac m1 with a recent gradle and jdk.
- The build fails
➜ scenic-view ./gradlew clean build jlink
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7
at org.codehaus.groovy.vmplugin.VMPluginFactory.<clinit>(VMPluginFactory.java:43)
at org.codehaus.groovy.reflection.GroovyClassValueFactory.<clinit>(GroovyClassValueFactory.java:35)
at org.codehaus.groovy.reflection.ClassInfo.<clinit>(ClassInfo.java:109)
at org.codehaus.groovy.reflection.ReflectionCache.getCachedClass(ReflectionCache.java:95)
at org.codehaus.groovy.reflection.ReflectionCache.<clinit>(ReflectionCache.java:39)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.registerMethods(MetaClassRegistryImpl.java:209)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:107)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:85)
at groovy.lang.GroovySystem.<clinit>(GroovySystem.java:36)
at org.codehaus.groovy.runtime.InvokerHelper.<clinit>(InvokerHelper.java:86)
at groovy.lang.GroovyObjectSupport.getDefaultMetaClass(GroovyObjectSupport.java:59)
[...]
FAILURE: Build failed with an exception.
* What went wrong:
Could not create an instance of type org.gradle.initialization.DefaultSettings_Decorated.
> Could not initialize class org.codehaus.groovy.reflection.ReflectionCache
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
did recreate the wrapper with my system's gradle : gradle wrapper
. I was able to compile but
- jlink packaging task fails :
➜ scenic-view ✗ ./gradlew jlink
> Configure project :
Found module name 'org.scenicview.scenicview'
> Task :prepareMergedJarsDir FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Some problems were found with the configuration of task ':prepareMergedJarsDir' (type 'PrepareMergedJarsDirTask').
- In plugin 'org.beryx.jlink' type 'org.beryx.jlink.PrepareMergedJarsDirTask' property 'javaHome' of mutable type 'org.gradle.api.provider.Property' is writable.
Reason: Properties of type 'org.gradle.api.provider.Property' are already mutable.
Possible solution: Remove the 'setJavaHome' method.
Please refer to https://docs.gradle.org/7.4.2/userguide/validation_problems.html#mutable_type_with_setter for more details about this problem.
- In plugin 'org.beryx.jlink' type 'org.beryx.jlink.PrepareMergedJarsDirTask' property 'jvmVersion' of mutable type 'org.gradle.api.provider.Property' is writable.
Reason: Properties of type 'org.gradle.api.provider.Property' are already mutable.
Possible solution: Remove the 'setJvmVersion' method.
Please refer to https://docs.gradle.org/7.4.2/userguide/validation_problems.html#mutable_type_with_setter for more details about this problem.
- In plugin 'org.beryx.jlink' type 'org.beryx.jlink.PrepareMergedJarsDirTask' property 'mergedJarsDir' of mutable type 'org.gradle.api.file.DirectoryProperty' is writable.
Reason: Properties of type 'org.gradle.api.file.DirectoryProperty' are already mutable.
Possible solution: Remove the 'setMergedJarsDir' method.
Please refer to https://docs.gradle.org/7.4.2/userguide/validation_problems.html#mutable_type_with_setter for more details about this problem.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.4.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 382ms
4 actionable tasks: 1 executed, 3 up-to-date
Additional information :
- gradle version :
➜ ~ gradle -version
------------------------------------------------------------
Gradle 7.4.2
------------------------------------------------------------
Build time: 2022-03-31 15:25:29 UTC
Revision: 540473b8118064efcc264694cbcaa4b677f61041
Kotlin: 1.5.31
Groovy: 3.0.9
Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM: 18.0.1 (Homebrew 18.0.1+0)
OS: Mac OS X 12.2.1 aarch64
- default jdk :
➜ ~ /usr/libexec/java_home -V
Matching Java Virtual Machines (1):
18.0.1 (arm64) "Homebrew" - "OpenJDK 18.0.1" /opt/homebrew/Cellar/openjdk/18.0.1/libexec/openjdk.jdk/Contents/Home
/opt/homebrew/Cellar/openjdk/18.0.1/libexec/openjdk.jdk/Contents/Home
I provided a fix there but I am not sure that the project is still accepting pull requests ?
https://github.com/aperrot42/scenic-view
Hi @aperrot42 ,
We haven't been very active lately, but we are accepting PRs :)
@abhinayagarwal Then at least merge my PR. It's been 9 months since I created my PR. Either you mark the repo as archived, be more active, or look for a new maintainer. I am an open-source dev myself despite having a full-time job. I know the struggles, but I also need to know if it's worth spending my time on this repos
#76