Browse Source

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

master
Saúl Ibarra Corretgé 7 years ago
parent
commit
011a46ce2d
3 changed files with 20 additions and 3 deletions
  1. 1
    2
      android/sdk/build.gradle
  2. 19
    0
      ios/sdk/sdk.xcodeproj/project.pbxproj
  3. 0
    1
      ios/sdk/src/Info.plist

+ 1
- 2
android/sdk/build.gradle View File

114
     def assetsDir = variant.mergeAssets.outputDir
114
     def assetsDir = variant.mergeAssets.outputDir
115
 
115
 
116
     variant.mergeAssets.doLast {
116
     variant.mergeAssets.doLast {
117
-        // Bundle fonts in react-native-vector-icons
117
+        // Bundle fonts
118
         //
118
         //
119
         copy {
119
         copy {
120
             from("${projectDir}/../../fonts/jitsi.ttf")
120
             from("${projectDir}/../../fonts/jitsi.ttf")
121
-            from("${projectDir}/../../node_modules/react-native-vector-icons/Fonts/")
122
             into("${assetsDir}/fonts")
121
             into("${assetsDir}/fonts")
123
         }
122
         }
124
 
123
 

+ 19
- 0
ios/sdk/sdk.xcodeproj/project.pbxproj View File

285
 				0BD906E31EC0C00300C8C18E /* Resources */,
285
 				0BD906E31EC0C00300C8C18E /* Resources */,
286
 				0BCA49651EC4B77500B793EE /* Package React bundle */,
286
 				0BCA49651EC4B77500B793EE /* Package React bundle */,
287
 				C7BC10B338C94EEB98048E64 /* [CP] Copy Pods Resources */,
287
 				C7BC10B338C94EEB98048E64 /* [CP] Copy Pods Resources */,
288
+				0B64F7BE2175DFEA005009CD /* Remove unneeded fonts */,
288
 			);
289
 			);
289
 			buildRules = (
290
 			buildRules = (
290
 			);
291
 			);
350
 /* End PBXResourcesBuildPhase section */
351
 /* End PBXResourcesBuildPhase section */
351
 
352
 
352
 /* Begin PBXShellScriptBuildPhase section */
353
 /* Begin PBXShellScriptBuildPhase section */
354
+		0B64F7BE2175DFEA005009CD /* Remove unneeded fonts */ = {
355
+			isa = PBXShellScriptBuildPhase;
356
+			buildActionMask = 2147483647;
357
+			files = (
358
+			);
359
+			inputFileListPaths = (
360
+			);
361
+			inputPaths = (
362
+			);
363
+			name = "Remove unneeded fonts";
364
+			outputFileListPaths = (
365
+			);
366
+			outputPaths = (
367
+			);
368
+			runOnlyForDeploymentPostprocessing = 0;
369
+			shellPath = /bin/sh;
370
+			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";
371
+		};
353
 		0BCA49651EC4B77500B793EE /* Package React bundle */ = {
372
 		0BCA49651EC4B77500B793EE /* Package React bundle */ = {
354
 			isa = PBXShellScriptBuildPhase;
373
 			isa = PBXShellScriptBuildPhase;
355
 			buildActionMask = 2147483647;
374
 			buildActionMask = 2147483647;

+ 0
- 1
ios/sdk/src/Info.plist View File

20
 	<string>$(CURRENT_PROJECT_VERSION)</string>
20
 	<string>$(CURRENT_PROJECT_VERSION)</string>
21
 	<key>JitsiMeetFonts</key>
21
 	<key>JitsiMeetFonts</key>
22
 	<array>
22
 	<array>
23
-		<string>FontAwesome.ttf</string>
24
 		<string>jitsi.ttf</string>
23
 		<string>jitsi.ttf</string>
25
 	</array>
24
 	</array>
26
 	<key>LSApplicationQueriesSchemes</key>
25
 	<key>LSApplicationQueriesSchemes</key>

Loading…
Cancel
Save