From 933fd0d317143c930e7527175a1ba831a577d6f7 Mon Sep 17 00:00:00 2001 From: Hugo EXTRAT Date: Mon, 25 Aug 2025 09:24:04 +0200 Subject: [PATCH] feat: fixing build on RN 0.79+ --- android/build.gradle | 30 +----------------------------- ios/RateApp.h | 2 +- package.json | 11 ++--------- react-native.config.js | 12 ------------ 4 files changed, 4 insertions(+), 51 deletions(-) delete mode 100644 react-native.config.js diff --git a/android/build.gradle b/android/build.gradle index f2dd876..94ad7b1 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -15,7 +15,6 @@ buildscript { } } - def isNewArchitectureEnabled() { return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true" } @@ -31,26 +30,7 @@ def getExtOrIntegerDefault(name) { return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["RateApp_" + name]).toInteger() } -def supportsNamespace() { - def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.') - def major = parsed[0].toInteger() - def minor = parsed[1].toInteger() - - // Namespace support was added in 7.3.0 - return (major == 7 && minor >= 3) || major >= 8 -} - android { - if (supportsNamespace()) { - namespace "com.rateapp" - - sourceSets { - main { - manifest.srcFile "src/main/AndroidManifestNew.xml" - } - } - } - compileSdkVersion getExtOrIntegerDefault("compileSdkVersion") defaultConfig { @@ -104,12 +84,4 @@ dependencies { implementation "com.facebook.react:react-android" implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" implementation "com.google.android.play:review:2.0.1" -} - -if (isNewArchitectureEnabled()) { - react { - jsRootDir = file("../src/") - libraryName = "RateApp" - codegenJavaPackageName = "com.rateapp" - } -} +} \ No newline at end of file diff --git a/ios/RateApp.h b/ios/RateApp.h index 7d08cfd..84eb1e7 100644 --- a/ios/RateApp.h +++ b/ios/RateApp.h @@ -1,5 +1,5 @@ #ifdef RCT_NEW_ARCH_ENABLED -#import "generated/RateAppSpec/RateAppSpec.h" +#import "RateAppSpec/RateAppSpec.h" @interface RateApp : NSObject #else diff --git a/package.json b/package.json index 296a6e1..17ffa22 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,6 @@ "ios", "cpp", "*.podspec", - "react-native.config.js", "!ios/build", "!android/build", "!android/gradle", @@ -126,7 +125,6 @@ "source": "src", "output": "lib", "targets": [ - "codegen", "commonjs", "module", "typescript" @@ -136,18 +134,13 @@ "name": "RateAppSpec", "type": "modules", "jsSrcsDir": "./src/codegenSpec", - "outputDir": { - "ios": "ios/generated", - "android": "android/generated" - }, "android": { "javaPackageName": "com.rateapp" - }, - "includesGeneratedCode": true + } }, "create-react-native-library": { "type": "turbo-module", "languages": "kotlin-objc", - "version": "0.50.3" + "version": "0.52.1" } } diff --git a/react-native.config.js b/react-native.config.js deleted file mode 100644 index 21980d4..0000000 --- a/react-native.config.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @type {import('@react-native-community/cli-types').UserDependencyConfig} - */ -module.exports = { - dependency: { - platforms: { - android: { - cmakeListsPath: 'generated/jni/CMakeLists.txt', - }, - }, - }, -};