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
 .idea
27
 .idea
28
 .gradle
28
 .gradle
29
 local.properties
29
 local.properties
30
+*.iml
30
 
31
 
31
 # node.js
32
 # node.js
32
 #
33
 #
42
 android/app/*.iml
43
 android/app/*.iml
43
 yarn.lock
44
 yarn.lock
44
 *.log
45
 *.log
46
+
47
+example/android/app/src/main/assets/editor.html

+ 5
- 0
example/android/app/build.gradle View File

138
   from configurations.compile
138
   from configurations.compile
139
   into 'libs'
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

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