danger / kotlin

โš ๏ธ Stop saying "you forgot to โ€ฆ" in code review
MIT License
505 stars 50 forks source link

brew install danger/tap/danger-kotlin error on Apple M1 #207

Open apps4everyone opened 2 years ago

apps4everyone commented 2 years ago

brew install danger/tap/danger-kotlin error on Apple M1:

==> Installing dependencies for danger/tap/danger-kotlin: danger/tap/danger-js, openjdk, kotlin, maven and gradle ==> Installing danger/tap/danger-kotlin dependency: danger/tap/danger-js ๐Ÿบ /opt/homebrew/Cellar/danger-js/11.0.2: 3 files, 115.3MB, built in 2 seconds ==> Installing danger/tap/danger-kotlin dependency: openjdk ==> Pouring openjdk--17.0.2.arm64_monterey.bottle.tar.gz ๐Ÿบ /opt/homebrew/Cellar/openjdk/17.0.2: 640 files, 306.4MB ==> Installing danger/tap/danger-kotlin dependency: kotlin ==> Pouring kotlin--1.6.10.all.bottle.tar.gz ๐Ÿบ /opt/homebrew/Cellar/kotlin/1.6.10: 112 files, 74MB ==> Installing danger/tap/danger-kotlin dependency: maven ==> Pouring maven--3.8.4.arm64_monterey.bottle.tar.gz ๐Ÿบ /opt/homebrew/Cellar/maven/3.8.4: 79 files, 10MB ==> Installing danger/tap/danger-kotlin dependency: gradle ==> Pouring gradle--7.4.all.bottle.tar.gz ๐Ÿบ /opt/homebrew/Cellar/gradle/7.4: 11,253 files, 267.7MB ==> Installing danger/tap/danger-kotlin ==> make install PREFIX=/opt/homebrew/Cellar/danger-kotlin/1.0.0 Last 15 lines from /Users/stefanfessler/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

BUILD FAILED in 5s make: *** [build] Error 1

apps4everyone commented 2 years ago

java --version openjdk 17.0.2 2022-01-18 OpenJDK Runtime Environment Temurin-17.0.2+8 (build 17.0.2+8) OpenJDK 64-Bit Server VM Temurin-17.0.2+8 (build 17.0.2+8, mixed mode)

apps4everyone commented 2 years ago

also with openjdk 11.0.12 2021-07-20 OpenJDK Runtime Environment Homebrew (build 11.0.12+0) OpenJDK 64-Bit Server VM Homebrew (build 11.0.12+0, mixed mode)

k0shk0sh commented 2 years ago

@f-meloni is there any updates on this? i'm having the same issue since I switched to M1 from last year.

f-meloni commented 2 years ago

Does this happen even if you install it via the script?

apps4everyone commented 2 years ago

only tried brew install danger/tap/danger-kotlin. Maybe you can guide me how to try with the script? thx

apps4everyone commented 2 years ago

git clone + ./scripts/install.sh look's like is working

Screenshot 2022-02-18 at 16 07 42
k0shk0sh commented 2 years ago

Does this happen even if you install it via the script?

with the script it actually always fails because of permissions so had to hack it by creating the folders in usr manually.

snowe2010 commented 1 year ago

same issue. looks like the problem is the java version it's trying to use though.

General error during semantic analysis: Unsupported class file major version 63

01.make.txt

spectrumIG commented 9 months ago

I have this same exact issue with homebrew. Apparently, it still tries today to download version 1.0.0 even if the version on Github is 1.2.0 also may I point out that the version of kotlin and gradle inside the installation script are pretty old? Anyway, even with the script i receive error like this `

Task :danger-kotlin:linkDebugExecutableRunner FAILED
e: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors

The /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld command returned non-zero exit code: 1.
output:
-macosx_version_min has been renamed to -macos_version_min
ld: unknown options: -sdk_version 

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':danger-kotlin:linkDebugExecutableRunner'.
 Compilation finished with errors

* 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 12s
4 actionable tasks: 4 executed
make: *** [build] Error 1

` Some suggestions?

mrbass21 commented 1 month ago

@spectrumIG I had the same issue as you.

I've made a pr to resolve this #286

Edit: The maintainers merged other changes to update gradle and kotlin. Compiles on Xcode 16 on Sequoia.