diff --git a/android/app/build.gradle b/android/app/build.gradle index 502190d..f602ffc 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -57,7 +57,7 @@ react { /** * Set this to true to Run Proguard on Release builds to minify the Java bytecode. */ -def enableProguardInReleaseBuilds = false +def enableProguardInReleaseBuilds = true /** * The preferred build flavor of JavaScriptCore (JSC) @@ -114,6 +114,7 @@ android { def hasReleaseKeystore = System.getenv('RELEASE_STORE_FILE') || project.findProperty('RELEASE_STORE_FILE') signingConfig hasReleaseKeystore ? signingConfigs.release : signingConfigs.debug minifyEnabled enableProguardInReleaseBuilds + shrinkResources enableProguardInReleaseBuilds proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" } } diff --git a/android/gradle.properties b/android/gradle.properties index 9afe615..4e0e8da 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -25,7 +25,12 @@ android.useAndroidX=true # Use this property to specify which architecture you want to build. # You can also override it from the CLI using # ./gradlew -PreactNativeArchitectures=x86_64 -reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 +# Ship arm64-v8a only. Every real target device (GrapheneOS/Pixels and modern +# stock Android) is 64-bit ARM; x86/x86_64 are emulator-only and armeabi-v7a is +# pre-2017 32-bit. This controls both which ABIs are compiled and which ship, so +# it also cuts build time ~4x. To run a debug build on an x86_64 emulator, +# override per-invocation: ./gradlew ... -PreactNativeArchitectures=x86_64 +reactNativeArchitectures=arm64-v8a # Use this property to enable support to the new architecture. # This will allow you to use TurboModules and the Fabric render in diff --git a/babel.config.js b/babel.config.js index f7b3da3..5dabc66 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,3 +1,7 @@ module.exports = { presets: ['module:@react-native/babel-preset'], + // graphql v17 ships .mjs using `export * as Kind from ...` (export-namespace-from). + // The RN preset doesn't transform this, so release bundling fails without it. + // Debug builds serve JS from Metro and skip bundling, so CI never hit this. + plugins: ['@babel/plugin-transform-export-namespace-from'], };