[RN] Don't bundle fonts we don't use

This commit is contained in:
Saúl Ibarra Corretgé 2018-10-16 11:40:24 +02:00 committed by Zoltan Bettenbuk
parent 8e0bd36ece
commit 011a46ce2d
3 changed files with 20 additions and 3 deletions

View File

@ -114,11 +114,10 @@ android.libraryVariants.all { def variant ->
def assetsDir = variant.mergeAssets.outputDir
variant.mergeAssets.doLast {
// Bundle fonts in react-native-vector-icons
// Bundle fonts
//
copy {
from("${projectDir}/../../fonts/jitsi.ttf")
from("${projectDir}/../../node_modules/react-native-vector-icons/Fonts/")
into("${assetsDir}/fonts")
}

View File

@ -285,6 +285,7 @@
0BD906E31EC0C00300C8C18E /* Resources */,
0BCA49651EC4B77500B793EE /* Package React bundle */,
C7BC10B338C94EEB98048E64 /* [CP] Copy Pods Resources */,
0B64F7BE2175DFEA005009CD /* Remove unneeded fonts */,
);
buildRules = (
);
@ -350,6 +351,24 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
0B64F7BE2175DFEA005009CD /* Remove unneeded fonts */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "Remove unneeded fonts";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# We need to manually do this because react-native-vecotr-icons lists fonts as resources in the Pod spec file\n# so they are automatically added.\n\nshopt -s extglob\n\nrm -f ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/!(jitsi).ttf\n";
};
0BCA49651EC4B77500B793EE /* Package React bundle */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;

View File

@ -20,7 +20,6 @@
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>JitsiMeetFonts</key>
<array>
<string>FontAwesome.ttf</string>
<string>jitsi.ttf</string>
</array>
<key>LSApplicationQueriesSchemes</key>