From b99478b3076534ee6b65e1e422124192aede3630 Mon Sep 17 00:00:00 2001
From: Frantisek Simon <frantisek.simon@nic.cz>
Date: Tue, 26 Jan 2016 13:12:46 +0100
Subject: [PATCH] #78 Preparation for REST server auth

---
 core/build.gradle                                             | 1 +
 core/src/cz/nic/tablexia/sync/RestSynchronizationService.java | 1 +
 2 files changed, 2 insertions(+)

diff --git a/core/build.gradle b/core/build.gradle
index cd56d4284..db2902c3e 100644
--- a/core/build.gradle
+++ b/core/build.gradle
@@ -37,6 +37,7 @@ task writeTablexiaBuildConfig {
                 "    public final static String VERSION_NAME = \"${tablexiaVersionName}\";\n" +
                 "    public final static String ASSETS_CHECKSUM = \"${getMapConvertedToString(rootProject.ext.assetsChecksum)}\";\n" +
                 "    public final static String TABLEXIA_SERVER_ADDRESS = ${project.hasProperty('TABLEXIA_SERVER_ADDRESS') ? "\"$TABLEXIA_SERVER_ADDRESS\"" : "null"};\n" +
+                "    public final static String TABLEXIA_SERVER_SECRET = ${project.hasProperty('TABLEXIA_SERVER_SECRET') ? "\"$TABLEXIA_SERVER_SECRET\"" : "null"};\n" +
                 "    public final static String FLURRY_KEY = ${project.hasProperty('TABLEXIA_FLURRY_KEY') ? "\"$TABLEXIA_FLURRY_KEY\"" : "null"};\n" +
                 "\n" +
                 "}", BUILD_CONFIG_FILE_ENCODING)
diff --git a/core/src/cz/nic/tablexia/sync/RestSynchronizationService.java b/core/src/cz/nic/tablexia/sync/RestSynchronizationService.java
index 2895eeefe..4e04b295a 100644
--- a/core/src/cz/nic/tablexia/sync/RestSynchronizationService.java
+++ b/core/src/cz/nic/tablexia/sync/RestSynchronizationService.java
@@ -23,6 +23,7 @@ public class RestSynchronizationService {
 
     private static final String LOCALHOST_REST_URL  = "http://localhost:8080";
     public static final String  REST_URL            = TablexiaBuildConfig.TABLEXIA_SERVER_ADDRESS != null ? TablexiaBuildConfig.TABLEXIA_SERVER_ADDRESS : LOCALHOST_REST_URL;
+    public static final String  SECRET_KEY          = TablexiaBuildConfig.TABLEXIA_SERVER_SECRET;
 
     private HttpRequestBuilder builder;
     private Net.HttpResponseListener listener;
-- 
GitLab