mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
fix: bump rhino js and upgrade desugaring level (#774)
* fix and bump rhino js * upgrade desugaring level * uppercase run to Run
This commit is contained in:
parent
b49368100b
commit
df0122c146
2 changed files with 5 additions and 5 deletions
|
@ -210,15 +210,13 @@ dependencies {
|
||||||
implementation("com.github.discord:OverlappingPanels:0.1.5") // Gestures
|
implementation("com.github.discord:OverlappingPanels:0.1.5") // Gestures
|
||||||
implementation("com.github.rubensousa:previewseekbar-media3:1.1.1.0") // SeekBar Preview
|
implementation("com.github.rubensousa:previewseekbar-media3:1.1.1.0") // SeekBar Preview
|
||||||
|
|
||||||
// Extensionns & Other Libs
|
// Extensions & Other Libs
|
||||||
implementation("org.mozilla:rhino:1.7.13") /* run JS
|
implementation("org.mozilla:rhino:1.7.14") // Run JavaScript
|
||||||
^ Don't Bump RhinoJS to 1.7.14, since in 1.7.14 Rhino Uses the `SourceVersion` Class, Which is NOT
|
|
||||||
Available on Android (even with Desugaring) & `NoClassDefFoundError` Occurs. */
|
|
||||||
implementation("me.xdrop:fuzzywuzzy:1.4.0") // Library/Ext Searching with Levenshtein Distance
|
implementation("me.xdrop:fuzzywuzzy:1.4.0") // Library/Ext Searching with Levenshtein Distance
|
||||||
implementation("com.github.LagradOst:SafeFile:0.0.5") // To Prevent the URI File Fu*kery
|
implementation("com.github.LagradOst:SafeFile:0.0.5") // To Prevent the URI File Fu*kery
|
||||||
implementation("org.conscrypt:conscrypt-android:2.5.2") // To Fix SSL Fu*kery on Android 9
|
implementation("org.conscrypt:conscrypt-android:2.5.2") // To Fix SSL Fu*kery on Android 9
|
||||||
implementation("com.uwetrottmann.tmdb2:tmdb-java:2.10.0") // TMDB API v3 Wrapper Made with RetroFit
|
implementation("com.uwetrottmann.tmdb2:tmdb-java:2.10.0") // TMDB API v3 Wrapper Made with RetroFit
|
||||||
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.1.6")
|
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4")
|
||||||
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.13.1") /* JSON Parser
|
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.13.1") /* JSON Parser
|
||||||
^ Don't Bump Jackson above 2.13.1 , Crashes on Android TV's and FireSticks that have Min API
|
^ Don't Bump Jackson above 2.13.1 , Crashes on Android TV's and FireSticks that have Min API
|
||||||
Level 25 or Less. */
|
Level 25 or Less. */
|
||||||
|
|
|
@ -10,6 +10,7 @@ import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
import com.fasterxml.jackson.databind.DeserializationFeature
|
import com.fasterxml.jackson.databind.DeserializationFeature
|
||||||
import com.fasterxml.jackson.databind.json.JsonMapper
|
import com.fasterxml.jackson.databind.json.JsonMapper
|
||||||
import com.fasterxml.jackson.module.kotlin.KotlinModule
|
import com.fasterxml.jackson.module.kotlin.KotlinModule
|
||||||
|
import com.google.errorprone.annotations.Keep
|
||||||
import com.lagradost.cloudstream3.mvvm.logError
|
import com.lagradost.cloudstream3.mvvm.logError
|
||||||
import com.lagradost.cloudstream3.mvvm.normalSafeApiCall
|
import com.lagradost.cloudstream3.mvvm.normalSafeApiCall
|
||||||
import com.lagradost.cloudstream3.syncproviders.AccountManager.Companion.aniListApi
|
import com.lagradost.cloudstream3.syncproviders.AccountManager.Companion.aniListApi
|
||||||
|
@ -806,6 +807,7 @@ fun fixTitle(str: String): String {
|
||||||
* Make sure you get the scope using: val scope: Scriptable = rhino.initSafeStandardObjects()
|
* Make sure you get the scope using: val scope: Scriptable = rhino.initSafeStandardObjects()
|
||||||
* Use like the following: rhino.evaluateString(scope, js, "JavaScript", 1, null)
|
* Use like the following: rhino.evaluateString(scope, js, "JavaScript", 1, null)
|
||||||
**/
|
**/
|
||||||
|
@Keep
|
||||||
suspend fun getRhinoContext(): org.mozilla.javascript.Context {
|
suspend fun getRhinoContext(): org.mozilla.javascript.Context {
|
||||||
return Coroutines.mainWork {
|
return Coroutines.mainWork {
|
||||||
val rhino = org.mozilla.javascript.Context.enter()
|
val rhino = org.mozilla.javascript.Context.enter()
|
||||||
|
|
Loading…
Reference in a new issue