Skip to content

Commit

Permalink
Update README url and explicitly disable JDK17+
Browse files Browse the repository at this point in the history
  • Loading branch information
martinpaljak committed Apr 3, 2023
1 parent 9e06bde commit e684b00
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 8, 11, 17, 20 ]
java: [ 8, 11, 17 ]
name: Java ${{ matrix.java }}
steps:
- name: Checkout with submodules
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Supports **all available JavaCard SDK versions**: 2.1.2, 2.2.1, 2.2.2, 3.0.3, 3.0.4, 3.0.5 and 3.1.0
* Get one from [oracle.com](https://www.oracle.com/java/technologies/javacard-sdk-downloads.html) or use the [handy Github repository](https://github.com/martinpaljak/oracle_javacard_sdks)
* **Works on all platforms** with LTS Java 1.8+: Windows, OSX, Linux.
* [Usable SDK-s depend on JDK version](https://github.com/martinpaljak/ant-javacard/wiki/JavaCard-SDK-and-JDK-version-compatibility); 1.8 recommended!
* **[Usable SDK-s depend on JDK version](https://github.com/martinpaljak/ant-javacard/wiki/JavaCard-SDK-and-JDK-version-compatibility)**; 1.8 recommended!
* Almost **everything integrates** or works with Ant.
* Trigger it [from Maven](https://github.com/martinpaljak/ant-javacard/wiki/How-to-use-from-Maven) or via [Gradle wrapper](https://github.com/bertrandmartel/javacard-gradle-plugin)
* Can be easily integrated into **continuous integration** workflows.
Expand Down
12 changes: 7 additions & 5 deletions src/main/java/pro/javacard/ant/JavaCard.java
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@ public void setAID(String msg) {
}
}

@SuppressWarnings("serial")
public static class HelpingBuildException extends BuildException {
private final static long serialVersionUID = -2365126253968479314L;
public HelpingBuildException(String msg) {
super(msg + "\n\nPLEASE READ https://github.com/martinpaljak/ant-javacard#syntax");
super(msg + "\n\nPLEASE READ https://github.com/martinpaljak/ant-javacard#readme");
}
}

Expand Down Expand Up @@ -557,10 +557,12 @@ private void compile() {
// Warn in human readable way if Java not compatible with JC Kit
// See https://github.com/martinpaljak/ant-javacard/issues/79
int jdkver = getCurrentJDKVersion();
if (jckit.getVersion().isOneOf(V211, V212, V221, V222) && jdkver > 8) {
throw new BuildException("Use JDK 8 with JavaCard kit v2.x");
if (jdkver > 17) {
throw new HelpingBuildException("JDK 17 LTS is the latest supported JDK.");
} else if (jckit.getVersion().isOneOf(V211, V212, V221, V222) && jdkver > 8) {
throw new HelpingBuildException("Use JDK 8 with JavaCard kit v2.x");
} else if (jdkver > 11 && !jckit.getVersion().isOneOf(V310)) {
throw new BuildException("Use JDK 11 with JavaCard kit " + jckit.getVersion());
throw new HelpingBuildException("Use JDK 11 with JavaCard kit " + jckit.getVersion());
}

j.setTarget(javaVersion);
Expand Down
1 change: 0 additions & 1 deletion tests-20.xml

This file was deleted.

0 comments on commit e684b00

Please # to comment.