Browse Source

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 8 years ago
parent
commit
ecb4339384
4 changed files with 20 additions and 1658 deletions
  1. 3
    0
      .gitignore
  2. 5
    0
      example/android/app/build.gradle
  3. 0
    1658
      example/android/app/src/main/assets/editor.html
  4. 12
    0
      htmlCopy.gradle

+ 3
- 0
.gitignore View File

@@ -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 View File

@@ -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
File diff suppressed because it is too large
View File


+ 12
- 0
htmlCopy.gradle View File

@@ -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
+}