Skip to content

Commit

Permalink
SpatiaLite natives publishing artifacts, closes mapsforge#849
Browse files Browse the repository at this point in the history
  • Loading branch information
devemux86 committed Jul 2, 2016
1 parent 02012f0 commit f069472
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 5 deletions.
3 changes: 2 additions & 1 deletion docs/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

## New since 0.6.1

- Internal render themes own module [#848](https://github.com/mapsforge/mapsforge/issues/848)
- Allow resources without location prefixes in render themes [#847](https://github.com/mapsforge/mapsforge/issues/847)
- Deprecate water tiles rendering [#640](https://github.com/mapsforge/mapsforge/issues/640)
- Internal render themes own module [#848](https://github.com/mapsforge/mapsforge/issues/848)
- SpatiaLite natives publishing artifacts [#849](https://github.com/mapsforge/mapsforge/issues/849)
- Drop of `dev` branch
- Many other minor improvements and bug fixes
- [Solved issues](https://github.com/mapsforge/mapsforge/issues?q=is%3Aissue+is%3Aclosed+milestone%3A0.6.2)
Expand Down
2 changes: 1 addition & 1 deletion docs/Integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ compile 'org.mapsforge:mapsforge-poi-android:0.6.1'
compile 'org.mapsforge:spatialite-android:0.6.1'
```

You'll need also the SpatiaLite native library [files](../spatialite-android/libs).
You'll need also the SpatiaLite native library [files](../spatialite-android/natives/lib).

#### 2.3 Java
```groovy
Expand Down
Empty file added mapsforge-core/build.gradle
Empty file.
2 changes: 1 addition & 1 deletion mapsforge-samples-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ android {

sourceSets {
main {
jniLibs.srcDirs = ['../spatialite-android/libs']
jniLibs.srcDirs = ["${rootDir}/spatialite-android/natives/lib"]
}
androidTest {
java.srcDirs = ['src/androidTest']
Expand Down
2 changes: 1 addition & 1 deletion mapsforge-samples-android/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<resourceDirectory>${basedir}/res</resourceDirectory>
<assetsDirectory>${basedir}/assets</assetsDirectory>
<androidManifestFile>${basedir}/AndroidManifest.xml</androidManifestFile>
<nativeLibrariesDirectory>../spatialite-android/libs</nativeLibrariesDirectory>
<nativeLibrariesDirectory>${rootDirectory}/spatialite-android/natives/lib</nativeLibrariesDirectory>
</configuration>
<extensions>true</extensions>
</plugin>
Expand Down
11 changes: 10 additions & 1 deletion spatialite-android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
dependencies {
android.libraryVariants.all { variant ->
def name = variant.buildType.name
if (name.equals("debug")) {
print "Skipping debug jar"
return; // Skip debug builds.
}
def task = project.tasks.create "nativesJar${name.capitalize()}", Jar
task.classifier = 'natives'
task.from('natives')
artifacts.add('archives', task);
}
File renamed without changes.
18 changes: 18 additions & 0 deletions spatialite-android/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,24 @@
</dex>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>natives-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>natives</classifier>
<classesDirectory>${basedir}/natives</classesDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit f069472

Please sign in to comment.