-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split into modules and generate v2 protocol documentation
- Loading branch information
1 parent
8570315
commit 6709635
Showing
435 changed files
with
11,220 additions
and
685 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,138 +1,8 @@ | ||
buildscript { | ||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
jcenter() | ||
maven { url "https://plugins.gradle.org/m2/" } | ||
maven { url 'http://repo.spring.io/plugins-release' } | ||
} | ||
dependencies { | ||
classpath("org.springframework.build.gradle:propdeps-plugin:${propdepsVersion}") | ||
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}" | ||
classpath("org.kt3k.gradle.plugin:coveralls-gradle-plugin:${coverallsGradlePluginVersion}") | ||
} | ||
} | ||
|
||
plugins { | ||
id 'net.ltgt.apt' version '0.9' | ||
} | ||
|
||
apply plugin: 'java' | ||
apply plugin: 'org.springframework.boot' | ||
apply plugin: 'io.spring.dependency-management' | ||
apply plugin: 'propdeps' | ||
|
||
|
||
group = 'faforever' | ||
version = '1.3.0' | ||
|
||
sourceCompatibility = 1.9 | ||
targetCompatibility = 1.9 | ||
|
||
repositories { | ||
mavenCentral() | ||
jcenter() | ||
maven { url 'https://jitpack.io' } | ||
maven { url "http://dl.bintray.com/typesafe/maven-releases" } | ||
// TODO remove when spring-boot-admin-client 2.0.0 has been released | ||
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } | ||
} | ||
|
||
configurations { | ||
compile.exclude module: "spring-boot-starter-tomcat" | ||
compile.exclude module: "assertj-core" | ||
} | ||
|
||
task wrapper(type: Wrapper) { | ||
gradleVersion = '4.6' | ||
} | ||
|
||
compileJava.dependsOn(processResources) | ||
processResources { | ||
filesMatching('**/application.yml') { | ||
filter { | ||
it.replace('#faf-server.version#', project.version.toString()) | ||
} | ||
} | ||
} | ||
|
||
// JACOCO & COVERALLS | ||
|
||
apply plugin: 'jacoco' | ||
apply plugin: 'com.github.kt3k.coveralls' | ||
jacocoTestReport { | ||
reports { | ||
xml.enabled = true | ||
} | ||
} | ||
|
||
// CODACY | ||
|
||
configurations { | ||
codacy | ||
} | ||
|
||
// TODO Codacy coverage reporter does not yet support Java 9. See https://github.com/codacy/codacy-coverage-reporter/issues/76 | ||
task sendCoverageToCodacy(type: JavaExec, dependsOn: jacocoTestReport) { | ||
main = "com.codacy.CodacyCoverageReporter" | ||
classpath = configurations.codacy | ||
args = ["-l", "Java", "-r", "${buildDir}/reports/jacoco/test/jacocoTestReport.xml"] | ||
} | ||
|
||
dependencies { | ||
compile("org.springframework.boot:spring-boot-starter-actuator") | ||
compile("org.springframework.boot:spring-boot-starter-data-jpa") | ||
compile("org.springframework.boot:spring-boot-starter-cache") | ||
compile("org.springframework.boot:spring-boot-starter-integration") | ||
compile("org.springframework.boot:spring-boot-starter-websocket") | ||
compile("org.springframework.boot:spring-boot-starter-security") | ||
compile("org.springframework.boot:spring-boot-starter-undertow") | ||
compile("org.springframework.security:spring-security-messaging") | ||
compile("org.springframework.security:spring-security-jwt:${springSecurityJwtVersion}") | ||
compile("org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure:${springSecurityOauth2AutoconfigureVersion}") | ||
compile("org.springframework:spring-context-support") | ||
compile("org.springframework.integration:spring-integration-ip") | ||
compile("org.springframework.integration:spring-integration-security") | ||
compile("org.springframework.integration:spring-integration-websocket") | ||
compile("org.springframework.integration:spring-integration-event") | ||
compile("com.github.ben-manes.caffeine:caffeine") | ||
compile("org.jolokia:jolokia-core") | ||
compile("de.codecentric:spring-boot-admin-starter-client:${springBootAdminClientVersion}") | ||
compile("io.micrometer:micrometer-registry-prometheus:${micrometerRegistryPrometheusVersion}") | ||
compile("com.github.micheljung:JSkills:${jSkillsVersion}") | ||
compile("com.github.nocatch:nocatch:${noCatchVersion}") | ||
compile("org.jetbrains:annotations:${jetbrainsAnnotationsVersion}") | ||
compile("com.google.guava:guava:${guavaVersion}") | ||
compile("javax.annotation:javax.annotation-api:${javaxAnnotationApiVersion}") | ||
compile("javax.inject:javax.inject:${javaxInjectVersion}") | ||
// When switching from Java 8 to 9, I got "class file for javax.interceptor.interceptorbinding not found". Adding this fixed it, but IDK what caused it. | ||
compile("javax.interceptor:javax.interceptor-api:${javaxInterceptorApiVersion}") | ||
compile("com.github.jasminb:jsonapi-converter:${jsonApiConverterVersion}") | ||
compile("com.twilio.sdk:twilio:${twilioVersion}") | ||
compile("org.mapstruct:mapstruct-jdk8:${mapstructVersion}") | ||
compile("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${jacksonDatatypeJsr310Version}") | ||
compile("javax.xml.bind:jaxb-api:${jaxbVersion}") | ||
compile("com.sun.xml.bind:jaxb-ri:${jaxbVersion}") | ||
compile("com.sun.xml.bind:jaxb-impl:${jaxbVersion}") | ||
compile("com.sun.xml.bind:jaxb-core:${jaxbVersion}") | ||
compile("javax.activation:activation:${javaxActivationVersion}") | ||
|
||
compile("com.maxmind.geoip2:geoip2:${geoip2Version}") { | ||
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind' | ||
} | ||
|
||
runtime("mysql:mysql-connector-java:${mysqlConnectorVersion}") | ||
|
||
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}") | ||
|
||
testCompile("org.springframework.boot:spring-boot-starter-test") | ||
testCompile("com.googlecode.zohhak:zohhak:${zohhakVersion}") | ||
|
||
codacy("com.github.codacy:codacy-coverage-reporter:-SNAPSHOT") | ||
subprojects { | ||
apply plugin: 'java' | ||
group = 'com.faforever.server' | ||
version = '1.3' | ||
|
||
apt("org.mapstruct:mapstruct-processor:${mapstructVersion}") | ||
apt("org.projectlombok:lombok:${lombokVersion}") | ||
sourceCompatibility = 1.9 | ||
targetCompatibility = 1.9 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
group 'faforever' | ||
version '1.3.0' | ||
|
||
apply plugin: 'java' | ||
|
||
sourceCompatibility = 1.8 | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
testCompile group: 'junit', name: 'junit', version: '4.12' | ||
} |
19 changes: 19 additions & 0 deletions
19
...rver-annotations/src/main/java/com/faforever/server/annotations/V2ClientNotification.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.faforever.server.annotations; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* Annotation for classes that represent client notification messages. A client notification never expects a server | ||
* response. | ||
*/ | ||
@Retention(RetentionPolicy.SOURCE) | ||
@Target(ElementType.TYPE) | ||
public @interface V2ClientNotification { | ||
|
||
String title() default ""; | ||
|
||
String description() default ""; | ||
} |
17 changes: 17 additions & 0 deletions
17
...va-server-annotations/src/main/java/com/faforever/server/annotations/V2ClientRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.faforever.server.annotations; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** Annotation for classes that represent client request messages. A client request always expects a server response. */ | ||
@Retention(RetentionPolicy.SOURCE) | ||
@Target(ElementType.TYPE) | ||
public @interface V2ClientRequest { | ||
Class<?> successResponse(); | ||
|
||
String title() default ""; | ||
|
||
String description() default ""; | ||
} |
21 changes: 21 additions & 0 deletions
21
...a-server-annotations/src/main/java/com/faforever/server/annotations/V2ServerResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.faforever.server.annotations; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* Annotation for classes that represent server respond messages. Server responses are messages sent by the server to | ||
* the client in response to a client request. | ||
*/ | ||
@Retention(RetentionPolicy.SOURCE) | ||
@Target(ElementType.TYPE) | ||
public @interface V2ServerResponse { | ||
String title() default ""; | ||
|
||
/** | ||
* The description to be rendered in the documentation. If not specified, the message's JavaDoc will be used. | ||
*/ | ||
String description() default ""; | ||
} |
19 changes: 19 additions & 0 deletions
19
...ava-server-annotations/src/main/java/com/faforever/server/annotations/ValidV2Message.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.faforever.server.annotations; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Inherited; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* Requires subclasses to be annotated with either of {@link V2ClientNotification}, {@link V2ClientRequest}, {@link | ||
* V2ServerResponse} and contain a constant {@code TYPE_NAME} that will be used as type identifier in the message's JSON | ||
* representation. | ||
*/ | ||
@Inherited | ||
@Retention(RetentionPolicy.SOURCE) | ||
@Target(ElementType.TYPE) | ||
public @interface ValidV2Message { | ||
|
||
} |
File renamed without changes.
Oops, something went wrong.