Procházet zdrojové kódy

android: switch to the Hermes JavaScript engine

master
Saúl Ibarra Corretgé před 5 roky
rodič
revize
960ffa7e78

+ 5
- 1
android/app/proguard-rules.pro Zobrazit soubor

85
 # ^^^ We added the above when we switched minifyEnabled on.
85
 # ^^^ We added the above when we switched minifyEnabled on.
86
 
86
 
87
 # Rule to avoid build errors related to SVGs.
87
 # Rule to avoid build errors related to SVGs.
88
--keep public class com.horcrux.svg.** {*;}
88
+-keep public class com.horcrux.svg.** {*;}
89
+
90
+# Hermes
91
+-keep class com.facebook.hermes.unicode.** { *; }
92
+

+ 0
- 2
android/build.gradle Zobrazit soubor

27
         jcenter()
27
         jcenter()
28
         // React Native (JS, Obj-C sources, Android binaries) is installed from npm.
28
         // React Native (JS, Obj-C sources, Android binaries) is installed from npm.
29
         maven { url "$rootDir/../node_modules/react-native/android" }
29
         maven { url "$rootDir/../node_modules/react-native/android" }
30
-        // Android JSC is installed from npm.
31
-        maven { url("$rootDir/../node_modules/jsc-android/dist") }
32
     }
30
     }
33
 
31
 
34
     // Make sure we use the react-native version in node_modules and not the one
32
     // Make sure we use the react-native version in node_modules and not the one

+ 5
- 2
android/sdk/build.gradle Zobrazit soubor

42
 
42
 
43
     //noinspection GradleDynamicVersion
43
     //noinspection GradleDynamicVersion
44
     api 'com.facebook.react:react-native:+'
44
     api 'com.facebook.react:react-native:+'
45
-    //noinspection GradleDynamicVersion
46
-    implementation 'org.webkit:android-jsc:+'
45
+
46
+    // Hermes JS engine
47
+    def hermesPath = "../../node_modules/hermes-engine/android/"
48
+    debugImplementation files(hermesPath + "hermes-debug.aar")
49
+    releaseImplementation files(hermesPath + "hermes-release.aar")
47
 
50
 
48
     implementation 'com.dropbox.core:dropbox-core-sdk:3.0.8'
51
     implementation 'com.dropbox.core:dropbox-core-sdk:3.0.8'
49
     implementation 'com.jakewharton.timber:timber:4.7.1'
52
     implementation 'com.jakewharton.timber:timber:4.7.1'

+ 3
- 5
android/sdk/src/main/java/org/jitsi/meet/sdk/ReactInstanceManagerHolder.java Zobrazit soubor

20
 import android.app.Activity;
20
 import android.app.Activity;
21
 import androidx.annotation.Nullable;
21
 import androidx.annotation.Nullable;
22
 
22
 
23
+import com.facebook.hermes.reactexecutor.HermesExecutorFactory;
23
 import com.facebook.react.ReactInstanceManager;
24
 import com.facebook.react.ReactInstanceManager;
24
 import com.facebook.react.ReactPackage;
25
 import com.facebook.react.ReactPackage;
25
 import com.facebook.react.bridge.NativeModule;
26
 import com.facebook.react.bridge.NativeModule;
27
 import com.facebook.react.bridge.ReactApplicationContext;
28
 import com.facebook.react.bridge.ReactApplicationContext;
28
 import com.facebook.react.common.LifecycleState;
29
 import com.facebook.react.common.LifecycleState;
29
 import com.facebook.react.devsupport.DevInternalSettings;
30
 import com.facebook.react.devsupport.DevInternalSettings;
30
-import com.facebook.react.jscexecutor.JSCExecutorFactory;
31
 import com.facebook.react.modules.core.DeviceEventManagerModule;
31
 import com.facebook.react.modules.core.DeviceEventManagerModule;
32
 import com.facebook.react.uimanager.ViewManager;
32
 import com.facebook.react.uimanager.ViewManager;
33
 import com.facebook.soloader.SoLoader;
33
 import com.facebook.soloader.SoLoader;
34
 import com.oney.WebRTCModule.RTCVideoViewManager;
34
 import com.oney.WebRTCModule.RTCVideoViewManager;
35
 import com.oney.WebRTCModule.WebRTCModule;
35
 import com.oney.WebRTCModule.WebRTCModule;
36
 
36
 
37
-import org.jitsi.meet.sdk.log.JitsiMeetLogger;
38
 import org.webrtc.SoftwareVideoDecoderFactory;
37
 import org.webrtc.SoftwareVideoDecoderFactory;
39
 import org.webrtc.SoftwareVideoEncoderFactory;
38
 import org.webrtc.SoftwareVideoEncoderFactory;
40
 import org.webrtc.VideoDecoderFactory;
39
 import org.webrtc.VideoDecoderFactory;
219
             // Ignore any error, the module is not compiled when LIBRE_BUILD is enabled.
218
             // Ignore any error, the module is not compiled when LIBRE_BUILD is enabled.
220
         }
219
         }
221
 
220
 
222
-        // Keep on using JSC, the jury is out on Hermes.
223
-        JSCExecutorFactory jsFactory
224
-            = new JSCExecutorFactory("", "");
221
+        // Use the Hermes JavaScript engine.
222
+        HermesExecutorFactory jsFactory = new HermesExecutorFactory();
225
 
223
 
226
         reactInstanceManager
224
         reactInstanceManager
227
             = ReactInstanceManager.builder()
225
             = ReactInstanceManager.builder()

Načítá se…
Zrušit
Uložit