i-net-software / JWebAssembly-Gradle

Gradle plugin for JWebAssembly, a Java to WebAssembly compiler
Apache License 2.0
10 stars 3 forks source link

Cant use gradle plugin with java 1.8_352 #3

Open john5634 opened 1 year ago

john5634 commented 1 year ago

Hello!

Having some trouble here, hoping for some help. Thank you in advance!

I get this error: java.lang.UnsupportedClassVersionError: de/inetsoftware/jwebassembly/gradle/WasmPlugin has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Can get the plugin to work with:

`buildscript { repositories { mavenCentral() } dependencies { classpath 'gradle.plugin.de.inetsoftware:jwebassembly-gradle:+' } }

plugins { id 'java' }

group = 'org.example' version = '1.0-SNAPSHOT'

apply plugin: 'de.inetsoftware.jwebassembly'

// declare your Java sources like you do it for your other Java projects sourceSets { main { java { srcDir 'src' } } }

wasm { format = 'Text' // possible values are 'Text' and 'Binary'. 'Binary' is the default value. compilerVersion = 0.3 // specify a compiler version, default is '+' classpath = sourceSet.compileClasspath }`

Horcrux7 commented 1 year ago

Its is recommended to use the snapshot version of the compiler: https://github.com/i-net-software/JWebAssembly/wiki/Build-with-Gradle