From 86a807b119f9d121c12ac58a01a2291f96313ee5 Mon Sep 17 00:00:00 2001 From: Taylor Smock Date: Wed, 29 Jan 2025 04:20:22 -0700 Subject: [PATCH] Drop gradle and ivy Signed-off-by: Taylor Smock --- build.gradle | 147 ---------------------------------------------- build.xml | 21 +++---- gradle.properties | 12 ---- ivy.xml | 8 --- pom.xml | 116 ++++++++++++++++++++++++++++++++++++ 5 files changed, 124 insertions(+), 180 deletions(-) delete mode 100644 build.gradle delete mode 100644 gradle.properties delete mode 100644 ivy.xml create mode 100644 pom.xml diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 6eeb66a9..00000000 --- a/build.gradle +++ /dev/null @@ -1,147 +0,0 @@ -import com.github.spotbugs.snom.SpotBugsTask -import net.ltgt.gradle.errorprone.CheckSeverity - -plugins { - id "java" - id "eclipse" - id "jacoco" - id "maven-publish" - id "pmd" - id("com.github.spotbugs").version("5.2.1") - id("org.openstreetmap.josm").version("0.8.2") - id("net.ltgt.errorprone").version("3.1.0") -} - -// Set up Errorprone -tasks.withType(JavaCompile).configureEach { - options.errorprone { - check("DefaultCharset", CheckSeverity.ERROR) - check("StringEquality", CheckSeverity.ERROR) - check("ConstantField", CheckSeverity.WARN) - check("FieldCanBeFinal", CheckSeverity.WARN) - check("LambdaFunctionalInterface", CheckSeverity.WARN) - check("MethodCanBeStatic", CheckSeverity.WARN) - check("MultiVariableDeclaration", CheckSeverity.WARN) - check("PrivateConstructorForUtilityClass", CheckSeverity.WARN) - check("UngroupedOverloads", CheckSeverity.WARN) - check("WildcardImport", CheckSeverity.WARN) - } -} - -java.sourceCompatibility = JavaVersion.VERSION_1_8 - -def versions = [ - awaitility: "4.2.0", - errorprone: "2.10.0", - jacoco : "0.8.11", - junit : "5.10.0", - pmd : "6.55.0", - spotbugs : "4.8.0", - wiremock : "2.35.1" -] - -repositories { - mavenCentral() -} -dependencies { - if (!JavaVersion.current().isJava9Compatible()) { - errorproneJavac("com.google.errorprone:javac:9+181-r4173-1") - } - errorprone("com.google.errorprone:error_prone_core:${versions.errorprone}") - - testImplementation("org.junit.jupiter:junit-jupiter-api:${versions.junit}") - testImplementation("org.junit.jupiter:junit-jupiter-params:${versions.junit}") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${versions.junit}") - testImplementation("org.junit.vintage:junit-vintage-engine:${versions.junit}") - testImplementation("com.github.spotbugs:spotbugs-annotations:${versions.spotbugs}") - testImplementation("org.openstreetmap.josm:josm-unittest:"){changing=true} - testImplementation("com.github.tomakehurst:wiremock-jre8:${versions.wiremock}") - testImplementation("org.awaitility:awaitility:${versions.awaitility}") -} - -// Add dependencies from ivy.xml -def ivyModule = new XmlParser().parse(new File("$projectDir/ivy.xml")) -logger.info("Dependencies from ivy.xml (added to configuration `packIntoJar`):") -ivyModule.dependencies.dependency.each { - logger.info(" * ${it.@org}:${it.@name}:${it.@rev}") - project.dependencies.packIntoJar("${it.@org}:${it.@name}:${it.@rev}") -} - -test { - useJUnitPlatform() - testLogging.exceptionFormat = 'full' - systemProperty("junit.jupiter.extensions.autodetection.enabled", true) -} - -sourceSets { - test { - java { - srcDirs = ["test/unit"] - } - resources { - srcDirs = ["test/data"] - } - } -} -tasks.processResources { - from("$projectDir/LICENSE") - from("$projectDir/README.md") -} - -josm { - pluginName = "wikipedia" - manifest { - oldVersionDownloadLink 16398, "v1.2.0", new URL("https://josm.gitlab.io/plugin/wikipedia/dist/v1.2.0/wikipedia.jar") - oldVersionDownloadLink 14149, "v1.1.3", new URL("https://josm.gitlab.io/plugin/wikipedia/dist/v1.1.3/wikipedia.jar") - oldVersionDownloadLink 13927, "v1.1.0", new URL("https://josm.gitlab.io/plugin/wikipedia/dist/v1.1.0/wikipedia.jar") - oldVersionDownloadLink 13597, "v1.0.1", new URL("https://github.com/JOSM/wikipedia/releases/download/v1.0.1/wikipedia.jar") - oldVersionDownloadLink 12900, "34109", new URL("https://svn.openstreetmap.org/applications/editors/josm/dist/wikipedia.jar?p=34113") - oldVersionDownloadLink 12878, "33635", new URL("https://svn.openstreetmap.org/applications/editors/josm/dist/wikipedia.jar?p=33636") - } - i18n { - pathTransformer = getPathTransformer(projectDir, "gitlab.com/JOSM/plugin/wikipedia/-/blob") - } - packIntoJarFileFilter = { - it.exclude("META-INF/**", "LICENSE.txt", "module-info.class") - } -} - -tasks.withType(JavaCompile) { - options.compilerArgs += [ - "-Xlint:all", - "-Xlint:-serial", - ] -} - -// Set up JaCoCo -jacoco { - toolVersion = "${versions.jacoco}" -} -jacocoTestReport { - dependsOn test - reports { - xml.required = true - html.required = true - } -} -check.dependsOn jacocoTestReport - -// Set up PMD -pmd { - toolVersion = versions.pmd - ignoreFailures true - ruleSets = [] - ruleSetConfig = resources.text.fromFile("$projectDir/config/pmd/ruleset.xml") - sourceSets = [sourceSets.main] -} - -// Set up SpotBugs -spotbugs { - toolVersion.set(versions.spotbugs) - ignoreFailures.set(true) -} -tasks.withType(SpotBugsTask) { - reports { - html.required = true - } -} diff --git a/build.xml b/build.xml index 247779ec..6a8e8ad1 100644 --- a/build.xml +++ b/build.xml @@ -2,19 +2,16 @@ - - - - - - - - - + + + + + + + - @@ -29,9 +26,7 @@ - - + - diff --git a/gradle.properties b/gradle.properties deleted file mode 100644 index 3c5d8d3e..00000000 --- a/gradle.properties +++ /dev/null @@ -1,12 +0,0 @@ -# The minimum JOSM version this plugin is compatible with (can be any numeric version) -plugin.main.version = 18877 -# The JOSM version this plugin is currently compiled against -# Please make sure this version is available at https://josm.openstreetmap.de/download -# The special values "latest" and "tested" are also possible here, but not recommended. -plugin.compile.version = 18877 -plugin.canloadatruntime = true -plugin.author = floscher , simon04 -plugin.class = org.wikipedia.WikipediaPlugin -plugin.icon = images/dialogs/wikipedia.png -plugin.link = https://josm.openstreetmap.de/wiki/Help/Plugin/Wikipedia -plugin.description = Simplifies linking OSM objects to Wikipedia articles and Wikidata items diff --git a/ivy.xml b/ivy.xml deleted file mode 100644 index 9fbbf698..00000000 --- a/ivy.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/pom.xml b/pom.xml new file mode 100644 index 00000000..2c61c95f --- /dev/null +++ b/pom.xml @@ -0,0 +1,116 @@ + + + 4.0.0 + + org.openstreetmap.josm.plugins + plugin-root + SNAPSHOT + + wikipedia + ${plugin.link} + + + floscher + + + simon04 + + + + UTF-8 + ${project.basedir}/src/main/java + ${project.basedir}/src/main/resources + 18877 + true + floscher <incoming+josm-plugin-wikipedia-6702380-issue-@incoming.gitlab.com>, simon04 + org.wikipedia.WikipediaPlugin + images/dialogs/wikipedia.png + https://josm.openstreetmap.de/wiki/Help/Plugin/Wikipedia + Simplifies linking OSM objects to Wikipedia articles and Wikidata items + + + + com.fasterxml.jackson.core + jackson-databind + 2.15.3 + compile + + + org.wikidata.wdtk + wdtk-wikibaseapi + 0.11.1 + compile + + + org.wikidata.wdtk + wdtk-dumpfiles + 0.11.1 + compile + + + org.wiremock + wiremock + test + + + org.junit.platform + junit-platform-launcher + test + + + org.junit.platform + junit-platform-suite + test + + + org.junit.vintage + junit-vintage-engine + test + + + org.junit.jupiter + junit-jupiter-params + test + + + org.junit.jupiter + junit-jupiter-api + test + + + org.junit.jupiter + junit-jupiter-engine + test + + + org.junit.jupiter + junit-jupiter-migrationsupport + test + + + org.jmockit + jmockit + + + org.awaitility + awaitility + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + ${plugin.link} + ${plugin.canloadatruntime} + ${plugin.icon} + + + + + + +