-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5cb1fc2
commit a23ba53
Showing
26 changed files
with
427 additions
and
653 deletions.
There are no files selected for viewing
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
Binary file not shown.
This file was deleted.
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,21 +1,28 @@ | ||
language: java | ||
|
||
jdk: | ||
- openjdk13 | ||
- openjdk14 | ||
|
||
addons: | ||
sonarcloud: | ||
organization: "benjaminkomen-github" | ||
|
||
before_cache: | ||
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock | ||
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/ | ||
|
||
cache: | ||
directories: | ||
- '$HOME/.m2/repository' | ||
- '$HOME/.sonar/cache' | ||
- '$HOME/.gradle/' | ||
- '.gradle' | ||
|
||
# the dependency benjaminkomen/jwiki recides in GitHub Packages, for which you need credentials to download. | ||
# They are set here, with the GITHUB_TOKEN in Travis. | ||
install: | ||
- cp .travis.settings.xml $HOME/.m2/settings.xml | ||
|
||
script: | ||
- ./mvnw clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar | ||
# - ./gradlew clean build sonarqube ## FIXME enable when the java/util/jar/Pack200 bug has been fixed | ||
- ./gradlew clean build |
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,20 +1,19 @@ | ||
FROM maven:3.6.2-jdk-13 as builder | ||
FROM gradle:6.3.0-jdk14 as builder | ||
|
||
# Copy local code to the container image. | ||
WORKDIR /app | ||
COPY pom.xml . | ||
COPY build.gradle . | ||
COPY src ./src | ||
|
||
ARG GITHUB_TOKEN | ||
ENV GITHUB_TOKEN=${GITHUB_TOKEN} | ||
COPY .travis.settings.xml /root/.m2/settings.xml | ||
|
||
# Build a release artifact. | ||
RUN mvn package -DskipTests | ||
RUN gradle build --no-daemon | ||
|
||
FROM adoptopenjdk/openjdk13:jdk-13_33-alpine-slim | ||
FROM adoptopenjdk/openjdk14:jdk-14.0.1_7-alpine-slim | ||
|
||
COPY --from=builder /app/target/TibiaWikiApi.jar /TibiaWikiApi.jar | ||
COPY --from=builder /app/build/libs/app-*.jar /TibiaWikiApi.jar | ||
|
||
# Run the web service on container startup. | ||
CMD ["java","-Djava.security.egd=file:/dev/./urandom","-Dserver.port=${PORT}","-jar","/TibiaWikiApi.jar"] | ||
CMD [ "java","-Djava.security.egd=file:/dev/./urandom","-Dserver.port=${PORT}","--enable-preview","-jar","/TibiaWikiApi.jar"] |
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
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
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,112 @@ | ||
plugins { | ||
id 'org.springframework.boot' version '2.2.6.RELEASE' | ||
id 'java' | ||
id 'idea' | ||
id 'jacoco' | ||
id "org.sonarqube" version "2.8" | ||
} | ||
|
||
group = 'com.tibiawiki' | ||
version = '1.8.1' | ||
description = 'TibiaWikiApi' | ||
sourceCompatibility = '14' | ||
targetCompatibility = '14' | ||
|
||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
|
||
maven { | ||
url = 'https://maven.pkg.github.com/benjaminkomen/jwiki' | ||
credentials { | ||
username = 'benjaminkomen' | ||
password = System.getenv("GITHUB_TOKEN") | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation 'org.springframework.boot:spring-boot-starter:2.2.6.RELEASE' | ||
implementation 'org.springframework.boot:spring-boot-starter-jersey:2.2.6.RELEASE' | ||
implementation 'org.springframework.boot:spring-boot-starter-web:2.2.6.RELEASE' | ||
implementation 'benjaminkomen:jwiki:2.2.0' | ||
implementation 'org.slf4j:slf4j-api:1.7.30' | ||
implementation 'org.slf4j:slf4j-log4j12:1.7.30' | ||
implementation 'org.json:json:20190722' | ||
implementation 'org.jetbrains:annotations:19.0.0' | ||
implementation 'one.util:streamex:0.7.2' | ||
implementation 'javax.xml.bind:jaxb-api:2.3.1' | ||
implementation 'javax.activation:activation:1.1.1' | ||
implementation 'com.google.guava:guava:29.0-jre' | ||
implementation 'io.swagger:swagger-jersey2-jaxrs:1.6.1' | ||
implementation 'io.vavr:vavr:0.10.2' | ||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.2' | ||
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.6.2' | ||
testImplementation 'org.mockito:mockito-core:3.3.3' | ||
testImplementation 'org.hamcrest:hamcrest:2.2' | ||
testImplementation 'org.springframework.boot:spring-boot-starter-test:2.2.6.RELEASE' | ||
annotationProcessor 'org.projectlombok:lombok:1.18.12' | ||
compileOnly 'org.projectlombok:lombok:1.18.12' | ||
} | ||
|
||
sonarqube { | ||
properties { | ||
property "sonar.projectName", "TibiaWikiApi" | ||
property "sonar.projectKey", "com.tibiawiki:TibiaWikiApi" | ||
} | ||
} | ||
|
||
tasks.withType(JavaCompile) { | ||
options.encoding = 'UTF-8' | ||
options.compilerArgs += '--enable-preview' | ||
} | ||
|
||
tasks.withType(Test) { | ||
jvmArgs += "--enable-preview" | ||
useJUnitPlatform() | ||
|
||
testLogging { | ||
events "passed", "skipped", "failed" | ||
} | ||
} | ||
|
||
tasks.withType(JavaExec) { | ||
jvmArgs += '--enable-preview' | ||
} | ||
|
||
jar { | ||
manifest { | ||
attributes 'Main-Class': 'com/tibiawiki/TibiaWikiApiApplication' | ||
} | ||
} | ||
|
||
sourceSets { | ||
integrationTest { | ||
compileClasspath += sourceSets.main.output + configurations.testCompile | ||
runtimeClasspath += output + compileClasspath + configurations.testRuntime | ||
} | ||
} | ||
|
||
configurations { | ||
integrationTestImplementation.extendsFrom implementation | ||
integrationTestImplementation.extendsFrom testImplementation | ||
} | ||
|
||
idea { | ||
module { | ||
testSourceDirs += sourceSets.integrationTest.java.srcDirs | ||
testResourceDirs += sourceSets.integrationTest.resources.srcDirs | ||
scopes.TEST.plus += [configurations.integrationTestCompile] | ||
} | ||
} | ||
|
||
task integrationTest(type: Test) { | ||
description = 'Runs the integration tests.' | ||
group = 'verification' | ||
testClassesDirs = sourceSets.integrationTest.output.classesDirs | ||
classpath = sourceSets.integrationTest.runtimeClasspath | ||
outputs.upToDateWhen { false } | ||
mustRunAfter test | ||
} | ||
|
||
check.dependsOn integrationTest |
Binary file not shown.
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,6 @@ | ||
#Sat May 02 12:23:41 CEST 2020 | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStorePath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME |
Oops, something went wrong.