class JosmManifest
The info that will be written into the manifest file of the plugin *.jar
Most of the attributes are corresponding to the ones listed in the documentation for developing JOSM plugins. But note that some of them have been renamed a bit to better express what each attribute is good for.
The properties used by the Ant build (e.g. plugin.author or plugin.description)
are automatically picked up by both Ant and Gradle, if you define them in your
gradle.properties file and load them into your build.xml file using the following snippet:
<!-- edit the properties of this plugin in the file `gradle.properties` -->
<property file="${basedir}/gradle.properties"/>
The detailed documentation for each field below tells you, which one corresponds
to which Ant/Gradle property and to which attribute in the MANIFEST.MF file.
For a successful build you'll have to at least set the following properties in this class: mainClass, description, minJosmVersion Your project also has to set a value for Project.getVersion
enum class Platform
The three platforms for which JOSM supports virtual plugins. |
JosmManifest(project: Project)
The info that will be written into the manifest file of the plugin *.jar |
var author: String?
The author of the plugin. |
|
var canLoadAtRuntime: Boolean
Determines if the plugin needs a restart after installation. |
|
var description: String?
The description of what the plugin does. |
|
var iconPath: String?
Path to the logo of the plugin. Relative to the root of the released jar-file, so that it can be loaded via Class.getResource. |
|
var includeLinksToGithubReleases: Boolean
If |
|
var langCompileTask: LangCompile?
The task that processes the *.lang files for translations. This is set automatically and you normally don't have to change it. |
|
var loadEarly: Boolean
This can be set to |
|
var loadPriority: Int?
A number indicating the order in which the plugins should be loaded. Lower numbers first, higher numbers later, then the plugins with this field set to |
|
var mainClass: String?
The full name of the main class of the plugin. |
|
var minJavaVersion: Int?
The minimum Java version needed to run this plugin. |
|
var minJosmVersion: String?
The minimum JOSM version with which the plugin is compatible. |
|
var platform: JosmManifest.Platform?
The platform for which this native implementation of a virtual plugin is made. Must be set in conjunction with provides. |
|
val pluginDependencies: MutableSet<String>
A collection of the names of all JOSM plugins that must be installed for this JOSM plugin to work |
|
var provides: String?
The name of a virtual plugin for which this plugin is a native implementation. Must be set in conjunction with platform. |
|
var website: URL?
A URL pointing to a web resource describing the plugin. |
fun createJosmPluginJarManifest(): Map<String, String>
Returns a map containing all manifest attributes, which are set. This map can then be fed into org.gradle.api.java.archives.Manifest.attributes. That's already done automatically by the gradle-josm-plugin, so you normally don't need to call this yourself. |
|
fun oldVersionDownloadLink(minJosmVersion: Int, pluginVersion: String, downloadURL: URL): Unit
Add a link to an earlier release of the plugin, that is compatible with JOSM versions, with which the current version is no longer compatible. |
|
fun setPlatform(name: String): Unit
Convenience method to set the platform using a String instead of a Platform enum value. |
|
fun translatedDescription(language: String, translatedDescription: String): Unit
Adds a translation of the plugin description for a certain language. |