From 1cd4526ef92137241d9e0ae6abc785bf22b041e8 Mon Sep 17 00:00:00 2001 From: Dominik Czupryna Date: Fri, 27 Oct 2023 09:26:14 +0200 Subject: [PATCH] chore: update compileSdkVersion for RN 0.70 pipeline --- scripts/copyExampleProjectFiles.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/copyExampleProjectFiles.js b/scripts/copyExampleProjectFiles.js index d6246385..20e9dcf1 100644 --- a/scripts/copyExampleProjectFiles.js +++ b/scripts/copyExampleProjectFiles.js @@ -119,11 +119,13 @@ const changePackageJsonName = () => { fs.writeFileSync(packageJsonDestinationPath, JSON.stringify(packageJson, null, 2) + '\n') } -const setMinSdkVersion = () => { +const setCompileSdkVersion = () => { const gradlePath = path.join(__dirname, TEST_PROJECT_DIR_NAME, 'android', 'app', 'build.gradle') const gradleLines = fs.readFileSync(gradlePath, 'utf8').split('\n') - const indexOfManifestTagEndLine = gradleLines.findIndex(line => line.includes('minSdkVersion')) - gradleLines[indexOfManifestTagEndLine] = 'minSdkVersion 23' + const indexOfManifestTagEndLine = gradleLines.findIndex(line => line.includes('compileSdkVersion')) + console.log(indexOfManifestTagEndLine) + console.log(gradleLines[indexOfManifestTagEndLine]) + gradleLines[indexOfManifestTagEndLine] = 'compileSdkVersion 32' fs.writeFileSync(gradlePath, gradleLines.join('\n')) } @@ -136,7 +138,7 @@ const copyExampleProjectFiles = () => { copyReactNativeConfig() copyBabelConfig() changePackageJsonName() - setMinSdkVersion() + setCompileSdkVersion() } copyExampleProjectFiles()