Ticket #19998: 19208.streetside_build.4.patch

File 19208.streetside_build.4.patch, 5.8 KB (added by taylor.smock, 5 years ago)

Yet Another Patch (hopefully works -- worked for me with Eclipse/patch, with revision 35601)

  • 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.28.0")
     10  id("net.ltgt.errorprone").version("1.1.1")
     11  id("org.kordamp.markdown.convert").version("1.2.0")
     12  id("org.sonarqube").version("2.8")
     13  id('com.github.spotbugs').version('4.0.3')
     14  id('org.openstreetmap.josm').version("0.7.0")
     15  id("com.diffplug.gradle.spotless").version("4.0.1")
    1316}
    1417
    1518apply from: 'gradle/tool-config.gradle'
     
    2326versionProcess.waitFor()
    2427if (versionProcess.exitValue() != 0) {
    2528  logger.error("Could not determine the current version of this JOSM plugin!")
    26   version = "‹unknown›"
     29  version = "<Unknown>"
    2730} else {
    2831  version = versionProcess.in.text.trim()
    2932}
     
    3538}
    3639
    3740dependencies {
    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  if (!JavaVersion.current().isJava9Compatible()) {
     42    errorproneJavac("com.google.errorprone:javac:9+181-r4173-1")
     43  }
     44  compile 'com.fasterxml.jackson.core:jackson-core:2.11.0'
     45  compile 'com.fasterxml.jackson.core:jackson-databind:2.11.0'
     46  compile 'com.fasterxml.jackson.core:jackson-annotations:2.11.0'
    4147  compile 'us.monoid.web:resty:0.3.2'
    4248  compile 'log4j:log4j:1.2.17'
    4349  testImplementation ('org.openstreetmap.josm:josm-unittest'){changing=true}
    44   testImplementation 'com.github.tomakehurst:wiremock:2.17.0'
    45   testImplementation 'junit:junit:4.12'
     50  testImplementation 'com.github.tomakehurst:wiremock:2.26.3'
     51  testImplementation 'junit:junit:4.13'
     52  testImplementation("org.jmockit:jmockit:1.46") { because("versions >= 1.47 are incompatible with JOSM, see https://josm.openstreetmap.de/ticket/18200") }
     53  testImplementation("org.awaitility:awaitility:4.0.2")
    4654}
    4755
    4856sourceSets {
     
    6876  }
    6977}
    7078
     79spotless {
     80  format("misc") {
     81    target("**/*.gradle", "**.*.md", "**/.gitignore")
     82
     83    trimTrailingWhitespace()
     84    indentWithSpaces(2)
     85    endWithNewline()
     86  }
     87  java {
     88    trimTrailingWhitespace()
     89    indentWithSpaces(2)
     90    endWithNewline()
     91    removeUnusedImports()
     92  }
     93}
     94
    7195josm {
    7296  debugPort = 7051
    7397  manifest {
    7498      //oldVersionDownloadLink 10824, 'v1.5.3', new URL('https://github.com/JOSM/Mapillary/releases/download/v1.5.3/Mapillary.jar')
    7599  }
    76   i18n {
    77     pathTransformer = getGithubPathTransformer('spatialdev/MicrosoftStreetside')
    78   }
     100  //i18n {
     101   // pathTransformer = getGithubPathTransformer('spatialdev/MicrosoftStreetside')
     102  //}
    79103}
    80104
    81105eclipse {
     
    99123tasks.withType(Javadoc) {
    100124  failOnError false
    101125}
    102 tasks.withType(com.github.spotbugs.SpotBugsTask) {
     126tasks.withType(SpotBugsTask) {
    103127  reports {
    104128    xml.enabled = false
    105129    html.enabled = true
     
    109133import org.gradle.api.tasks.testing.logging.TestLogEvent
    110134
    111135test {
     136  project.afterEvaluate {
     137    jvmArgs("-javaagent:${classpath.find { it.name.contains("jmockit") }.absolutePath}")
     138  }
    112139  testLogging {
    113140    exceptionFormat "full"
    114141    events TestLogEvent.FAILED, TestLogEvent.SKIPPED
  • 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

     
    11distributionBase=GRADLE_USER_HOME
    22distributionPath=wrapper/dists
    3 distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
     3distributionSha256Sum=e58cdff0cee6d9b422dcd08ebeb3177bc44eaa09bd9a2e838ff74c408fe1cbcd
     4distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-bin.zip
    45zipStoreBase=GRADLE_USER_HOME
    56zipStorePath=wrapper/dists
  • 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"/>