Browse Source

android: don't read Dropbox key from iOS files

master
Saúl Ibarra Corretgé 6 years ago
parent
commit
d5a43426ed
1 changed files with 4 additions and 12 deletions
  1. 4
    12
      android/app/build.gradle

+ 4
- 12
android/app/build.gradle View File

@@ -91,18 +91,10 @@ gradle.projectsEvaluated {
91 91
     // Dropbox integration
92 92
     //
93 93
 
94
-    def plistParser = new XmlSlurper(
95
-            /* validating */ false,
96
-            /* namespaceAware */ false,
97
-            /* allowDocTypeDeclaration */ true)
98
-    plistParser.setFeature(
99
-            'http://apache.org/xml/features/nonvalidating/load-external-dtd',
100
-            false)
101
-    def plist = plistParser.parse('../ios/app/src/Info.plist')
102
-    def dropboxScheme = plist.dict.array.dict.array.string.find { string ->
103
-        string.text().startsWith('db-')
94
+    def dropboxAppKey
95
+    if (project.file('dropbox.key').exists()) {
96
+        dropboxAppKey = project.file('dropbox.key').text.trim() - 'db-'
104 97
     }
105
-    def dropboxAppKey = dropboxScheme?.text() - 'db-'
106 98
 
107 99
     if (dropboxAppKey) {
108 100
         android.defaultConfig.resValue('string', 'dropbox_app_key', "${dropboxAppKey}")
@@ -118,7 +110,7 @@ gradle.projectsEvaluated {
118 110
               <category android:name="android.intent.category.DEFAULT" />
119 111
               <data android:scheme="db-${dropboxAppKey}" />
120 112
             </intent-filter>
121
-          </activity>""";
113
+          </activity>"""
122 114
 
123 115
         android.applicationVariants.all { variant ->
124 116
             variant.outputs.each { output ->

Loading…
Cancel
Save