Ticket #19208: 19208.streetside_build.patch
| File 19208.streetside_build.patch, 6.7 KB (added by , 6 years ago) |
|---|
-
build.gradle
1 import com.github.spotbugs.snom.SpotBugsTask 2 import net.ltgt.gradle.errorprone.CheckSeverity 3 1 4 plugins { 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' 9 6 id 'eclipse' 10 7 id 'jacoco' 11 id 'java'12 8 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") 13 16 } 14 17 15 18 apply from: 'gradle/tool-config.gradle' … … 23 26 versionProcess.waitFor() 24 27 if (versionProcess.exitValue() != 0) { 25 28 logger.error("Could not determine the current version of this JOSM plugin!") 26 version = " ‹unknown›"29 version = "<Unknown>" 27 30 } else { 28 31 version = versionProcess.in.text.trim() 29 32 } … … 35 38 } 36 39 37 40 dependencies { 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' 41 47 compile 'us.monoid.web:resty:0.3.2' 42 48 compile 'log4j:log4j:1.2.17' 43 49 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") 46 54 } 47 55 48 56 sourceSets { … … 68 76 } 69 77 } 70 78 79 spotless { 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 71 95 josm { 72 96 debugPort = 7051 73 97 manifest { 74 98 //oldVersionDownloadLink 10824, 'v1.5.3', new URL('https://github.com/JOSM/Mapillary/releases/download/v1.5.3/Mapillary.jar') 75 99 } 76 i18n {77 pathTransformer = getGithubPathTransformer('spatialdev/MicrosoftStreetside')78 }100 //i18n { 101 // pathTransformer = getGithubPathTransformer('spatialdev/MicrosoftStreetside') 102 //} 79 103 } 80 104 81 105 eclipse { … … 99 123 tasks.withType(Javadoc) { 100 124 failOnError false 101 125 } 102 tasks.withType( com.github.spotbugs.SpotBugsTask) {126 tasks.withType(SpotBugsTask) { 103 127 reports { 104 128 xml.enabled = false 105 129 html.enabled = true … … 109 133 import org.gradle.api.tasks.testing.logging.TestLogEvent 110 134 111 135 test { 136 project.afterEvaluate { 137 jvmArgs("-javaagent:${classpath.find { it.name.contains("jmockit") }.absolutePath}") 138 } 112 139 testLogging { 113 140 exceptionFormat "full" 114 141 events TestLogEvent.FAILED, TestLogEvent.SKIPPED -
gradle/tool-config.gradle
1 def pmdVersion = " 5.8.0" // TODO: Update to PMD 62 def spotbugsVersion = " 3.1.3"3 def jacocoVersion = "0.8. 1"4 def errorproneVersion = "2.3. 1"1 def pmdVersion = "6.21.0" // TODO: Update to PMD 6 2 def spotbugsVersion = "4.0.3" 3 def jacocoVersion = "0.8.5" 4 def errorproneVersion = "2.3.4" 5 5 6 6 // Set up ErrorProne (currently only for JDK8, until JDK9 is supported) 7 7 dependencies.errorprone "com.google.errorprone:error_prone_core:$errorproneVersion" 8 /* 8 9 tasks.withType(JavaCompile) { 9 10 options.compilerArgs += ['-Xep:DefaultCharset:ERROR', 10 11 '-Xep:ClassCanBeStatic:ERROR', … … 16 17 '-Xep:LambdaFunctionalInterface:WARN', 17 18 '-Xep:ConstantField:WARN'] 18 19 } 20 */ 19 21 20 22 // Spotbugs config 21 23 spotbugs { … … 23 25 ignoreFailures = true 24 26 effort = "max" 25 27 reportLevel = "low" 26 sourceSets = [sourceSets.main, sourceSets.test]28 //sourceSets = [sourceSets.main, sourceSets.test] 27 29 } 28 30 29 31 // JaCoCo config -
gradle/wrapper/gradle-wrapper.properties
1 1 distributionBase=GRADLE_USER_HOME 2 2 distributionPath=wrapper/dists 3 distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip 3 distributionSha256Sum=e58cdff0cee6d9b422dcd08ebeb3177bc44eaa09bd9a2e838ff74c408fe1cbcd 4 distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-bin.zip 4 5 zipStoreBase=GRADLE_USER_HOME 5 6 zipStorePath=wrapper/dists -
gradle.properties
7 7 8 8 # Minimum required JOSM version to run this plugin, choose the lowest version possible that is compatible. 9 9 # You can check if the plugin compiles against this version by executing `./gradlew minJosmVersionClasses`. 10 plugin.main.version=1 446010 plugin.main.version=16402 11 11 #plugin.version= 12 12 # Version of JOSM against which the plugin is compiled 13 13 # Please check, if the specified version is available for download from https://josm.openstreetmap.de/download/ . 14 14 # If not, choose the next higher number that is available, or the gradle build will break. 15 plugin.compile.version=1 446015 plugin.compile.version=16402 16 16 plugin.requires=apache-commons;apache-http;utilsplugin2;javafx 17 17 18 18 # Character encoding of Gradle files -
ivy_settings.xml
1 1 <ivysettings> 2 < version-matchers usedefaults="true">2 <!--<version-matchers usedefaults="true"> 3 3 <maven-tsnap-vm/> 4 </version-matchers> 4 </version-matchers>--> 5 5 <settings defaultResolver="central"/> 6 6 <resolvers> 7 7 <ibiblio name="central" m2compatible="true"/>
