Skip to content

Assert existence of arch-specific Android prebuilt when auto-linking #190

@kraenhansen

Description

@kraenhansen

When we're auto-linking prebuilds for Android, we have an opportunity fail early by passing the arch(s) being built and fail if a specific prebuilt binary is missing.

If we're not failing and the binary is missing, it will simply fail to load at runtime instead.

Somewhere around here:

task linkNodeApiModules {
doLast {
exec {
// TODO: Support --strip-path-suffix
commandLine 'npx', 'react-native-node-api', 'link', '--android', rootProject.rootDir.absolutePath
standardOutput = System.out
errorOutput = System.err
// Enable color output
environment "FORCE_COLOR", "1"
}
android.sourceSets.main.jniLibs.srcDirs += file("../auto-linked/android").listFiles()
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Android 🤖Anything related to the Android platform (Gradle, NDK, Android SDK)Linking 🔗Discovering and copying prebuilds from packages into the host

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions