diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8990656018..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -language: android - -# Work in progress. Repo should be used for initial checkout https://github.com/osmandapp/OsmAnd-manifest/blob/master/android_build.xml - -android: - components: - - tools - - platform-tools - - # The BuildTools version used by your project - - build-tools-27.0.3 - - android-27 - -script: ./gradlew test diff --git a/OsmAnd-java/build.gradle b/OsmAnd-java/build.gradle index 42b45a78f0..0b57c98947 100644 --- a/OsmAnd-java/build.gradle +++ b/OsmAnd-java/build.gradle @@ -1,5 +1,5 @@ apply plugin: 'java' - +apply plugin: 'maven-publish' configurations { android @@ -77,6 +77,14 @@ artifacts { android androidJar } +publishing { + publications { + maven(MavenPublication) { + artifactId "osmand-base" + from components.java + } + } +} dependencies { testImplementation 'junit:junit:4.12' diff --git a/OsmAnd/src/net/osmand/plus/OsmAndFormatter.java b/OsmAnd/src/net/osmand/plus/OsmAndFormatter.java index ce58e4d218..d58cf173e4 100644 --- a/OsmAnd/src/net/osmand/plus/OsmAndFormatter.java +++ b/OsmAnd/src/net/osmand/plus/OsmAndFormatter.java @@ -168,12 +168,13 @@ public class OsmAndFormatter { } public static String getFormattedAzimuth(float bearing, OsmandApplication app) { - int azimuth; - if (bearing < 0.0) { - azimuth = (int) (360 + bearing); - } else { - azimuth = (int) bearing; + while(bearing < -180.0) { + bearing += 360; } + while(bearing > 360.0) { + bearing -= 360; + } + int azimuth = (int) bearing; if (app.getSettings().ANGULAR_UNITS.get() == AngularConstants.MILLIRADS) { return (int) (azimuth * 17.4533) + " " + AngularConstants.MILLIRADS.getUnitSymbol(); diff --git a/build.gradle b/build.gradle index 76cd4dc0e5..deac60b991 100644 --- a/build.gradle +++ b/build.gradle @@ -14,6 +14,8 @@ buildscript { } allprojects { + group "net.osmand" + version "1.0" repositories { ivy {