Skip to content
Nicolas Raoul edited this page Nov 14, 2024 · 12 revisions

Good news: developers do not need to read this. These instructions are mainly intended for the maintainer (currently Nicolas Raoul) and for contributors. For instructions on how to use this library in your software, see the project's homepage.

How to build the library

  1. In case you modified countries.xcf, generate the gray map as described in the section below.
  2. Run ./gradlew build or ./build.sh. If it finishes successfully, it means that the unit tests are passing.

How to generate the gray map

  • Open countries.xcf in Gimp
  • Image > Duplicate
  • Colors > Components > Extract component
  • Select component RGB Red
  • File > Export As
  • Filename: data/countries-8bitgray.png
  • Click the Export button
  • Select 8bpc GRAY, disable all checkboxes, set the compression level to the highest possible (9)
  • Click the Export button

When modifying the map, you can modify colors to see better, as long as you keep the RGB red component.

Release procedure

  1. If you do not yet have a GPG key or lost it, create one:
$ brew install gnupg2
$ gpg --gen-key
$ gpg --list-keys
$ gpg --export-secret-keys > ~/.gnupg/secring.gpg
$ gpg --keyserver hkp://keyserver.ubuntu.com --send-keys <... the last 8 digits of the key displayed by gpg --list-keys ...>

Wait until reflected by gpg --keyserver hkp://keyserver.ubuntu.com --search-keys <your email>.

  1. If not done yet, in the project's directory create a gradle.properties file containing:
signing.keyId=<... the last 8 digits of the key displayed by gpg --list-keys ...>
signing.password=<... the GPG password you chose ...>
signing.secretKeyRingFile=/Users/nicolasraoul/.gnupg/secring.gpg
ossrhToken=...
ossrhTokenPassword=...

The OSSRH token and password can be retrieved (or even reset) by me at https://s01.oss.sonatype.org (click on username in the top right, click Profile, select User Token in the dropdown, click Access User Token).

  1. Build per the instructions above.
  2. Increase version number in build.gradle, run.sh, README.md.
  3. Run ./gradlew publish.
  4. At https://s01.oss.sonatype.org/#stagingRepositories there will be a new item in open state. click Close, click Refresh, wait a few minutes, click Release.
  5. Similarly modify and release the Android version.
  6. Update the library version number in the two sample projects.

Info

Source image: https://commons.wikimedia.org/wiki/File:Internationalwaters.png Kvasir Creative Commons Attribution-Share Alike 3.0 Unported, 2.5 Generic, 2.0 Generic and 1.0 Generic license.

Projection: https://en.wikipedia.org/wiki/Equirectangular_projection with phi0=0 and lambda0=0

Useful maps: https://farm8.staticflickr.com/7292/10134658063_fca4fc3da2_o.jpg https://i.imgur.com/lzm0fWN.png

Clone this wiki locally