Skip to content

Commit ecb4339

Browse files
committed
added a gradle script to perform the copy of editor.html to the Android application assets folder. removed the static editor from this folder.
1 parent 27cc519 commit ecb4339

File tree

4 files changed

+20
-1658
lines changed

4 files changed

+20
-1658
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ project.xcworkspace
2727
.idea
2828
.gradle
2929
local.properties
30+
*.iml
3031

3132
# node.js
3233
#
@@ -42,3 +43,5 @@ android/*.iml
4243
android/app/*.iml
4344
yarn.lock
4445
*.log
46+
47+
example/android/app/src/main/assets/editor.html

example/android/app/build.gradle

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

example/android/app/src/main/assets/editor.html

-1,658
This file was deleted.

htmlCopy.gradle

+12
Original file line numberDiff line numberDiff line change
@@ -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+
}

0 commit comments

Comments
 (0)