Ticket #19998: 19208.streetside_build.2.patch
File 19208.streetside_build.2.patch, 6.4 KB (added by , 5 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 } … … 34 37 mavenCentral() 35 38 } 36 39 40 def versions = [ 41 awaitility: "4.0.3", 42 jackson: "2.11.0", 43 jmockit: "1.46", 44 junit: "5.7.0", 45 wiremock: "2.27.1" 46 ] 47 37 48 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 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 compile "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" 53 compile "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}" 54 compile "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}" 55 compile "us.monoid.web:resty:0.3.2" 56 compile "log4j:log4j:1.2.17" 57 testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${versions.junit}") 58 testCompile("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}") 46 65 } 47 66 48 67 sourceSets { … … 68 87 } 69 88 } 70 89 90 spotless { 91 format("misc") { 92 target("**/*.gradle", "**.*.md", "**/.gitignore") 93 94 trimTrailingWhitespace() 95 indentWithSpaces(2) 96 endWithNewline() 97 } 98 java { 99 trimTrailingWhitespace() 100 indentWithSpaces(2) 101 endWithNewline() 102 removeUnusedImports() 103 } 104 } 105 71 106 josm { 72 107 debugPort = 7051 73 108 manifest { 74 109 //oldVersionDownloadLink 10824, 'v1.5.3', new URL('https://github.com/JOSM/Mapillary/releases/download/v1.5.3/Mapillary.jar') 75 110 } 76 i18n {77 pathTransformer = getGithubPathTransformer('spatialdev/MicrosoftStreetside')78 }111 //i18n { 112 // pathTransformer = getGithubPathTransformer('spatialdev/MicrosoftStreetside') 113 //} 79 114 } 80 115 81 116 eclipse { … … 99 134 tasks.withType(Javadoc) { 100 135 failOnError false 101 136 } 102 tasks.withType( com.github.spotbugs.SpotBugsTask) {137 tasks.withType(SpotBugsTask) { 103 138 reports { 104 139 xml.enabled = false 105 140 html.enabled = true … … 109 144 import org.gradle.api.tasks.testing.logging.TestLogEvent 110 145 111 146 test { 147 project.afterEvaluate { 148 jvmArgs("-javaagent:${classpath.find { it.name.contains("jmockit") }.absolutePath}") 149 } 150 useJUnitPlatform() 112 151 testLogging { 113 152 exceptionFormat "full" 114 153 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 -
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"/>