Ticket #19998: 19998.streetside_build.7.patch

File 19998.streetside_build.7.patch, 14.5 KB (added by taylor.smock, 4 years ago)

Patch update

  • build.gradle

     
     1import com.github.spotbugs.snom.SpotBugsTask
     2import net.ltgt.gradle.errorprone.CheckSeverity
     3
    14plugins {
    2   id "org.sonarqube" version "2.6.2"
    3   id "org.kordamp.markdown.convert" version "1.1.0"
    4   id 'org.openstreetmap.josm' version "0.4.4"
    5   id "com.github.ben-manes.versions" version "0.17.0"
    6   id 'com.github.spotbugs' version '1.6.1'
    7   id "net.ltgt.errorprone" version "0.0.14"
    8 
     5  id 'java'
    96  id 'eclipse'
    107  id 'jacoco'
    11   id 'java'
    128  id 'pmd'
     9  id("com.github.ben-manes.versions").version("0.38.0")
     10  id("net.ltgt.errorprone").version("2.0.1")
     11  id("org.kordamp.markdown.convert").version("1.2.0")
     12  id("org.sonarqube").version("3.1.1")
     13  id('com.github.spotbugs').version('4.7.0')
     14  id('org.openstreetmap.josm').version("0.7.1")
     15  id("com.diffplug.spotless").version("5.12.1")
    1316}
    1417
    1518apply from: 'gradle/tool-config.gradle'
     
    3437  mavenCentral()
    3538}
    3639
     40def versions = [
     41  awaitility: "4.0.3",
     42  jackson: "2.12.3",
     43  jmockit: "1.46",
     44  junit: "5.7.1",
     45  wiremock: "2.27.2"
     46]
     47
    3748dependencies {
    38   compile 'com.fasterxml.jackson.core:jackson-core:2.2.4'
    39   compile 'com.fasterxml.jackson.core:jackson-databind:2.2.4'
    40   compile 'com.fasterxml.jackson.core:jackson-annotations:2.2.4'
    41   compile 'us.monoid.web:resty:0.3.2'
    42   compile 'log4j:log4j:1.2.17'
    43   testImplementation ('org.openstreetmap.josm:josm-unittest'){changing=true}
    44   testImplementation 'com.github.tomakehurst:wiremock:2.17.0'
    45   testImplementation 'junit:junit:4.12'
     49  if (!JavaVersion.current().isJava9Compatible()) {
     50    errorproneJavac("com.google.errorprone:javac:9+181-r4173-1")
     51  }
     52  implementation "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
     53  implementation "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
     54  implementation "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}"
     55  implementation "us.monoid.web:resty:0.3.2"
     56  implementation "log4j:log4j:1.2.17"
     57  testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${versions.junit}")
     58  testImplementation("org.junit.jupiter:junit-jupiter-params:${versions.junit}")
     59  testImplementation("org.junit.jupiter:junit-jupiter-api:${versions.junit}")
     60  testImplementation("org.junit.vintage:junit-vintage-engine:${versions.junit}")
     61  testImplementation ("org.openstreetmap.josm:josm-unittest"){changing=true}
     62  testImplementation "com.github.tomakehurst:wiremock:${versions.wiremock}"
     63  testImplementation("org.jmockit:jmockit:${versions.jmockit}") { because("versions >= 1.47 are incompatible with JOSM, see https://josm.openstreetmap.de/ticket/18200") }
     64  testImplementation("org.awaitility:awaitility:${versions.awaitility}")
    4665}
    4766
    4867sourceSets {
     
    6887  }
    6988}
    7089
    71 josm {
    72   debugPort = 7051
    73   manifest {
    74       //oldVersionDownloadLink 10824, 'v1.5.3', new URL('https://github.com/JOSM/Mapillary/releases/download/v1.5.3/Mapillary.jar')
     90spotless {
     91  enforceCheck = false
     92  format("misc") {
     93    target("**/*.gradle", "**.*.md", "**/.gitignore")
     94
     95    trimTrailingWhitespace()
     96    indentWithSpaces(2)
     97    endWithNewline()
    7598  }
    76   i18n {
    77     pathTransformer = getGithubPathTransformer('spatialdev/MicrosoftStreetside')
     99  java {
     100    trimTrailingWhitespace()
     101    indentWithSpaces(2)
     102    endWithNewline()
     103    removeUnusedImports()
    78104  }
    79105}
    80106
     107josm {
     108  debugPort = 7051
     109}
     110
    81111eclipse {
    82112  project {
    83113    name = 'MicrosoftStreetside'
     
    99129tasks.withType(Javadoc) {
    100130  failOnError false
    101131}
    102 tasks.withType(com.github.spotbugs.SpotBugsTask) {
     132tasks.withType(SpotBugsTask) {
    103133  reports {
    104134    xml.enabled = false
    105135    html.enabled = true
     
    109139import org.gradle.api.tasks.testing.logging.TestLogEvent
    110140
    111141test {
     142  project.afterEvaluate {
     143    jvmArgs("-javaagent:${classpath.find { it.name.contains("jmockit") }.absolutePath}")
     144  }
     145  useJUnitPlatform()
    112146  testLogging {
    113147    exceptionFormat "full"
    114148    events TestLogEvent.FAILED, TestLogEvent.SKIPPED
  • config/pmd/ruleset.xml

     
    66  <description>
    77    This ruleset checks some rules that you should normally follow for the ms-streetside-josm-plugin.
    88  </description>
    9   <rule ref="rulesets/java/basic.xml"/>
    10   <rule ref="rulesets/java/braces.xml">
    11     <exclude name="IfStmtsMustUseBraces"/>
    12   </rule>
    13   <rule ref="rulesets/java/clone.xml"/>
    149
    15   <rule ref="rulesets/java/controversial.xml/UnnecessaryConstructor"/>
    16   <rule ref="rulesets/java/controversial.xml/AssignmentInOperand"/>
    17   <rule ref="rulesets/java/controversial.xml/DontImportSun"/>
    18   <rule ref="rulesets/java/controversial.xml/SuspiciousOctalEscape"/>
    19   <rule ref="rulesets/java/controversial.xml/UnnecessaryParentheses"/>
    20 
    21   <rule ref="rulesets/java/coupling.xml">
     10  <rule ref="category/java/design.xml">
    2211    <exclude name="LoosePackageCoupling" />
    2312    <exclude name="LawOfDemeter" />
    2413  </rule>
    25   <rule ref="rulesets/java/design.xml">
    26     <exclude name="AvoidSynchronizedAtMethodLevel" />
     14  <rule ref="category/java/codestyle.xml">
    2715    <exclude name="ConfusingTernary" />
     16    <exclude name="LocalVariableCouldBeFinal" />
     17    <exclude name="MethodArgumentCouldBeFinal" />
     18    <exclude name="UselessParentheses" />
     19    <exclude name="IfStmtsMustUseBraces"/>
    2820  </rule>
    29   <rule ref="rulesets/java/empty.xml"/>
    30   <rule ref="rulesets/java/finalizers.xml"/>
    31   <rule ref="rulesets/java/imports.xml"/>
    32   <rule ref="rulesets/java/naming.xml">
    33     <exclude name="ShortVariable"/>
    34     <exclude name="LongVariable"/>
    35     <exclude name="AbstractNaming"/>
     21  <rule ref="category/java/multithreading.xml">
     22    <exclude name="AvoidSynchronizedAtMethodLevel" />
    3623  </rule>
    37   <rule ref="rulesets/java/optimizations.xml">
    38     <exclude name="LocalVariableCouldBeFinal" />
    39     <exclude name="MethodArgumentCouldBeFinal" />
     24  <rule ref="category/java/bestpractices.xml"/>
     25  <rule ref="category/java/errorprone.xml"/>
     26  <rule ref="category/java/performance.xml">
    4027    <exclude name="AvoidInstantiatingObjectsInLoops" />
    4128  </rule>
    42   <rule ref="rulesets/java/strictexception.xml"/>
    43   <rule ref="rulesets/java/strings.xml"/>
    44   <rule ref="rulesets/java/sunsecure.xml"/>
    45   <rule ref="rulesets/java/typeresolution.xml"/>
    46   <rule ref="rulesets/java/unnecessary.xml">
    47     <exclude name="UselessParentheses" />
    48   </rule>
    49   <rule ref="rulesets/java/unusedcode.xml"/>
    5029</ruleset>
  • gradle/tool-config.gradle

     
    1 def pmdVersion = "5.8.0" // TODO: Update to PMD 6
    2 def spotbugsVersion = "3.1.3"
    3 def jacocoVersion = "0.8.1"
    4 def errorproneVersion = "2.3.1"
     1def pmdVersion = "6.21.0" // TODO: Update to PMD 6
     2def spotbugsVersion = "4.0.3"
     3def jacocoVersion = "0.8.5"
     4def errorproneVersion = "2.3.4"
    55
    66// Set up ErrorProne (currently only for JDK8, until JDK9 is supported)
    77dependencies.errorprone "com.google.errorprone:error_prone_core:$errorproneVersion"
     8/*
    89tasks.withType(JavaCompile) {
    910options.compilerArgs += ['-Xep:DefaultCharset:ERROR',
    1011  '-Xep:ClassCanBeStatic:ERROR',
     
    1617  '-Xep:LambdaFunctionalInterface:WARN',
    1718  '-Xep:ConstantField:WARN']
    1819}
     20*/
    1921
    2022// Spotbugs config
    2123spotbugs {
     
    2325  ignoreFailures = true
    2426  effort = "max"
    2527  reportLevel = "low"
    26   sourceSets = [sourceSets.main, sourceSets.test]
     28  //sourceSets = [sourceSets.main, sourceSets.test]
    2729}
    2830
    2931// JaCoCo config
  • gradle/wrapper/gradle-wrapper.properties

    Cannot display: file marked as a binary type.
    svn:mime-type = application/octet-stream
     
    11distributionBase=GRADLE_USER_HOME
    22distributionPath=wrapper/dists
    3 distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
     3distributionSha256Sum=eb8b89184261025b0430f5b2233701ff1377f96da1ef5e278af6ae8bac5cc305
     4distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
    45zipStoreBase=GRADLE_USER_HOME
    56zipStorePath=wrapper/dists
  • gradlew

     
    11#!/usr/bin/env sh
    22
     3#
     4# Copyright 2015 the original author or authors.
     5#
     6# Licensed under the Apache License, Version 2.0 (the "License");
     7# you may not use this file except in compliance with the License.
     8# You may obtain a copy of the License at
     9#
     10#      https://www.apache.org/licenses/LICENSE-2.0
     11#
     12# Unless required by applicable law or agreed to in writing, software
     13# distributed under the License is distributed on an "AS IS" BASIS,
     14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     15# See the License for the specific language governing permissions and
     16# limitations under the License.
     17#
     18
    319##############################################################################
    420##
    521##  Gradle start up script for UN*X
     
    2844APP_BASE_NAME=`basename "$0"`
    2945
    3046# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
    31 DEFAULT_JVM_OPTS=""
     47DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
    3248
    3349# Use the maximum available, or set MAX_FD != -1 to use that value.
    3450MAX_FD="maximum"
     
    6682
    6783CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
    6884
     85
    6986# Determine the Java command to use to start the JVM.
    7087if [ -n "$JAVA_HOME" ] ; then
    7188    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
     
    109126    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
    110127fi
    111128
    112 # For Cygwin, switch paths to Windows format before running java
    113 if $cygwin ; then
     129# For Cygwin or MSYS, switch paths to Windows format before running java
     130if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
    114131    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
    115132    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
     133   
    116134    JAVACMD=`cygpath --unix "$JAVACMD"`
    117135
    118136    # We build the pattern for arguments to be converted via cygpath
     
    138156        else
    139157            eval `echo args$i`="\"$arg\""
    140158        fi
    141         i=$((i+1))
     159        i=`expr $i + 1`
    142160    done
    143161    case $i in
    144         (0) set -- ;;
    145         (1) set -- "$args0" ;;
    146         (2) set -- "$args0" "$args1" ;;
    147         (3) set -- "$args0" "$args1" "$args2" ;;
    148         (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
    149         (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
    150         (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
    151         (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
    152         (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
    153         (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
     162        0) set -- ;;
     163        1) set -- "$args0" ;;
     164        2) set -- "$args0" "$args1" ;;
     165        3) set -- "$args0" "$args1" "$args2" ;;
     166        4) set -- "$args0" "$args1" "$args2" "$args3" ;;
     167        5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
     168        6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
     169        7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
     170        8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
     171        9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
    154172    esac
    155173fi
    156174
     
    159177    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
    160178    echo " "
    161179}
    162 APP_ARGS=$(save "$@")
     180APP_ARGS=`save "$@"`
    163181
    164182# Collect all arguments for the java command, following the shell quoting and substitution rules
    165183eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
    166184
    167 # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
    168 if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
    169   cd "$(dirname "$0")"
    170 fi
    171 
    172185exec "$JAVACMD" "$@"
  • gradlew.bat

     
     1@rem
     2@rem Copyright 2015 the original author or authors.
     3@rem
     4@rem Licensed under the Apache License, Version 2.0 (the "License");
     5@rem you may not use this file except in compliance with the License.
     6@rem You may obtain a copy of the License at
     7@rem
     8@rem      https://www.apache.org/licenses/LICENSE-2.0
     9@rem
     10@rem Unless required by applicable law or agreed to in writing, software
     11@rem distributed under the License is distributed on an "AS IS" BASIS,
     12@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13@rem See the License for the specific language governing permissions and
     14@rem limitations under the License.
     15@rem
     16
    117@if "%DEBUG%" == "" @echo off
    218@rem ##########################################################################
    319@rem
     
    1329set APP_BASE_NAME=%~n0
    1430set APP_HOME=%DIRNAME%
    1531
     32@rem Resolve any "." and ".." in APP_HOME to make it shorter.
     33for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
     34
    1635@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
    17 set DEFAULT_JVM_OPTS=
     36set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
    1837
    1938@rem Find java.exe
    2039if defined JAVA_HOME goto findJavaFromJavaHome
     
    6584
    6685set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
    6786
     87
    6888@rem Execute Gradle
    6989"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
    7090
  • ivy_settings.xml

     
    11<ivysettings>
    2     <version-matchers usedefaults="true">
     2    <!--<version-matchers usedefaults="true">
    33        <maven-tsnap-vm/>
    4     </version-matchers>
     4    </version-matchers>-->
    55    <settings defaultResolver="central"/>
    66    <resolvers>
    77        <ibiblio name="central" m2compatible="true"/>