Ignore:
Timestamp:
2021-07-15T01:07:58+02:00 (3 years ago)
Author:
Don-vip
Message:

fix #19998 - update Streetside dependencies (patch by taylor.smock, modified)

Location:
applications/editors/josm/plugins/MicrosoftStreetside
Files:
6 deleted
11 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/MicrosoftStreetside/build.gradle

    r34419 r35779  
     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.39.0")
     10  id("net.ltgt.errorprone").version("2.0.2")
     11  id("org.kordamp.markdown.convert").version("1.2.0")
     12  id("org.sonarqube").version("3.3")
     13  id('com.github.spotbugs').version('4.7.2')
     14  id('org.openstreetmap.josm').version("0.7.1")
     15  id("com.diffplug.spotless").version("5.14.1")
    1316}
    1417
     
    3336  jcenter()
    3437  mavenCentral()
     38  maven {
     39    url "https://josm.openstreetmap.de/nexus/content/repositories/releases/"
     40  }
    3541}
    3642
     43def versions = [
     44  awaitility: "4.1.0",
     45  jackson: "2.12.4",
     46  jmockit: "1.49.a",
     47  junit: "5.7.1",
     48  wiremock: "2.27.2"
     49]
     50
    3751dependencies {
    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'
     52  if (!JavaVersion.current().isJava9Compatible()) {
     53    errorproneJavac("com.google.errorprone:javac:9+181-r4173-1")
     54  }
     55  implementation "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
     56  implementation "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
     57  implementation "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}"
     58  implementation "us.monoid.web:resty:0.3.2"
     59  implementation "log4j:log4j:1.2.17"
     60  testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${versions.junit}")
     61  testImplementation("org.junit.jupiter:junit-jupiter-params:${versions.junit}")
     62  testImplementation("org.junit.jupiter:junit-jupiter-api:${versions.junit}")
     63  testImplementation("org.junit.vintage:junit-vintage-engine:${versions.junit}")
     64  testImplementation ("org.openstreetmap.josm:josm-unittest"){changing=true}
     65  testImplementation "com.github.tomakehurst:wiremock:${versions.wiremock}"
     66  testImplementation("org.jmockit:jmockit:${versions.jmockit}")
     67  testImplementation("org.awaitility:awaitility:${versions.awaitility}")
    4668}
    4769
     
    6991}
    7092
     93spotless {
     94  enforceCheck = false
     95  format("misc") {
     96    target("**/*.gradle", "**.*.md", "**/.gitignore")
     97
     98    trimTrailingWhitespace()
     99    indentWithSpaces(2)
     100    endWithNewline()
     101  }
     102  java {
     103    trimTrailingWhitespace()
     104    indentWithSpaces(2)
     105    endWithNewline()
     106    removeUnusedImports()
     107  }
     108}
     109
    71110josm {
    72111  debugPort = 7051
    73   manifest {
    74       //oldVersionDownloadLink 10824, 'v1.5.3', new URL('https://github.com/JOSM/Mapillary/releases/download/v1.5.3/Mapillary.jar')
    75   }
    76   i18n {
    77     pathTransformer = getGithubPathTransformer('spatialdev/MicrosoftStreetside')
    78   }
    79112}
    80113
     
    100133  failOnError false
    101134}
    102 tasks.withType(com.github.spotbugs.SpotBugsTask) {
     135tasks.withType(SpotBugsTask) {
    103136  reports {
    104137    xml.enabled = false
     
    110143
    111144test {
     145  project.afterEvaluate {
     146    jvmArgs("-javaagent:${classpath.find { it.name.contains("jmockit") }.absolutePath}")
     147  }
     148  useJUnitPlatform()
    112149  testLogging {
    113150    exceptionFormat "full"
  • applications/editors/josm/plugins/MicrosoftStreetside/config/pmd/ruleset.xml

    r34329 r35779  
    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" />
    28   </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"/>
    36   </rule>
    37   <rule ref="rulesets/java/optimizations.xml">
    3816    <exclude name="LocalVariableCouldBeFinal" />
    3917    <exclude name="MethodArgumentCouldBeFinal" />
     18    <exclude name="UselessParentheses" />
     19    <exclude name="IfStmtsMustUseBraces"/>
     20  </rule>
     21  <rule ref="category/java/multithreading.xml">
     22    <exclude name="AvoidSynchronizedAtMethodLevel" />
     23  </rule>
     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>
  • applications/editors/josm/plugins/MicrosoftStreetside/gradle.properties

    r35601 r35779  
    77
    88# Minimum required JOSM version to run this plugin, choose the lowest version possible that is compatible.
    9 # You can check if the plugin compiles against this version by executing `./gradlew minJosmVersionClasses`.
    10 plugin.main.version=16548
     9# You can check if the plugin compiles against this version by executing `./gradlew compileJava_minJosm`.
     10plugin.main.version=18004
    1111#plugin.version=
    1212# Version of JOSM against which the plugin is compiled
    1313# Please check, if the specified version is available for download from https://josm.openstreetmap.de/download/ .
    1414# If not, choose the next higher number that is available, or the gradle build will break.
    15 plugin.compile.version=17084
     15plugin.compile.version=18004
    1616plugin.requires=apache-commons;apache-http;utilsplugin2;javafx
    1717
  • applications/editors/josm/plugins/MicrosoftStreetside/gradle/tool-config.gradle

    r34329 r35779  
    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.36.0"
     2def spotbugsVersion = "4.3.0"
     3def jacocoVersion = "0.8.7"
     4def errorproneVersion = "2.7.1"
    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',
     
    1718  '-Xep:ConstantField:WARN']
    1819}
     20*/
    1921
    2022// Spotbugs config
     
    2426  effort = "max"
    2527  reportLevel = "low"
    26   sourceSets = [sourceSets.main, sourceSets.test]
     28  //sourceSets = [sourceSets.main, sourceSets.test]
    2729}
    2830
  • applications/editors/josm/plugins/MicrosoftStreetside/gradle/wrapper/gradle-wrapper.properties

    r34329 r35779  
    11distributionBase=GRADLE_USER_HOME
    22distributionPath=wrapper/dists
    3 distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
     3distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
    44zipStoreBase=GRADLE_USER_HOME
    55zipStorePath=wrapper/dists
  • applications/editors/josm/plugins/MicrosoftStreetside/gradlew

    r34317 r35779  
    11#!/usr/bin/env sh
     2
     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#
    218
    319##############################################################################
     
    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.
     
    6682
    6783CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
     84
    6885
    6986# Determine the Java command to use to start the JVM.
     
    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
     
    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
     
    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" "$@"
  • applications/editors/josm/plugins/MicrosoftStreetside/gradlew.bat

    r34317 r35779  
     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 ##########################################################################
     
    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
     
    2241set JAVA_EXE=java.exe
    2342%JAVA_EXE% -version >NUL 2>&1
    24 if "%ERRORLEVEL%" == "0" goto init
     43if "%ERRORLEVEL%" == "0" goto execute
    2544
    2645echo.
     
    3655set JAVA_EXE=%JAVA_HOME%/bin/java.exe
    3756
    38 if exist "%JAVA_EXE%" goto init
     57if exist "%JAVA_EXE%" goto execute
    3958
    4059echo.
     
    4665goto fail
    4766
    48 :init
    49 @rem Get command-line arguments, handling Windows variants
    50 
    51 if not "%OS%" == "Windows_NT" goto win9xME_args
    52 
    53 :win9xME_args
    54 @rem Slurp the command line arguments.
    55 set CMD_LINE_ARGS=
    56 set _SKIP=2
    57 
    58 :win9xME_args_slurp
    59 if "x%~1" == "x" goto execute
    60 
    61 set CMD_LINE_ARGS=%*
    62 
    6367:execute
    6468@rem Setup the command line
     
    6670set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
    6771
     72
    6873@rem Execute Gradle
    69 "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
     74"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
    7075
    7176:end
  • applications/editors/josm/plugins/MicrosoftStreetside/ivy.xml

    r34577 r35779  
    55        </configurations>
    66        <dependencies>
    7                 <dependency org="com.fasterxml.jackson.core" name="jackson-core" rev="2.2.4"/>
    8         <dependency org="com.fasterxml.jackson.core" name="jackson-databind" rev="2.2.4"/>
    9         <dependency org="com.fasterxml.jackson.core" name="jackson-annotations" rev="2.2.4"/>
     7                <dependency org="com.fasterxml.jackson.core" name="jackson-core" rev="2.12.4"/>
     8        <dependency org="com.fasterxml.jackson.core" name="jackson-databind" rev="2.12.4"/>
     9        <dependency org="com.fasterxml.jackson.core" name="jackson-annotations" rev="2.12.4"/>
    1010        <dependency org="us.monoid.web" name="resty" rev="0.3.2"/>
    1111        <dependency org="log4j" name="log4j" rev="1.2.17"/>
  • applications/editors/josm/plugins/MicrosoftStreetside/ivy_settings.xml

    r34577 r35779  
    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>
  • applications/editors/josm/plugins/MicrosoftStreetside/lib

    • Property svn:ignore
      •  

        old new  
         1*.jar
         2.git
        13bin
        2 .git
Note: See TracChangeset for help on using the changeset viewer.