Skip to content

Commit

Permalink
Update docs before the new release
Browse files Browse the repository at this point in the history
  • Loading branch information
floscher committed Jun 16, 2018
1 parent 75ff5c7 commit 3f76bbe
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 12 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

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, getting 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!
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`](docs/Setup.md) 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](https://gitlab.com/floscher/gradle-josm-plugin/issues/new)!
* Or you can reach out via email: [incoming+floscher/gradle-josm-plugin@incoming.gitlab.com](mailto:incoming+floscher/gradle-josm-plugin@incoming.gitlab.com) (e-mails to this address will be published online as issues)
* Or you can reach out via email: `incoming+floscher/gradle-josm-plugin (at) incoming.gitlab.com`

## Getting started

Expand Down
8 changes: 6 additions & 2 deletions docs/Dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@ Replace `plugin1` and `plugin2` with the JOSM plugins you depend on, how many pl
If your plugin has dependencies to java libraries that are not available as JOSM plugin, but via Maven, then add the following to your `build.gradle`:

```gradle
repositories {
// Define any additional repositories here (see https://docs.gradle.org/4.8/userguide/declaring_repositories.html)
// For the repositories that are automatically available with the gradle-josm-plugin, see https://floscher.gitlab.io/gradle-josm-plugin/kdoc/latest/gradle-josm-plugin/org.openstreetmap.josm.gradle.plugin.config/-josm-plugin-extension/repositories.html
}
dependencies {
packIntoJar 'groupId:artifactId:1.2.3'
packIntoJar 'otherGroupId:otherArtifactId:42.0.0'
packIntoJar("groupId:artifactId:1.2.3")
packIntoJar("otherGroupId:otherArtifactId:42.0.0")
}
```

Expand Down
25 changes: 17 additions & 8 deletions docs/Tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ To see a list of available tasks, run `./gradlew tasks` in your project root and

> **Note:** Did you know? You can [abbreviate Gradle tasks](https://docs.gradle.org/4.8/userguide/command_line_interface.html#_task_name_abbreviation). E.g. for `runJosm` you could write `runJ` or even `rJ` as long as your abbreviation is not ambiguous.
## runJosm
## Group JOSM

### runJosm
```bash
./gradlew runJosm
```
Expand All @@ -22,35 +24,42 @@ Your plugin is automatically compiled and activated in that JOSM instance, if yo

Also all plugins that your plugin requires are automatically activated in that JOSM instance.

## cleanJosm
### cleanJosm
```bash
./gradlew cleanJosm
```
Deletes the `JOSM_HOME` directories located at `$projectDir/build/.josm/cache`, `$projectDir/build/.josm/pref` and `$projectDir/build/.josm/userdata`
that are used for the task `runJosm`.

## debugJosm
There are also the more specialized tasks `cleanJosmCache`, `cleanJosmPref` and `cleanJosmUserdata` to only delete the respective directory.

### debugJosm
```bash
./gradlew debugJosm
```
The same as `runJosm`, but this task has remote debugging over JDWP (Java Debug Wire Protocol) enabled and waits, until someone listens at the port specified in [the Setup documentation](./Setup.md).
This task fails if you have not specified, on which port you want to listen.

## minJosmVersionClasses
### compileJava_*
```bash
./gradlew minJosmVersionClasses
./gradlew compileJava_minJosm compileJava_testedJosm compileJava_latestJosm
```
By executing this task you try to compile against the minimum JOSM version that your plugin is compatible with, according to your manifest (see `josm.manifest.minJosmVersion` in [the Setup documentation](./Setup.md)).
These are three variants of the `compileJava` task, which compile against special versions of JOSM:
* the minimum JOSM version that your plugin is compatible with, according to your manifest (see `josm.manifest.minJosmVersion` in [the Setup documentation](./Setup.md)).
* the JOSM version that is currently available for download as `josm-tested.jar`
* the JOSM version that is currently available for download as `josm-latest.jar`

## localDist
### localDist
```bash
./gradlew localDist
```
This task creates a 'plugin site' inside your `build/localDist/` directory. Point any JOSM instance at the URL, that this task reports to you and you can "download" your plugin from your `build/` directory into that JOSM instance.

The task `runJosm` is the preferred (and easier) method to test drive your plugin, but in some circumstances you might not want to test in an isolated environment, but in your normal JOSM setup. If that's the case, this task is for you.

## generatePot
## Group JOSM-i18n

### generatePot
```bash
./gradlew generatePot
```
Expand Down

0 comments on commit 3f76bbe

Please sign in to comment.