Skip to content

Commit

Permalink
Update to Java 10
Browse files Browse the repository at this point in the history
  • Loading branch information
micheljung committed Jul 6, 2018
1 parent e69352e commit 24e4be6
Show file tree
Hide file tree
Showing 15 changed files with 45 additions and 32 deletions.
12 changes: 6 additions & 6 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: java

jdk:
- oraclejdk9
- oraclejdk10

services:
- docker
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ subprojects {
group = 'com.faforever.server'
version = '1.3'

sourceCompatibility = 1.9
targetCompatibility = 1.9
sourceCompatibility = 1.10
targetCompatibility = 1.10
}
10 changes: 9 additions & 1 deletion faf-java-server-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,15 @@ processResources {

apply plugin: 'jacoco'
apply plugin: 'com.github.kt3k.coveralls'

jacoco {
toolVersion = '0.8.1'
}

jacocoTestReport {
reports {
xml.enabled = true

}
}

Expand Down Expand Up @@ -119,11 +125,13 @@ dependencies {

optional("org.springframework.boot:spring-boot-devtools")
optional("org.springframework.boot:spring-boot-configuration-processor")
optional("org.projectlombok:lombok:${lombokVersion}")
optional("org.mapstruct:mapstruct-processor:${mapstructVersion}")
optional("com.github.javaparser:javaparser-core:3.6.3")
optional("com.github.javaparser:javaparser-symbol-solver-core:3.6.0")

compileOnly("org.projectlombok:lombok:${lombokVersion}")
annotationProcessor("org.projectlombok:lombok:${lombokVersion}")

testCompile("org.springframework.boot:spring-boot-starter-test")
testCompile("com.googlecode.zohhak:zohhak:${zohhakVersion}")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
@Entity
@Table(name = "game_player_stats")
@Immutable
@Data
@NoArgsConstructor
@Data
@EqualsAndHashCode(of = "id")
@Cacheable
public class GamePlayerStats {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "global_rating")
@NoArgsConstructor
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@ToString(callSuper = true)
public class GlobalRating extends Rating {
public GlobalRating(Player player, double mean, double deviation) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class GameResponse implements ServerMessage {
public static class Player {
private final int id;
/** @deprecated used by the legacy protocol, will be removed in future. */
@Deprecated
private final String name;
private final int team;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ class CreateMatchClientMessage extends V2ClientMessage {
@NotNull
private String featuredMod;

/** Specifies in which lobby mode the game has to be started in. */
@NotNull
private LobbyMode lobbyMode;

/** The players who will participate in this match. */
@NotNull
private List<Participant> participants;
Expand Down Expand Up @@ -66,4 +70,14 @@ public static class Participant {
/** ID of the slot on the map the player will start in. */
int startSpot;
}

/** See values for description. */
public enum LobbyMode {

/** Default lobby where players can select their faction, teams and so on. */
DEFAULT,

/** The lobby is skipped; the game starts straight away, */
NONE
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,8 @@ public class CreateMatchRequest implements ClientMessage {
private List<Participant> participants;
private LobbyMode lobbyMode;

/**
* See values for description.
*/
public enum LobbyMode {

/**
* Default lobby where players can select their faction, teams and so on.
*/
DEFAULT,

/**
* The lobby is skipped; the game starts straight away,
*/
NONE
DEFAULT, NONE
}

@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import lombok.EqualsAndHashCode;
import org.springframework.context.ApplicationEvent;

@Data
@Data()
@EqualsAndHashCode(callSuper = true)
public class PlayerOfflineEvent extends ApplicationEvent {
private final Player player;
Expand Down
4 changes: 2 additions & 2 deletions faf-java-server-apt/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ dependencies {

implementation project(":faf-java-server-annotations")

annotationProcessor("org.projectlombok:lombok:1.16.20")
compileOnly("org.projectlombok:lombok:1.16.20")
annotationProcessor("org.projectlombok:lombok:${lombokVersion}")
compileOnly("org.projectlombok:lombok:${lombokVersion}")

annotationProcessor("com.google.auto.service:auto-service:1.0-rc4")
compileOnly("com.google.auto.service:auto-service:1.0-rc4")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

@SupportedAnnotationTypes("com.faforever.server.annotations.*")
@AutoService(Processor.class)
@SupportedSourceVersion(SourceVersion.RELEASE_9)
@SupportedSourceVersion(SourceVersion.RELEASE_10)
public class V2ProtocolDocGenerator extends AbstractProcessor {

private static final Pattern CODE_PATTERN = Pattern.compile("\\{@code (.*?)}", Pattern.DOTALL);
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ javaxInterceptorApiVersion=1.2
guavaVersion=24.1-jre
jetbrainsAnnotationsVersion=16.0.1
mysqlConnectorVersion=8.0.9-rc
lombokVersion=1.16.20
lombokVersion=1.18.0
geoip2Version=2.8.0
noCatchVersion=1.1
jSkillsVersion=24ddb058a6
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Given the number of required configuration values, it's easiest to run the serve

This project uses:

* Java 8 as the programming language
* Java 10 as the programming language
* [Spring Boot](https://projects.spring.io/spring-boot/) as a base framework
* [Spring Integration](https://projects.spring.io/spring-integration/) as a messaging framework
* [Gradle](https://gradle.org/) as a build automation tool
Expand Down

0 comments on commit 24e4be6

Please sign in to comment.