60f42ed624
- patches/@rock-js__plugin-metro@0.12.12.patch: wrap absolute paths in pathToFileURL() so dynamic imports work on Windows - pnpm-workspace.yaml: register the patch and pin nodeLinker: hoisted - pnpm-lock.yaml: lock the patched version with hash - android/settings.gradle: invoke npx.cmd on Windows for rock autolink
41 lines
1.4 KiB
Groovy
41 lines
1.4 KiB
Groovy
pluginManagement {
|
|
def reactNativeGradlePlugin = new File(
|
|
providers.exec {
|
|
workingDir(rootDir)
|
|
commandLine("node", "--print", "require.resolve('@react-native/gradle-plugin/package.json', { paths: [require.resolve('react-native/package.json')] })")
|
|
}.standardOutput.asText.get().trim()
|
|
).getParentFile().absolutePath
|
|
includeBuild(reactNativeGradlePlugin)
|
|
|
|
def expoPluginsPath = new File(
|
|
providers.exec {
|
|
workingDir(rootDir)
|
|
commandLine("node", "--print", "require.resolve('expo-modules-autolinking/package.json', { paths: [require.resolve('expo/package.json')] })")
|
|
}.standardOutput.asText.get().trim(),
|
|
"../android/expo-gradle-plugin"
|
|
).absolutePath
|
|
includeBuild(expoPluginsPath)
|
|
}
|
|
|
|
plugins {
|
|
id("com.facebook.react.settings")
|
|
id("expo-autolinking-settings")
|
|
}
|
|
|
|
extensions.configure(com.facebook.react.ReactSettingsExtension) { ex ->
|
|
def npxCmd = System.getProperty('os.name').toLowerCase().contains('windows') ? 'npx.cmd' : 'npx'
|
|
if (System.getenv('EXPO_USE_COMMUNITY_AUTOLINKING') == '1') {
|
|
ex.autolinkLibrariesFromCommand([npxCmd, 'rock', 'config', '-p', 'android'])
|
|
} else {
|
|
ex.autolinkLibrariesFromCommand([npxCmd, 'rock', 'config', '-p', 'android'])
|
|
}
|
|
}
|
|
|
|
rootProject.name = "LNReader"
|
|
|
|
expoAutolinking.useExpoModules()
|
|
expoAutolinking.useExpoVersionCatalog()
|
|
|
|
include(":app")
|
|
includeBuild(expoAutolinking.reactNativeGradlePlugin)
|