expo-network-addons 0.6.1-canary-20241008-90b13ad → 0.6.1-canary-20241018-bf4b2f7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,6 +9,8 @@ import com.android.build.api.instrumentation.FramesComputationMode
|
|
|
9
9
|
import com.android.build.api.instrumentation.InstrumentationParameters
|
|
10
10
|
import com.android.build.api.instrumentation.InstrumentationScope
|
|
11
11
|
import com.android.build.api.variant.AndroidComponentsExtension
|
|
12
|
+
import com.android.build.api.variant.Variant
|
|
13
|
+
import com.facebook.react.ReactExtension
|
|
12
14
|
import org.gradle.api.Plugin
|
|
13
15
|
import org.gradle.api.Project
|
|
14
16
|
import org.gradle.api.provider.Property
|
|
@@ -23,18 +25,27 @@ abstract class NetworkAddonsPlugin : Plugin<Project> {
|
|
|
23
25
|
|
|
24
26
|
override fun apply(project: Project) {
|
|
25
27
|
val androidComponents = project.extensions.getByType(AndroidComponentsExtension::class.java)
|
|
28
|
+
val reactExtension = project.extensions.findByType(ReactExtension::class.java)
|
|
26
29
|
val devLauncherInstalled = project.findProject(":expo-dev-launcher") != null
|
|
27
30
|
|
|
28
31
|
androidComponents.onVariants(androidComponents.selector().all()) { variant ->
|
|
29
32
|
variant.instrumentation.transformClassesWith(NetworkAddonsClassVisitorFactory::class.java, InstrumentationScope.ALL) {
|
|
30
33
|
it.enabled.set(true)
|
|
31
|
-
it.debugVariant.set(variant
|
|
34
|
+
it.debugVariant.set(isDebugVariant(variant, reactExtension))
|
|
32
35
|
it.devLauncherInstalled.set(devLauncherInstalled)
|
|
33
36
|
}
|
|
34
37
|
variant.instrumentation.setAsmFramesComputationMode(FramesComputationMode.COMPUTE_FRAMES_FOR_INSTRUMENTED_METHODS)
|
|
35
38
|
}
|
|
36
39
|
}
|
|
37
40
|
|
|
41
|
+
private fun isDebugVariant(variant: Variant, reactExtension: ReactExtension?): Boolean {
|
|
42
|
+
return if (System.getenv("EX_UPDATES_NATIVE_DEBUG") != "1" && reactExtension != null) {
|
|
43
|
+
reactExtension.debuggableVariants.get().any { it.equals(variant.name, ignoreCase = true) }
|
|
44
|
+
} else {
|
|
45
|
+
variant.buildType == "debug"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
38
49
|
interface NetworkAddonsPluginParameters : InstrumentationParameters {
|
|
39
50
|
@get:Input
|
|
40
51
|
@get:Optional
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-network-addons",
|
|
3
3
|
"title": "Expo Networking Addons",
|
|
4
|
-
"version": "0.6.1-canary-
|
|
4
|
+
"version": "0.6.1-canary-20241018-bf4b2f7",
|
|
5
5
|
"description": "Expo module that provides extra functionalities for networking",
|
|
6
6
|
"main": "build/index.js",
|
|
7
7
|
"types": "build/index.d.ts",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"license": "MIT",
|
|
35
35
|
"dependencies": {},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"expo-module-scripts": "3.6.0-canary-
|
|
37
|
+
"expo-module-scripts": "3.6.0-canary-20241018-bf4b2f7"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"expo": "52.0.0-canary-
|
|
40
|
+
"expo": "52.0.0-canary-20241018-bf4b2f7"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "bf4b2f7ee85a6454ab9f0f97f247bf86d1a47769"
|
|
43
43
|
}
|