@succinctlabs/react-native-zcam1 0.4.0-alpha.1 → 0.4.0-alpha.3
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.
- package/android/build.gradle +24 -7
- package/package.json +1 -1
package/android/build.gradle
CHANGED
|
@@ -36,7 +36,7 @@ task downloadJniLibs {
|
|
|
36
36
|
// - dir present, marker absent → Yalc/local dev (package includes JNI libs), skip
|
|
37
37
|
// - dir present, marker present, version differs → re-download (public npm upgrade)
|
|
38
38
|
// - dir present, marker present, version matches → already up to date, skip
|
|
39
|
-
[
|
|
39
|
+
[Zcam1Jni: jniLibsDir, Zcam1ProvingJni: jniLibsProvingDir].each { name, dir ->
|
|
40
40
|
def zipName = "${name}.zip"
|
|
41
41
|
def zipUrl = "${baseUrl}/${zipName}"
|
|
42
42
|
|
|
@@ -44,26 +44,26 @@ task downloadJniLibs {
|
|
|
44
44
|
println "Downloading ${name} v${version}..."
|
|
45
45
|
exec {
|
|
46
46
|
commandLine "curl", "-fL", zipUrl, "-o", zipName
|
|
47
|
-
workingDir "
|
|
47
|
+
workingDir ".."
|
|
48
48
|
}
|
|
49
49
|
exec {
|
|
50
50
|
commandLine "unzip", "-q", zipName
|
|
51
|
-
workingDir "
|
|
51
|
+
workingDir ".."
|
|
52
52
|
}
|
|
53
|
-
new File("${projectDir}
|
|
53
|
+
new File("${projectDir}/../${zipName}").delete()
|
|
54
54
|
markerFile.text = version
|
|
55
55
|
} else if (markerFile.exists() && markerFile.text.trim() != version) {
|
|
56
56
|
println "Updating ${name} to v${version}..."
|
|
57
57
|
dir.deleteDir()
|
|
58
58
|
exec {
|
|
59
59
|
commandLine "curl", "-fL", zipUrl, "-o", zipName
|
|
60
|
-
workingDir "
|
|
60
|
+
workingDir ".."
|
|
61
61
|
}
|
|
62
62
|
exec {
|
|
63
63
|
commandLine "unzip", "-q", zipName
|
|
64
|
-
workingDir "
|
|
64
|
+
workingDir ".."
|
|
65
65
|
}
|
|
66
|
-
new File("${projectDir}
|
|
66
|
+
new File("${projectDir}/../${zipName}").delete()
|
|
67
67
|
markerFile.text = version
|
|
68
68
|
}
|
|
69
69
|
}
|
|
@@ -74,6 +74,23 @@ afterEvaluate {
|
|
|
74
74
|
preBuild.dependsOn downloadJniLibs
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
// With --configure-on-demand (used by Expo), the app's CMake configuration task can start
|
|
78
|
+
// before the library's generateCodegenArtifactsFromSchema task is registered, breaking the
|
|
79
|
+
// dependency chain that the React Native Gradle Plugin is supposed to set up automatically.
|
|
80
|
+
// This explicitly wires the dependency after all projects are evaluated.
|
|
81
|
+
if (isNewArchitectureEnabled()) {
|
|
82
|
+
gradle.projectsEvaluated {
|
|
83
|
+
def codegenTask = tasks.findByName('generateCodegenArtifactsFromSchema')
|
|
84
|
+
if (codegenTask) {
|
|
85
|
+
rootProject.subprojects { subproject ->
|
|
86
|
+
subproject.tasks.matching { it.name.startsWith('configureCMake') }.configureEach { cmakeTask ->
|
|
87
|
+
cmakeTask.dependsOn(codegenTask)
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
77
94
|
def reactNativeArchitectures() {
|
|
78
95
|
def value = rootProject.getProperties().get("reactNativeArchitectures")
|
|
79
96
|
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
|