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()