Skip to content

Commit

Permalink
Split into modules and generate v2 protocol documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
micheljung committed Jun 7, 2018
1 parent 8570315 commit 6709635
Show file tree
Hide file tree
Showing 435 changed files with 11,220 additions and 685 deletions.
6 changes: 6 additions & 0 deletions .idea/compiler.xml

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

3 changes: 2 additions & 1 deletion .idea/encodings.xml

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

13 changes: 10 additions & 3 deletions .idea/modules.xml

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

4 changes: 2 additions & 2 deletions .idea/runConfigurations/FafServerApplication.xml

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

142 changes: 6 additions & 136 deletions build.gradle
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
}
14 changes: 14 additions & 0 deletions faf-java-server-annotations/build.gradle
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'
}
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 "";
}
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 "";
}
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 "";
}
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.
Loading

0 comments on commit 6709635

Please sign in to comment.