Skip to content

Commit

Permalink
Update remaining code samples and documentation links for https://git…
Browse files Browse the repository at this point in the history
  • Loading branch information
floscher committed Jan 29, 2021
1 parent 81699bb commit 8beb3a6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions docs/Dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

## on JOSM plugins
If the dependencies are available as JOSM plugins, simply put the following in your `build.gradle`:
```gradle
```kotlin
josm.manifest {
pluginDependencies << 'plugin1' << 'plugin2'
pluginDependencies += setOf("plugin1", "plugin2")
}
```
Replace `plugin1` and `plugin2` with the JOSM plugins you depend on, how many plugins you specify doesn't matter, it's possible to specify only one or more than the two above. You also don't need to specify transitive dependencies.
Expand All @@ -13,10 +13,10 @@ 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
```kotlin
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
// Define any additional repositories here (see https://docs.gradle.org/6.8.1/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/plugin/plugin/org.openstreetmap.josm.gradle.plugin.config/-josm-plugin-extension/index.html#org.openstreetmap.josm.gradle.plugin.config/JosmPluginExtension/repositories/#/PointingToDeclaration/
}
dependencies {
packIntoJar("groupId:artifactId:1.2.3")
Expand Down
2 changes: 1 addition & 1 deletion docs/GithubReleases.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ version="0.0.5" // the current release label
//
josm {
github { // for more configuration options, see https://floscher.gitlab.io/gradle-josm-plugin/kdoc/latest/gradle-josm-plugin/org.openstreetmap.josm.gradle.plugin.config/-github-config/index.html
github { // for more configuration options, see https://floscher.gitlab.io/gradle-josm-plugin/kdoc/latest/plugin/plugin/org.openstreetmap.josm.gradle.plugin.config/-github-config/index.html
repositoryOwner = "a-github-user"
repositoryName = "my-repo"
// the access token is configured either through the environment variable `GITHUB_ACCESS_TOKEN`,
Expand Down
10 changes: 5 additions & 5 deletions docs/I18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If you wanted, you could even mix these formats, but that's not recommended.

### Using translated *.po files

Put the files in the directory `src/$sourceSetName/po`, then build normally and the files should be picked up.
Put the files in the directory `src/$sourceSetName/po` (e.g. `src/main/po`), then build normally and the files should be picked up.

> **Note:** If you use `*.po` files, you'll need `xgettext` to build your JOSM plugin with internationalisation. Everyone who does not have `xgettext` installed can still build the project, but these builds are then not internationalised.
Expand All @@ -29,17 +29,17 @@ Put the files in the directory `src/$sourceSetName/lang`, then build normally an

If you want to put your translated files in another location, add the relevant parts of the following snippet to your `build.gradle` and modify it according to your needs:

```gradle
```kotlin
sourceSets {
main { // you can do that for any source set, doesn't have to be `main`
po {
srcDirs = ["new/po/source/directory"]
setSrcDirs(setOf("new/po/source/directory"))
}
mo {
srcDirs = ["new/mo/source/directory"]
setSrcDirs(setOf("new/mo/source/directory"))
}
lang {
srcDirs = ["new/lang/source/directory"]
setSrcDirs(setOf("new/lang/source/directory"))
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/test/resources/demo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ josm {
iconPath = "path/to/my/icon.svg"
loadEarly = false
loadPriority = 50
pluginDependencies.addAll(setOf("apache-commons", "apache-http"))
pluginDependencies += setOf("apache-commons", "apache-http")
website = URL("https://example.org")
oldVersionDownloadLink(123, "1.2.0", URL("https://example.org/download/v1.2.0/MyAwesomePlugin.jar"))
oldVersionDownloadLink( 42, "1.0.0", URL("https://example.org/download/v1.0.0/MyAwesomePlugin.jar"))
Expand Down

0 comments on commit 8beb3a6

Please sign in to comment.