Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
devemux86 committed Jun 19, 2024
1 parent 2b0ba75 commit 086ebdf
Show file tree
Hide file tree
Showing 9 changed files with 226 additions and 272 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
Expand All @@ -24,9 +24,3 @@ jobs:
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Publish
if: github.event_name != 'pull_request'
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: ./gradlew -PSONATYPE_USERNAME="$SONATYPE_USERNAME" -PSONATYPE_PASSWORD="$SONATYPE_PASSWORD" publish
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[![Maven Central](https://img.shields.io/maven-central/v/org.mapsforge/vtm.svg)](https://repo1.maven.org/maven2/org/mapsforge/)
[![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](http://www.gnu.org/licenses/lgpl-3.0)

# V™
Expand Down
4 changes: 3 additions & 1 deletion docs/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
## New since 0.21.0

- `vtm-themes` change package [#1130](https://github.com/mapsforge/vtm/issues/1130)
- Enable `vtm-jeo`
- Disable `vtm-theme-comparator`
- Minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.22.0)

Expand All @@ -13,7 +15,7 @@
- Line style `transparent` option [#1100](https://github.com/mapsforge/vtm/pull/1100)
- Canvas adapter: line scale option [#1075](https://github.com/mapsforge/vtm/pull/1075)
- Disable `vtm-app`
- Disable `vtm-web` [#1110](https://github.com/mapsforge/vtm/issues/1110)
- Disable `vtm-web`, `vtm-web-app` [#1110](https://github.com/mapsforge/vtm/issues/1110)
- Minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/vtm/issues?q=is%3Aclosed+milestone%3A0.21.0)

Expand Down
134 changes: 47 additions & 87 deletions docs/Integration.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,44 @@
# Integration guide

This article describes how to integrate the library in your project, with Gradle / Maven / Jars or SNAPSHOT builds.
This article describes how to integrate the library in your project.

Current version is [![Maven Central](https://img.shields.io/maven-central/v/org.mapsforge/vtm.svg)](https://repo1.maven.org/maven2/org/mapsforge/)

## Gradle
```groovy
repositories {
maven { url 'https://jitpack.io' }
}
```

### Core
```groovy
implementation 'org.mapsforge:vtm:[CURRENT-VERSION]'
implementation 'org.mapsforge:vtm-themes:[CURRENT-VERSION]'
implementation 'com.github.mapsforge.vtm:vtm:[CURRENT-VERSION]'
implementation 'com.github.mapsforge.vtm:vtm-themes:[CURRENT-VERSION]'
implementation 'org.slf4j:slf4j-api:1.7.28'
```

### Android

```groovy
runtimeOnly 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-armeabi-v7a'
runtimeOnly 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-arm64-v8a'
runtimeOnly 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-x86'
runtimeOnly 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-x86_64'
implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]'
runtimeOnly 'com.github.mapsforge.vtm:vtm-android:[CURRENT-VERSION]:natives-armeabi-v7a'
runtimeOnly 'com.github.mapsforge.vtm:vtm-android:[CURRENT-VERSION]:natives-arm64-v8a'
runtimeOnly 'com.github.mapsforge.vtm:vtm-android:[CURRENT-VERSION]:natives-x86'
runtimeOnly 'com.github.mapsforge.vtm:vtm-android:[CURRENT-VERSION]:natives-x86_64'
implementation 'com.github.mapsforge.vtm:vtm-android:[CURRENT-VERSION]'
implementation 'com.caverock:androidsvg:1.4'
```

### Android (libGDX)

```groovy
runtimeOnly 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-armeabi-v7a'
runtimeOnly 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-arm64-v8a'
runtimeOnly 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-x86'
runtimeOnly 'org.mapsforge:vtm-android:[CURRENT-VERSION]:natives-x86_64'
implementation 'org.mapsforge:vtm-android:[CURRENT-VERSION]'
implementation 'org.mapsforge:vtm-gdx:[CURRENT-VERSION]'
runtimeOnly 'org.mapsforge:vtm-android-gdx:[CURRENT-VERSION]:natives-armeabi-v7a'
runtimeOnly 'org.mapsforge:vtm-android-gdx:[CURRENT-VERSION]:natives-arm64-v8a'
runtimeOnly 'org.mapsforge:vtm-android-gdx:[CURRENT-VERSION]:natives-x86'
runtimeOnly 'org.mapsforge:vtm-android-gdx:[CURRENT-VERSION]:natives-x86_64'
implementation 'org.mapsforge:vtm-android-gdx:[CURRENT-VERSION]'
runtimeOnly 'com.github.mapsforge.vtm:vtm-android:[CURRENT-VERSION]:natives-armeabi-v7a'
runtimeOnly 'com.github.mapsforge.vtm:vtm-android:[CURRENT-VERSION]:natives-arm64-v8a'
runtimeOnly 'com.github.mapsforge.vtm:vtm-android:[CURRENT-VERSION]:natives-x86'
runtimeOnly 'com.github.mapsforge.vtm:vtm-android:[CURRENT-VERSION]:natives-x86_64'
implementation 'com.github.mapsforge.vtm:vtm-android:[CURRENT-VERSION]'
implementation 'com.github.mapsforge.vtm:vtm-gdx:[CURRENT-VERSION]'
runtimeOnly 'com.github.mapsforge.vtm:vtm-android-gdx:[CURRENT-VERSION]:natives-armeabi-v7a'
runtimeOnly 'com.github.mapsforge.vtm:vtm-android-gdx:[CURRENT-VERSION]:natives-arm64-v8a'
runtimeOnly 'com.github.mapsforge.vtm:vtm-android-gdx:[CURRENT-VERSION]:natives-x86'
runtimeOnly 'com.github.mapsforge.vtm:vtm-android-gdx:[CURRENT-VERSION]:natives-x86_64'
implementation 'com.github.mapsforge.vtm:vtm-android-gdx:[CURRENT-VERSION]'
implementation 'com.badlogicgames.gdx:gdx:1.11.0'
implementation 'com.badlogicgames.gdx:gdx-backend-android:1.11.0'
implementation 'com.caverock:androidsvg:1.4'
Expand All @@ -46,60 +49,63 @@ implementation 'com.caverock:androidsvg:1.4'
Detailed iOS instructions can be found [here](ios.md).

### Desktop

```groovy
implementation 'org.mapsforge:vtm-gdx:[CURRENT-VERSION]'
implementation 'org.mapsforge:vtm-desktop:[CURRENT-VERSION]'
runtimeOnly 'org.mapsforge:vtm-desktop:[CURRENT-VERSION]:natives-linux'
runtimeOnly 'org.mapsforge:vtm-desktop:[CURRENT-VERSION]:natives-osx'
runtimeOnly 'org.mapsforge:vtm-desktop:[CURRENT-VERSION]:natives-windows'
implementation 'com.github.mapsforge.vtm:vtm-gdx:[CURRENT-VERSION]'
implementation 'com.github.mapsforge.vtm:vtm-desktop:[CURRENT-VERSION]'
runtimeOnly 'com.github.mapsforge.vtm:vtm-desktop:[CURRENT-VERSION]:natives-linux'
runtimeOnly 'com.github.mapsforge.vtm:vtm-desktop:[CURRENT-VERSION]:natives-osx'
runtimeOnly 'com.github.mapsforge.vtm:vtm-desktop:[CURRENT-VERSION]:natives-windows'
implementation 'com.badlogicgames.gdx:gdx:1.11.0'
runtimeOnly 'com.badlogicgames.gdx:gdx-platform:1.11.0:natives-desktop'
implementation 'guru.nidi.com.kitfox:svgSalamander:1.1.3'
implementation 'net.sf.kxml:kxml2:2.3.0'
```

### Desktop (LWJGL)
#### LWJGL 2

```groovy
implementation 'org.mapsforge:vtm-desktop-lwjgl:[CURRENT-VERSION]'
implementation 'com.github.mapsforge.vtm:vtm-desktop-lwjgl:[CURRENT-VERSION]'
implementation 'com.badlogicgames.gdx:gdx-backend-lwjgl:1.11.0'
implementation 'org.lwjgl.lwjgl:lwjgl:2.9.3'
runtimeOnly 'org.lwjgl.lwjgl:lwjgl-platform:2.9.3:natives-linux'
runtimeOnly 'org.lwjgl.lwjgl:lwjgl-platform:2.9.3:natives-osx'
runtimeOnly 'org.lwjgl.lwjgl:lwjgl-platform:2.9.3:natives-windows'
```

### Desktop (LWJGL 3)
#### LWJGL 3

```groovy
implementation 'org.mapsforge:vtm-desktop-lwjgl3:[CURRENT-VERSION]'
implementation 'com.github.mapsforge.vtm:vtm-desktop-lwjgl3:[CURRENT-VERSION]'
implementation 'com.badlogicgames.gdx:gdx-backend-lwjgl3:1.11.0'
implementation 'org.lwjgl:lwjgl:3.3.1'
runtimeOnly 'org.lwjgl:lwjgl:3.3.1:natives-linux'
runtimeOnly 'org.lwjgl:lwjgl:3.3.1:natives-macos'
runtimeOnly 'org.lwjgl:lwjgl:3.3.1:natives-windows'
```

### JTS geometries
### JTS overlays

```groovy
implementation 'org.mapsforge:vtm-jts:[CURRENT-VERSION]'
implementation 'com.github.mapsforge.vtm:vtm-jts:[CURRENT-VERSION]'
// https://github.com/locationtech/jts/issues/145
implementation 'org.locationtech.jts:jts-core:1.15.1'
```

### Online tiles

```groovy
implementation 'org.mapsforge:vtm-http:[CURRENT-VERSION]'
implementation 'com.github.mapsforge.vtm:vtm-http:[CURRENT-VERSION]'
// https://github.com/square/okhttp/issues/4481
implementation 'com.squareup.okhttp3:okhttp:3.12.13'
implementation 'com.squareup.okio:okio:1.15.0'
```

### MBTiles (Android)
### MBTiles

```groovy
implementation 'org.mapsforge:vtm-android-mvt:[CURRENT-VERSION]'
implementation 'org.mapsforge:vtm-mvt:[CURRENT-VERSION]'
implementation 'com.github.mapsforge.vtm:vtm-android-mvt:[CURRENT-VERSION]'
implementation 'com.github.mapsforge.vtm:vtm-mvt:[CURRENT-VERSION]'
implementation 'com.google.protobuf:protobuf-java:3.6.1'
implementation 'com.wdtinc:mapbox-vector-tile:3.1.0'
// https://github.com/locationtech/jts/issues/145
Expand All @@ -109,7 +115,7 @@ implementation 'org.locationtech.jts:jts-core:1.15.1'
### Mapbox vector tiles

```groovy
implementation 'org.mapsforge:vtm-mvt:[CURRENT-VERSION]'
implementation 'com.github.mapsforge.vtm:vtm-mvt:[CURRENT-VERSION]'
implementation 'com.google.protobuf:protobuf-java:3.6.1'
implementation 'com.wdtinc:mapbox-vector-tile:3.1.0'
// https://github.com/locationtech/jts/issues/145
Expand All @@ -119,7 +125,7 @@ implementation 'org.locationtech.jts:jts-core:1.15.1'
### GeoJSON vector tiles

```groovy
implementation 'org.mapsforge:vtm-json:[CURRENT-VERSION]'
implementation 'com.github.mapsforge.vtm:vtm-json:[CURRENT-VERSION]'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.9.9'
implementation 'com.fasterxml.jackson.core:jackson-core:2.9.9'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.9'
Expand All @@ -128,54 +134,8 @@ implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.9'
### jeo (indoor maps)

```groovy
repositories {
maven { url 'https://jitpack.io' }
}
implementation 'org.mapsforge:vtm-jeo:[CURRENT-VERSION]'
implementation 'com.github.mapsforge.vtm:vtm-jeo:[CURRENT-VERSION]'
implementation('com.github.jeo.jeo:jeo-carto:master-SNAPSHOT') {
exclude group: 'org.slf4j', module: 'slf4j-jdk14'
}
```

## Snapshots

We publish SNAPSHOT builds to Sonatype OSS Repository Hosting.

You need to add the repository:
```groovy
repositories {
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
```

And declare the dependencies like:
```groovy
implementation 'org.mapsforge:vtm:master-SNAPSHOT'
...
```

For checking latest snapshot on every build:
```groovy
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
```

## Maven

The dependencies for Maven are declared in a similar way. For example:

```xml
<dependency>
<groupId>org.mapsforge</groupId>
<artifactId>vtm</artifactId>
<version>[CURRENT-VERSION]</version>
</dependency>
```

## Jars

You can find release and snapshot jars (regular and with dependencies) in [Maven Central](https://repo1.maven.org/maven2/org/mapsforge/) and [Sonatype OSS Repository Hosting](https://oss.sonatype.org/content/repositories/snapshots/org/mapsforge/).

Third party jars can be found at their respective sites or in Maven Central repository.
5 changes: 2 additions & 3 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url 'https://jitpack.io' }
}
}
Expand All @@ -30,14 +29,14 @@ include ':vtm-gdx-poi3d'
include ':vtm-http'
include ':vtm-ios'
include ':vtm-ios-example'
//include ':vtm-jeo'
include ':vtm-jeo'
include ':vtm-json'
include ':vtm-jts'
include ':vtm-models'
include ':vtm-mvt'
include ':vtm-playground'
//include ':vtm-tests'
include ':vtm-theme-comparator'
//include ':vtm-theme-comparator'
include ':vtm-themes'
//include ':vtm-web'
//include ':vtm-web-app'
Expand Down
4 changes: 2 additions & 2 deletions vtm-android-example/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
<activity
android:name=".GdxPoi3DActivity"
android:configChanges="keyboardHidden|orientation|screenSize" />
<!--<activity
<activity
android:name=".JeoIndoorActivity"
android:configChanges="keyboardHidden|orientation|screenSize" />-->
android:configChanges="keyboardHidden|orientation|screenSize" />
<activity
android:name=".LineTexActivity"
android:configChanges="keyboardHidden|orientation|screenSize" />
Expand Down
4 changes: 2 additions & 2 deletions vtm-android-example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dependencies {
implementation project(':vtm-android-mvt')
implementation project(':vtm-extras')
implementation project(':vtm-http')
//implementation project(':vtm-jeo')
implementation project(':vtm-jeo')
implementation project(':vtm-json')
implementation project(':vtm-jts')
implementation project(':vtm-mvt')
Expand All @@ -16,7 +16,7 @@ dependencies {
implementation project(':vtm-gdx')
implementation project(':vtm-gdx-poi3d')

implementation 'org.mapsforge:mapsforge-poi-android:master-SNAPSHOT'
implementation 'com.github.mapsforge.mapsforge:mapsforge-poi-android:master-SNAPSHOT'
}

android {
Expand Down
Loading

0 comments on commit 086ebdf

Please sign in to comment.