File: Integration.md

package info (click to toggle)
mapsforge 0.17.0%2Bdfsg.1-2
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 40,772 kB
  • sloc: java: 43,307; xml: 6,707; sh: 140; makefile: 23
file content (96 lines) | stat: -rw-r--r-- 2,798 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Integration guide

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

Current version is [![Maven Central](https://img.shields.io/maven-central/v/org.mapsforge/mapsforge-core.svg)](https://search.maven.org/search?q=g:org.mapsforge)

## Gradle

### Map

#### Core
```groovy
implementation 'org.mapsforge:mapsforge-core:[CURRENT-VERSION]'
implementation 'org.mapsforge:mapsforge-map:[CURRENT-VERSION]'
implementation 'org.mapsforge:mapsforge-map-reader:[CURRENT-VERSION]'
implementation 'org.mapsforge:mapsforge-themes:[CURRENT-VERSION]'
implementation 'net.sf.kxml:kxml2:2.3.0'
```

#### Android
```groovy
implementation 'org.mapsforge:mapsforge-map-android:[CURRENT-VERSION]'
implementation 'com.caverock:androidsvg:1.4'
```

#### Desktop
```groovy
implementation 'org.mapsforge:mapsforge-map-awt:[CURRENT-VERSION]'
implementation 'com.formdev:svgSalamander:1.1.2.4'
```

### POI

#### Core
```groovy
implementation 'org.mapsforge:mapsforge-core:[CURRENT-VERSION]'
implementation 'org.mapsforge:mapsforge-poi:[CURRENT-VERSION]'
```

#### Android
```groovy
implementation 'org.mapsforge:mapsforge-poi-android:[CURRENT-VERSION]'
implementation 'org.mapsforge:sqlite-android:[CURRENT-VERSION]'
implementation 'org.mapsforge:sqlite-android:[CURRENT-VERSION]:natives-armeabi-v7a'
implementation 'org.mapsforge:sqlite-android:[CURRENT-VERSION]:natives-arm64-v8a'
implementation 'org.mapsforge:sqlite-android:[CURRENT-VERSION]:natives-x86'
implementation 'org.mapsforge:sqlite-android:[CURRENT-VERSION]:natives-x86_64'
```

#### Desktop
```groovy
implementation 'org.mapsforge:mapsforge-poi-awt:[CURRENT-VERSION]'
implementation 'org.xerial:sqlite-jdbc:3.28.0'
```

## 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:mapsforge-core: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>mapsforge-core</artifactId>
    <version>[CURRENT-VERSION]</version>
</dependency>
```

## Jars

You can find release and snapshot jars (regular and with dependencies) in [Maven Central](https://search.maven.org/search?q=g: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.