Error importing from maven
Closed this issue · 5 comments
To reproduce:
- Add
implementation 'io.gitlab.rxp90:jsymspell:1.0'
to grade and "build".
Result:
error: cannot access Bigram
import io.gitlab.rxp90.jsymspell.api.Bigram;
^
bad class file: /Users/home/.gradle/caches/modules-2/files-2.1/io.gitlab.rxp90/jsymspell/1.0/8367b65ce9301a734bb6368a7d7149299ccb964d/jsymspell-1.0.jar(io/gitlab/rxp90/jsymspell/api/Bigram.class)
class file has wrong version 55.0, should be 52.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
This error is because the library has been compiled to Java 11. Try bumping your Java version to 11.
Would you accept a pull request to set this to be Java 8 compatible? It's advertised in your tagline: "JSymSpell is a zero-dependency Java 8+ port of SymSpell", and I ended up here after a google search. It'd be a handful of small changes. Here's the Java 11 features you use:
- List.of
- Map.of
- Set.of
- String.stripTailing
- Objects.requireNonNullElseGet
And those were pretty easy for me to replace locally.
If not, I'll go ahead and submit a pull request to update the java compatibility in the tagline / readme / maven information.
You're absolutely right. Feel free to submit a PR with the changes to migrate to Java 8
Fixed