danger/homebrew-tap

Danger Kotlin does not install

arthurabreu opened this issue ยท 14 comments

When it gets to this part below, I'm always receiving a crash in the installation. Can some help?

`make install PREFIX=/usr/local/Cellar/danger-kotlin/0.7.1
./gradlew shadowJar -p danger-kotlin-library
Picked up _JAVA_OPTIONS: -Duser.home=/Users/arthurabreu/Library/Caches/Homebrew/java_cache

FAILURE: Build failed with an exception.

Where:
Settings file '/private/tmp/danger-kotlin-20210823-12389-iwjeau/kotlin-0.7.1/settings.gradle'

What went wrong:
Could not compile settings file '/private/tmp/danger-kotlin-20210823-12389-iwjeau/kotlin-0.7.1/settings.gradle'.

startup failed:
General error during semantic analysis: Unsupported class file major version 60
java.lang.IllegalArgumentException: Unsupported class file major version 60
at groovyjarjarasm.asm.ClassReader.(ClassReader.java:196)
at groovyjarjarasm.asm.ClassReader.(ClassReader.java:177)
at groovyjarjarasm.asm.ClassReader.(ClassReader.java:163)
at groovyjarjarasm.asm.ClassReader.(ClassReader.java:284)
at org.codehaus.groovy.ast.decompiled.AsmDecompiler.parseClass(AsmDecompiler.java:81)
at org.codehaus.groovy.control.ClassNodeResolver.findDecompiled(ClassNodeResolver.java:251)
at org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:189)
at org.codehaus.groovy.control.ClassNodeResolver.findClassNode(ClassNodeResolver.java:169)
at org.codehaus.groovy.control.ClassNodeResolver.resolveName(ClassNodeResolver.java:125)
at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveClassNullable(AsmReferenceResolver.java:57)
at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveClass(AsmReferenceResolver.java:44)
at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveNonArrayType(AsmReferenceResolver.java:79)
at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveType(AsmReferenceResolver.java:70)
at org.codehaus.groovy.ast.decompiled.MemberSignatureParser.createMethodNode(MemberSignatureParser.java:57)
at org.codehaus.groovy.ast.decompiled.DecompiledClassNode$2.get(DecompiledClassNode.java:234)
at org.codehaus.groovy.ast.decompiled.DecompiledClassNode$2.get(DecompiledClassNode.java:231)
at org.codehaus.groovy.ast.decompiled.DecompiledClassNode.createMethodNode(DecompiledClassNode.java:242)
at org.codehaus.groovy.ast.decompiled.DecompiledClassNode.lazyInitMembers(DecompiledClassNode.java:199)
at org.codehaus.groovy.ast.decompiled.DecompiledClassNode.getDeclaredMethods(DecompiledClassNode.java:122)
at org.codehaus.groovy.ast.ClassNode.getMethods(ClassNode.java:912)`

java -version
java version "16.0.2" 2021-07-20
Java(TM) SE Runtime Environment (build 16.0.2+7-67)
Java HotSpot(TM) 64-Bit Server VM (build 16.0.2+7-67, mixed mode, sharing)

I have danger js and swift installed, no issues with those.

I'm in the same situation:

  • 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 11s
make: *** [build] Error 1
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/danger/homebrew-tap/issues
These open issues may also help:
Danger Kotlin does not install #9

I also get the same issue while install Danger Kotlin in MacOS.

Same issue here:

==> make install PREFIX=/usr/local/Cellar/danger-kotlin/1.0.0
Last 15 lines from /Users/jamie/Library/Logs/Homebrew/danger-kotlin/01.make:
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
at java.base/java.lang.Thread.run(Thread.java:833)

1 error

bopbi commented

based on the full gradle line, the cause is

* What went wrong:
Could not compile settings file '/private/tmp/danger-kotlin-20220201-13772-1ddysvi/kotlin-1.0.0/settings.gradle'.
> startup failed:
  General error during semantic analysis: Unsupported class file major version 61

  java.lang.IllegalArgumentException: Unsupported class file major version 61
  	at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:196)
  	at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:177)
  	at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:163)
  	at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:284)

it might caused by the openjdk version compatibility

Having the same issue here with mac os version 11.5.2

==> make install PREFIX=/usr/local/Cellar/danger-kotlin/1.0.0
Last 15 lines from /Users/davide.cirillo/Library/Logs/Homebrew/danger-kotlin/01.make:
  	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
  	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
  	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
  	at java.base/java.lang.Thread.run(Thread.java:833)

  1 error

Any way to fix this?

Same issue here, any ideas?

==> Installing danger-kotlin from danger/tap
==> make install PREFIX=/usr/local/Cellar/danger-kotlin/1.0.0
Last 15 lines from /Users/josephshawcroft/Library/Logs/Homebrew/danger-kotlin/01.make:
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
        at java.base/java.lang.Thread.run(Thread.java:833)
  
  1 error

Sup guys, it's been some time since I tried it but what I remember is that I used another Danger version to enable it for my Android project at the time. This Kotlin version ended up never working for me, just like your recent errors.

Hi! We are having the same issue. Had anyone figured how to solve it?

Hola, same issue guys, any news?

Similar annoying issue here (MacOS 12.5):

> brew install danger-kotlin                                             
==> Downloading https://github.com/danger/kotlin/archive/1.0.0.tar.gz
Already downloaded: /Users/me/Library/Caches/Homebrew/downloads/2da0064f0499e91686bdf704226a8ac9adfef081a7684645ca36c4203079ec1f--kotlin-1.0.0.tar.gz
==> Installing danger-kotlin from danger/tap
==> make install PREFIX=/opt/homebrew/Cellar/danger-kotlin/1.0.0
Last 15 lines from /Users/me/Library/Logs/Homebrew/danger-kotlin/01.make:
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
        at java.base/java.lang.Thread.run(Thread.java:833)
  
  1 error

More lines from /Users/me/Library/Logs/Homebrew/danger-kotlin/01.make

FAILURE: Build failed with an exception.

* Where:
Settings file '/private/tmp/danger-kotlin-20220725-21220-12ourbm/kotlin-1.0.0/settings.gradle'

* What went wrong:
Could not compile settings file '/private/tmp/danger-kotlin-20220725-21220-12ourbm/kotlin-1.0.0/settings.gradle'.
> startup failed:
  General error during semantic analysis: Unsupported class file major version 62
  
  java.lang.IllegalArgumentException: Unsupported class file major version 62
        at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:196)

Same issue

Same!

The issue is still here.

==> Downloading https://github.com/danger/kotlin/archive/1.0.0.tar.gz
Already downloaded: /Users/me/Library/Caches/Homebrew/downloads/2da0064f0499e91686bdf704226a8ac9adfef081a7684645ca36c4203079ec1f--kotlin-1.0.0.tar.gz
==> Installing danger-kotlin from danger/tap
==> make install PREFIX=/usr/local/Cellar/danger-kotlin/1.0.0
Last 15 lines from /Users/me/Library/Logs/Homebrew/danger-kotlin/01.make:
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
at java.base/java.lang.Thread.run(Thread.java:1589)
1 error

But you can try to install it like described in this comment :
danger/kotlin#225 (comment)

This was working fine for me ๐ŸŽ‰