Procházet zdrojové kódy

added a gradle script to perform the copy of editor.html to the Android application assets folder. removed the static editor from this folder.

Artal Druk před 8 roky
rodič
revize
ecb4339384

+ 3
- 0
.gitignore Zobrazit soubor

@@ -27,6 +27,7 @@ project.xcworkspace
27 27
 .idea
28 28
 .gradle
29 29
 local.properties
30
+*.iml
30 31
 
31 32
 # node.js
32 33
 #
@@ -42,3 +43,5 @@ android/*.iml
42 43
 android/app/*.iml
43 44
 yarn.lock
44 45
 *.log
46
+
47
+example/android/app/src/main/assets/editor.html

+ 5
- 0
example/android/app/build.gradle Zobrazit soubor

@@ -138,3 +138,8 @@ task copyDownloadableDepsToLibs(type: Copy) {
138 138
   from configurations.compile
139 139
   into 'libs'
140 140
 }
141
+
142
+project.afterEvaluate {
143
+    apply from: '../../node_modules/react-native-ZSSRichTextEditor/htmlCopy.gradle';
144
+    copyEditorHtmlToAppAssets(file('../../node_modules/react-native-ZSSRichTextEditor'))
145
+}

+ 0
- 1658
example/android/app/src/main/assets/editor.html
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 12
- 0
htmlCopy.gradle Zobrazit soubor

@@ -0,0 +1,12 @@
1
+ext {
2
+ copyEditorHtmlToAppAssets = { dir ->
3
+    def fromF = new File(dir, '/src/editor.html');
4
+    def toF = new File(projectDir, '/src/main/assets/');
5
+    println ('Copying ZSSRichTextEditor html asset file from ' + fromF.toString() + ' to ' + toF.toString());
6
+
7
+    copy  {
8
+      from fromF
9
+      into toF
10
+    }
11
+  }
12
+}