From db791779d5e727ee2fcc9cbfb66033ed2fdd6ae7 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Thu, 10 Nov 2016 15:26:31 +0100 Subject: [PATCH] Add google play servie support for free osmand and only for published on google play version --- .../net/osmand/binary/BinaryInspector.java | 4 +- OsmAnd/build.gradle | 6 +++ OsmAnd/google-services.json | 42 +++++++++++++++++++ build.gradle | 1 + 4 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 OsmAnd/google-services.json diff --git a/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java b/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java index e4400a70aa..ef9ccd4a7d 100644 --- a/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java +++ b/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java @@ -73,9 +73,9 @@ public class BinaryInspector { if ("test".equals(args[0])) { in.inspector(new String[] { // "-vpoi", - "-vmap", "-vmapobjects", // "-vmapcoordinates", +// "-vmap", "-vmapobjects", // "-vmapcoordinates", // "-vrouting", -// "-vtransport", + "-vtransport", // "-vaddress", "-vcities","-vstreetgroups", // "-vstreets", "-vbuildings", "-vintersections", // "-lang=ru", diff --git a/OsmAnd/build.gradle b/OsmAnd/build.gradle index 41addb6add..0791556ab6 100644 --- a/OsmAnd/build.gradle +++ b/OsmAnd/build.gradle @@ -352,6 +352,8 @@ repositories { dependencies { compile project(path: ':OsmAnd-java', configuration: 'android') + + // compile project(':eclipse-compile:design') // compile project(':eclipse-compile:cardview') // compile project(':eclipse-compile:gridlayout') @@ -366,3 +368,7 @@ dependencies { qtcoreCompile "net.osmand:OsmAndCore_androidNativeRelease:0.1-SNAPSHOT@aar" qtcoreCompile "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@aar" } +if(System.getenv("APP_FEATURES") && System.getenv("APP_FEATURES").contains("+play_market") && + System.getenv("PACKAGE_TO_BUILT").equals("net.osmand")) { + apply plugin: 'com.google.gms.google-services' +} diff --git a/OsmAnd/google-services.json b/OsmAnd/google-services.json new file mode 100644 index 0000000000..6f57944314 --- /dev/null +++ b/OsmAnd/google-services.json @@ -0,0 +1,42 @@ +{ + "project_info": { + "project_number": "521675454867", + "firebase_url": "https://osmand-1e236.firebaseio.com", + "project_id": "osmand-1e236", + "storage_bucket": "osmand-1e236.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:521675454867:android:be0477f14dc015f4", + "android_client_info": { + "package_name": "net.osmand" + } + }, + "oauth_client": [ + { + "client_id": "521675454867-ttjur3617a74qj0a9rkbkbcjavvuebjp.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyBMaRMiPY-mS3J_-aX30sRBFB-WGIm-M-U" + } + ], + "services": { + "analytics_service": { + "status": 1 + }, + "appinvite_service": { + "status": 1, + "other_platform_oauth_client": [] + }, + "ads_service": { + "status": 2 + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/build.gradle b/build.gradle index a9a0ffed03..82ebb68949 100644 --- a/build.gradle +++ b/build.gradle @@ -4,6 +4,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:2.1.3' + classpath 'com.google.gms:google-services:3.0.0' } }