chore: downgrade compile target to Java 11
Uses <release>11</release> in maven-compiler-plugin (recommended over source/target to guarantee bytecode and API surface match Java 11). Code changes to drop Java 12-16 features: - records (TeamRanking, PlayerRanking, internal tuples in SqliteTeamRepository) become hand-written immutable classes; same accessor names (rank()/team()/score()/...) so call sites are unchanged. - instanceof X x pattern matching becomes classic instanceof + cast in CommandContext.requirePlayer and Database.normalize. - switch expressions with -> arrows become classic switch + break, or if/else chains, in BaseCommand.handleResult, ArgumentTypes.BOOLEAN and TeamScoreSubCommand.execute. docs/setup.md, features.md and decisions.md updated to reflect Java 11. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -13,8 +13,13 @@
|
||||
<description>Reusable core library for CR Minecraft game plugins (teams, players, scores, commands, events, SQLite persistence).</description>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>16</maven.compiler.source>
|
||||
<maven.compiler.target>16</maven.compiler.target>
|
||||
<!--
|
||||
On utilise <release> plutôt que <source>+<target> pour garantir
|
||||
que les références à des API ne sont pas accidentellement plus
|
||||
récentes que Java 11 (ex. List.copyOf en Java 10+ : OK ;
|
||||
Stream.toList en Java 16+ : refusé par javac).
|
||||
-->
|
||||
<maven.compiler.release>11</maven.compiler.release>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<sqlite.version>3.45.3.0</sqlite.version>
|
||||
</properties>
|
||||
@@ -83,8 +88,7 @@
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.11.0</version>
|
||||
<configuration>
|
||||
<source>${maven.compiler.source}</source>
|
||||
<target>${maven.compiler.target}</target>
|
||||
<release>${maven.compiler.release}</release>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
@@ -121,7 +125,7 @@
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.6.3</version>
|
||||
<configuration>
|
||||
<source>${maven.compiler.source}</source>
|
||||
<source>${maven.compiler.release}</source>
|
||||
<doclint>none</doclint>
|
||||
<quiet>true</quiet>
|
||||
<encoding>UTF-8</encoding>
|
||||
|
||||
Reference in New Issue
Block a user