diff --git a/.rubocop.yml b/.rubocop.yml index 7846a1402..e9a144ae6 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,4 +1,4 @@ -require: +plugins: - rubocop-minitest AllCops: diff --git a/Gemfile.lock b/Gemfile.lock index 2905dfbc0..d4ee72317 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -64,4 +64,4 @@ DEPENDENCIES xcodeproj BUNDLED WITH - 2.5.14 + 2.6.8 diff --git a/example/.gitignore b/example/.gitignore index 65aa665cb..12680029e 100644 --- a/example/.gitignore +++ b/example/.gitignore @@ -3,6 +3,8 @@ *.xcworkspace/ *.zip .DS_Store +.bundle/* +!.bundle/config .gradle/ .idea/ .vs/ diff --git a/scripts/configure.mjs b/scripts/configure.mjs index fc3c37f32..bf58fd8b3 100755 --- a/scripts/configure.mjs +++ b/scripts/configure.mjs @@ -29,6 +29,7 @@ import { import { appManifest, buildGradle, + bundleConfig, gradleProperties, podfile, serialize, @@ -305,6 +306,7 @@ export const getConfig = (() => { : { "App.js": copyFrom(templateDir, "App.js"), }), + ".bundle/config": bundleConfig(), Gemfile: copyFrom(templateDir, "Gemfile"), "app.json": appManifest(name), "index.js": copyFrom(templateDir, "index.js"), diff --git a/scripts/template.mjs b/scripts/template.mjs index 465dfcc16..bab239cbd 100644 --- a/scripts/template.mjs +++ b/scripts/template.mjs @@ -97,6 +97,18 @@ export function buildGradle() { ); } +/** + * Returns `.bundle/config`. + * + * @note We don't use a checked in file because of + * https://github.com/ruby/setup-ruby/discussions/576. + * + * @returns {string} + */ +export function bundleConfig() { + return join('BUNDLE_PATH: ".bundle"', "BUNDLE_FORCE_RUBY_PLATFORM: 1"); +} + /** * @param {number} targetVersion Target React Native version * @returns {string} diff --git a/test/configure/getConfig.test.ts b/test/configure/getConfig.test.ts index 032a57a4d..783a59e77 100644 --- a/test/configure/getConfig.test.ts +++ b/test/configure/getConfig.test.ts @@ -45,6 +45,7 @@ describe("getConfig()", () => { const config = getConfig(params, "common"); deepEqual(Object.keys(config.files).sort(), [ + ".bundle/config", ".gitignore", ".watchmanconfig", "App.tsx",