Commit bd707076 authored by Florian Schäfer's avatar Florian Schäfer

Use docker images from gitlab.com/JOSM/docker-library and build on Java 10

parent f30bdf5c
Pipeline #27084794 passed with stages
in 9 minutes and 24 seconds
image: registry.gitlab.com/josm/wikipedia/java8:latest
image: registry.gitlab.com/josm/docker-library/openjdk-8-josmplugin:latest
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
......@@ -19,7 +19,16 @@ assemble:
- ./gradlew assemble
artifacts:
paths:
- build
- build/
assemble with java 10:
stage: build
image: registry.gitlab.com/josm/docker-library/openjdk-10-josmplugin:latest
script:
- ./gradlew assemble --stacktrace
artifacts:
paths:
- build/
##############
......@@ -33,16 +42,30 @@ build:
artifacts:
paths:
- build
dependencies:
- assemble
compile against min JOSM:
stage: test
script:
- ./gradlew compileJava_minJosm
dependencies:
- assemble
compile against latest JOSM:
stage: test
script:
- ./gradlew compileJava_latestJosm
dependencies:
- assemble
build with java 10:
stage: test
image: registry.gitlab.com/josm/docker-library/openjdk-10-josmplugin:latest
script:
- ./gradlew build
dependencies:
- assemble with java 10
################
......
......@@ -6,5 +6,5 @@ file_filter = src/main/po/<lang>.po
source_file = build/i18n/josm-plugin_wikipedia.pot
source_lang = en
type = PO
minimum_perc=50
minimum_perc=40
lang_map = ca@valencia: ca-valencia
......@@ -5,6 +5,18 @@ import java.time.Instant
import org.openstreetmap.josm.gradle.plugin.task.GeneratePluginList
import com.github.spotbugs.SpotBugsTask
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "net.ltgt.gradle:gradle-errorprone-javacplugin-plugin:0.3"
classpath "net.ltgt.gradle:gradle-errorprone-plugin:0.0.16"
}
}
plugins {
id "java"
id "eclipse"
......@@ -12,9 +24,30 @@ plugins {
id "pmd"
id "com.github.ben-manes.versions" version "0.20.0"
id "com.github.spotbugs" version "1.6.2"
id "net.ltgt.errorprone" version "0.0.16"
id "org.openstreetmap.josm" version "0.5.0"
}
if (JavaVersion.current().java9Compatible) {
apply plugin: "net.ltgt.errorprone-javacplugin"
} else {
apply plugin: "net.ltgt.errorprone"
tasks.withType(JavaCompile) {
options.compilerArgs += [
"-Xep:DefaultCharset:ERROR",
"-Xep:StringEquality:ERROR",
"-Xep:ConstantField:WARN",
"-Xep:FieldCanBeFinal:WARN",
"-Xep:LambdaFunctionalInterface:WARN",
"-Xep:MethodCanBeStatic:WARN",
"-Xep:MultiVariableDeclaration:WARN",
"-Xep:PrivateConstructorForUtilityClass:WARN",
"-Xep:RemoveUnusedImports:WARN",
"-Xep:UngroupedOverloads:WARN",
"-Xep:WildcardImport:WARN"
]
}
}
def versions = [
errorprone: "2.3.1",
jacoco: "0.8.1",
......@@ -75,20 +108,8 @@ josm {
}
}
// Set up ErrorProne
tasks.withType(JavaCompile) {
options.compilerArgs += [
"-Xep:DefaultCharset:ERROR",
"-Xep:StringEquality:ERROR",
"-Xep:ConstantField:WARN",
"-Xep:FieldCanBeFinal:WARN",
"-Xep:LambdaFunctionalInterface:WARN",
"-Xep:MethodCanBeStatic:WARN",
"-Xep:MultiVariableDeclaration:WARN",
"-Xep:PrivateConstructorForUtilityClass:WARN",
"-Xep:RemoveUnusedImports:WARN",
"-Xep:UngroupedOverloads:WARN",
"-Xep:WildcardImport:WARN",
"-Xlint:all",
"-Xlint:-serial",
]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment