Open vi opened 2 years ago
Why are you using such old Gradle version?
As you can see in gradle.properties this project uses Gradle 5.2.1 (which is also old, but should work with Gradle 6 and maybe even 7).
Gradle 4 is very old and the upgrade to Gradle 5 broke lots of stuff.
To make sure the project works, don't use gradle
, use ./gradlew
.
Indeed, using gradle wrapper make complication successful:
$ ../../gradlew compileJava
Downloading https://services.gradle.org/distributions/gradle-5.2.1-all.zip
..............................................................................................................................
Welcome to Gradle 5.2.1!
Here are the highlights of this release:
- Define sets of dependencies that work together with Java Platform plugin
- New C++ plugins with dependency management built-in
- New C++ project types for gradle init
- Service injection into plugins and project extensions
For more details see https://docs.gradle.org/5.2.1/release-notes.html
Starting a Gradle Daemon (subsequent builds will be faster)
> Task :hello-world:compileWasm
Compiling wasm file /mnt/bkel/vi/src/wasm-on-jvm/examples/hello-world/src/main/wasm/HelloWasm.wast to class HelloWasm
> Task :hello-world:compileJava
warning: unknown enum constant WasmExternalKind.FUNCTION
reason: class file for asmble.annotation.WasmExternalKind not found
1 warning
BUILD SUCCESSFUL in 40s
2 actionable tasks: 2 executed
$ java -cp build/classes/java/main:build/classes/wasm/main Hello
WASM says 42
Maybe hello-world
's README should mention Gradle version, or ../../gradlew
instead of just gradle
, so that it would be clear that there is specific Gradle version?
4.4.1 is gradle version in current's Debian stable.