Git Product home page Git Product logo

gradle-josm-plugin's Introduction

Gradle plugin for developing JOSM plugins

This Gradle plugin is designed to make development of JOSM plugins easier.

Things like test driving your JOSM plugins before releasing them becomes as easy as typing ./gradlew runJosm into the command line and the gradle-josm-plugin automatically takes care of compiling the current state of your JOSM plugin, starting a clean (!) instance of JOSM with only your plugin loaded (and all required plugins, even transitive ones). You'll no longer need to keep a local copy of the JOSM source code in a compatible version and the other JOSM plugins!

See the docs below for many more things you can do. And you don't even need to abandon the Ant build, which is used for most of the JOSM plugins. Option 2 in the guide for setting up the gradle-josm-plugin explains how a JOSM plugin can support building with either build system (many configuration options can be shared between both).

If you miss something here, found something that's broken, or need more info about this project:

  • Feel free to open issues on this project!
  • Or you can reach out via email: contact-project+josm-gradle-josm-plugin-5042462-issue- (at) incoming.gitlab.com

Getting started

The plugin is available in the default Gradle plugin repository.

See docs/Setup.md for detailed setup instructions.

See docs/Tasks.md for information, from which tasks you can choose.

And if you need external dependencies for your plugin, maybe docs/Dependencies.md can help.

If you want to know how i18n works, have a look at docs/I18n.md.

In docs/Versioning.md it is described, how the version number of your plugin is determined and how you can increment it.

Also, the KDoc (similar to Javadoc, but for Kotlin) for this Gradle plugin is available online.

Projects using this Gradle plugin

Deprecated links

Alternatively to the default Gradle plugin repository, you can download this plugin from a Maven repository at https://josm.gitlab.io/gradle-josm-plugin/maven. That link gives a 404 HTTP status, but the repository is still there. The contents can be viewed at https://gitlab.com/JOSM/gradle-josm-plugin/tree/pages/maven .

Under https://plugins.gradle.org/plugin/org.openstreetmap.josm.gradle.plugin you can find the versions < v0.2.0 of the plugin. Later versions have the shorter plugin ID org.openstreetmap.josm.

gradle-josm-plugin's People

Contributors

davidkarlas avatar floscher avatar gubaer avatar nlthijs48 avatar simon04 avatar tsmock avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gradle-josm-plugin's Issues

META-INF/gradle-plugins/org.openstreetmap.josm.properties in plugin jar?

When I build the plugin and publish to my own maven directory hosted on S3, the plugin jar includes the file

META-INF/gradle-plugins/org.openstreetmap.josm.properties

instead of the file

META-INF/gradle-plugins/gradle-josm-plugin.properties

When I want to load the plugin from my S3-based maven repo, I therefore have to

  1. use the plugin id org.openstreetmap.josm instead of gradle-josm-plugin, see build.gradle

  2. add a resultion strategy to settings.gradle, see settings.gradle

Translated plugin descriptions not in MANIFEST.MF when build is not clean

When building a plugin without cleaning and it was already built before, the *.jar manifest does not contain the translated plugin description.

Currently the translated description is added in the MoCompile task, but only if that task is not UP-TO-DATE.

It should be ensured that the translated description must always be written to the manifest.

This was brought up in JOSM/Mapillary#77

Missing manifest entries in local dist site

The localDist task generates a plugin update site. When using the current version v0.3.2 of the gradle-josm-plugin, that update site contains a manifest with only Manifest-Version: 1.0

Exception on runJosm task: Could not initialize class org.openstreetmap.josm.tools.WinRegistry

Hi.

I was trying to run Mapillary JOSM plugin using "runJosm" task, I'm facing following issue:

2022-07-07 16:57:44.657 SEVERE: Handled by bug report queue: java.lang.NoClassDefFoundError: Could not initialize class org.openstreetmap.josm.tools.WinRegistry
java.lang.NoClassDefFoundError: Could not initialize class org.openstreetmap.josm.tools.WinRegistry
	at org.openstreetmap.josm.tools.PlatformHookWindows.isDotNet45Installed(PlatformHookWindows.java:628)
	at org.openstreetmap.josm.tools.PlatformHookWindows.webRequest(PlatformHookWindows.java:676)
	at org.openstreetmap.josm.tools.PlatformHookWindows.getX509Certificate(PlatformHookWindows.java:362)
	at org.openstreetmap.josm.io.CertificateAmendment.addMissingCertificates(CertificateAmendment.java:240)
	at org.openstreetmap.josm.gui.MainApplication.mainJOSM(MainApplication.java:878)
	at org.openstreetmap.josm.gui.MainApplication$3.processArguments(MainApplication.java:277)
	at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:741)

2022-07-07 16:57:45.004 SEVERE: Unable to get Windows build number: java.lang.NoClassDefFoundError: Could not initialize class org.openstreetmap.josm.tools.WinRegistry
2022-07-07 16:57:45.236 SEVERE: java.lang.IllegalStateException: HTTP factory has not been set
java.lang.IllegalStateException: HTTP factory has not been set
	at org.openstreetmap.josm.tools.HttpClient.create(HttpClient.java:557)
	at org.openstreetmap.josm.tools.HttpClient.create(HttpClient.java:545)
	at org.openstreetmap.josm.io.CachedFile.checkLocal(CachedFile.java:491)
	at org.openstreetmap.josm.io.CachedFile.getFile(CachedFile.java:284)
	at org.openstreetmap.josm.io.CachedFile.getInputStream(CachedFile.java:227)
	at org.openstreetmap.josm.io.CachedFile.getByteContent(CachedFile.java:245)
	at org.openstreetmap.josm.gui.bugreport.JosmUpdatePanel.getTestedVersion(JosmUpdatePanel.java:70)
	at org.openstreetmap.josm.gui.bugreport.JosmUpdatePanel.readCurrentVersion(JosmUpdatePanel.java:53)
	at java.base/java.lang.Thread.run(Thread.java:833)

I've even tried to crate a new project with such build.gradle:

plugins {
    id 'java'
    id "org.openstreetmap.josm" version "0.8.2"
}

group 'org.example'
version '1.0-SNAPSHOT'

repositories {
    mavenCentral()
}

josm {
    pluginName = "MyAwesomePluginName"
    josmCompileVersion = 18511
    manifest {
        description = "The description of my awesome plugin"
        mainClass = "org.openstreetmap.josm.plugins.myawesomeplugin.MyAwesomePlugin"
        minJosmVersion = 18511
    }
}

Results were the same. I'm using IntelliJ IDEA on Windows 10, Azul 17 JDK.

build.gradle.kts - import of java-classes fails in IntelliJ- Any hint?

Hi

when I import the gradle-josm-plugin in IntelliJ, imports for java classes like java.time.Duration in build.gradle.kts don't work. In kotlin files they don't work either.

I googled but I didn't come up with a solution.

Do you use IntelliJ too? Did you have the same problem? Do you have a workaround?

Thanks in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.