From 2deace1a700b03f99daef67691b6a0eb63294b3d Mon Sep 17 00:00:00 2001 From: Victor Soares Date: Mon, 9 Dec 2024 12:57:08 -0300 Subject: [PATCH] fix android bare example --- example-bare/android/.gitignore | 1 + example-bare/android/app/build.gradle | 32 +++++++++--------- .../android/app/src/main/AndroidManifest.xml | 29 ++++++++-------- .../{ => jvjv33}/examplebare/MainActivity.kt | 2 +- .../examplebare/MainApplication.kt | 20 ++++------- ...hscreen.xml => ic_launcher_background.xml} | 3 +- .../res/drawable/rn_edit_text_material.xml | 3 +- .../main/res/drawable/splashscreen_image.png | Bin 9306 -> 0 bytes .../{ic_launcher.png => ic_launcher.webp} | Bin ...ncher_round.png => ic_launcher_round.webp} | Bin .../{ic_launcher.png => ic_launcher.webp} | Bin ...ncher_round.png => ic_launcher_round.webp} | Bin .../{ic_launcher.png => ic_launcher.webp} | Bin ...ncher_round.png => ic_launcher_round.webp} | Bin .../{ic_launcher.png => ic_launcher.webp} | Bin ...ncher_round.png => ic_launcher_round.webp} | Bin .../{ic_launcher.png => ic_launcher.webp} | Bin ...ncher_round.png => ic_launcher_round.webp} | Bin .../app/src/main/res/values-night/colors.xml | 1 + .../app/src/main/res/values/colors.xml | 3 +- .../app/src/main/res/values/strings.xml | 4 +-- .../app/src/main/res/values/styles.xml | 8 +++-- example-bare/android/build.gradle | 11 +++--- example-bare/android/gradle.properties | 4 +-- .../android/gradle/wrapper/gradle-wrapper.jar | Bin 63721 -> 43583 bytes .../gradle/wrapper/gradle-wrapper.properties | 2 +- example-bare/android/gradlew | 7 ++-- example-bare/android/gradlew.bat | 23 +++++++------ example-bare/android/settings.gradle | 28 ++++++++++++--- example-bare/app.json | 3 ++ 30 files changed, 105 insertions(+), 79 deletions(-) rename example-bare/android/app/src/main/java/com/{ => jvjv33}/examplebare/MainActivity.kt (98%) rename example-bare/android/app/src/main/java/com/{ => jvjv33}/examplebare/MainApplication.kt (73%) rename example-bare/android/app/src/main/res/drawable/{splashscreen.xml => ic_launcher_background.xml} (65%) delete mode 100644 example-bare/android/app/src/main/res/drawable/splashscreen_image.png rename example-bare/android/app/src/main/res/mipmap-hdpi/{ic_launcher.png => ic_launcher.webp} (100%) rename example-bare/android/app/src/main/res/mipmap-hdpi/{ic_launcher_round.png => ic_launcher_round.webp} (100%) rename example-bare/android/app/src/main/res/mipmap-mdpi/{ic_launcher.png => ic_launcher.webp} (100%) rename example-bare/android/app/src/main/res/mipmap-mdpi/{ic_launcher_round.png => ic_launcher_round.webp} (100%) rename example-bare/android/app/src/main/res/mipmap-xhdpi/{ic_launcher.png => ic_launcher.webp} (100%) rename example-bare/android/app/src/main/res/mipmap-xhdpi/{ic_launcher_round.png => ic_launcher_round.webp} (100%) rename example-bare/android/app/src/main/res/mipmap-xxhdpi/{ic_launcher.png => ic_launcher.webp} (100%) rename example-bare/android/app/src/main/res/mipmap-xxhdpi/{ic_launcher_round.png => ic_launcher_round.webp} (100%) rename example-bare/android/app/src/main/res/mipmap-xxxhdpi/{ic_launcher.png => ic_launcher.webp} (100%) rename example-bare/android/app/src/main/res/mipmap-xxxhdpi/{ic_launcher_round.png => ic_launcher_round.webp} (100%) create mode 100644 example-bare/android/app/src/main/res/values-night/colors.xml diff --git a/example-bare/android/.gitignore b/example-bare/android/.gitignore index 877b87e9..8a6be077 100644 --- a/example-bare/android/.gitignore +++ b/example-bare/android/.gitignore @@ -10,6 +10,7 @@ build/ local.properties *.iml *.hprof +.cxx/ # Bundle artifacts *.jsbundle diff --git a/example-bare/android/app/build.gradle b/example-bare/android/app/build.gradle index 041c1609..5c81c84c 100644 --- a/example-bare/android/app/build.gradle +++ b/example-bare/android/app/build.gradle @@ -20,12 +20,12 @@ react { bundleCommand = "export:embed" /* Folders */ - // The root of your project, i.e. where "package.json" lives. Default is '..' - // root = file("../") - // The folder where the react-native NPM package is. Default is ../node_modules/react-native - // reactNativeDir = file("../node_modules/react-native") - // The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen - // codegenDir = file("../node_modules/@react-native/codegen") + // The root of your project, i.e. where "package.json" lives. Default is '../..' + // root = file("../../") + // The folder where the react-native NPM package is. Default is ../../node_modules/react-native + // reactNativeDir = file("../../node_modules/react-native") + // The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen + // codegenDir = file("../../node_modules/@react-native/codegen") /* Variants */ // The list of variants to that are debuggable. For those we're going to @@ -57,6 +57,9 @@ react { // // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" // hermesFlags = ["-O", "-output-source-map"] + + /* Autolinking */ + autolinkLibrariesWithApp() } /** @@ -83,15 +86,13 @@ android { buildToolsVersion rootProject.ext.buildToolsVersion compileSdk rootProject.ext.compileSdkVersion - namespace "com.examplebare" + namespace 'com.jvjv33.examplebare' defaultConfig { - applicationId "com.examplebare" + applicationId 'com.jvjv33.examplebare' minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode 1 - versionName "1.0" - - buildConfigField("boolean", "REACT_NATIVE_UNSTABLE_USE_RUNTIME_SCHEDULER_ALWAYS", (findProperty("reactNative.unstable_useRuntimeSchedulerAlways") ?: true).toString()) + versionName "1.0.0" } signingConfigs { debug { @@ -112,6 +113,7 @@ android { shrinkResources (findProperty('android.enableShrinkResourcesInReleaseBuilds')?.toBoolean() ?: false) minifyEnabled enableProguardInReleaseBuilds proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" + crunchPngs (findProperty('android.enablePngCrunchInReleaseBuilds')?.toBoolean() ?: true) } } packagingOptions { @@ -119,6 +121,9 @@ android { useLegacyPackaging (findProperty('expo.useLegacyPackaging')?.toBoolean() ?: false) } } + androidResources { + ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~' + } } // Apply static values from `gradle.properties` to the `android.packagingOptions` @@ -163,14 +168,9 @@ dependencies { } } - implementation("com.facebook.react:flipper-integration") - if (hermesEnabled.toBoolean()) { implementation("com.facebook.react:hermes-android") } else { implementation jscFlavor } } - -apply from: new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim(), "../native_modules.gradle"); -applyNativeModulesAppBuildGradle(project) diff --git a/example-bare/android/app/src/main/AndroidManifest.xml b/example-bare/android/app/src/main/AndroidManifest.xml index f8d77fc8..14911b17 100644 --- a/example-bare/android/app/src/main/AndroidManifest.xml +++ b/example-bare/android/app/src/main/AndroidManifest.xml @@ -1,32 +1,31 @@ - - + - - - - - - - - + + + - - - - + + + + + + + + + + - \ No newline at end of file diff --git a/example-bare/android/app/src/main/java/com/examplebare/MainActivity.kt b/example-bare/android/app/src/main/java/com/jvjv33/examplebare/MainActivity.kt similarity index 98% rename from example-bare/android/app/src/main/java/com/examplebare/MainActivity.kt rename to example-bare/android/app/src/main/java/com/jvjv33/examplebare/MainActivity.kt index 04c8015f..c8b32d04 100644 --- a/example-bare/android/app/src/main/java/com/examplebare/MainActivity.kt +++ b/example-bare/android/app/src/main/java/com/jvjv33/examplebare/MainActivity.kt @@ -1,4 +1,4 @@ -package com.examplebare +package com.jvjv33.examplebare import android.os.Build import android.os.Bundle diff --git a/example-bare/android/app/src/main/java/com/examplebare/MainApplication.kt b/example-bare/android/app/src/main/java/com/jvjv33/examplebare/MainApplication.kt similarity index 73% rename from example-bare/android/app/src/main/java/com/examplebare/MainApplication.kt rename to example-bare/android/app/src/main/java/com/jvjv33/examplebare/MainApplication.kt index 8cce0d6c..ea9ae753 100644 --- a/example-bare/android/app/src/main/java/com/examplebare/MainApplication.kt +++ b/example-bare/android/app/src/main/java/com/jvjv33/examplebare/MainApplication.kt @@ -1,19 +1,16 @@ -package com.examplebare +package com.jvjv33.examplebare import android.app.Application import android.content.res.Configuration -import androidx.annotation.NonNull import com.facebook.react.PackageList import com.facebook.react.ReactApplication import com.facebook.react.ReactNativeHost import com.facebook.react.ReactPackage import com.facebook.react.ReactHost -import com.facebook.react.config.ReactFeatureFlags import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load -import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost import com.facebook.react.defaults.DefaultReactNativeHost -import com.facebook.react.flipper.ReactNativeFlipper +import com.facebook.react.soloader.OpenSourceMergedSoMapping import com.facebook.soloader.SoLoader import expo.modules.ApplicationLifecycleDispatcher @@ -25,9 +22,10 @@ class MainApplication : Application(), ReactApplication { this, object : DefaultReactNativeHost(this) { override fun getPackages(): List { + val packages = PackageList(this).packages // Packages that cannot be autolinked yet can be added manually here, for example: // packages.add(new MyReactNativePackage()); - return PackageList(this).packages + return packages } override fun getJSMainModuleName(): String = ".expo/.virtual-metro-entry" @@ -40,21 +38,15 @@ class MainApplication : Application(), ReactApplication { ) override val reactHost: ReactHost - get() = getDefaultReactHost(this.applicationContext, reactNativeHost) + get() = ReactNativeHostWrapper.createReactHost(applicationContext, reactNativeHost) override fun onCreate() { super.onCreate() - SoLoader.init(this, false) - if (!BuildConfig.REACT_NATIVE_UNSTABLE_USE_RUNTIME_SCHEDULER_ALWAYS) { - ReactFeatureFlags.unstable_useRuntimeSchedulerAlways = false - } + SoLoader.init(this, OpenSourceMergedSoMapping) if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { // If you opted-in for the New Architecture, we load the native entry point for this app. load() } - if (BuildConfig.DEBUG) { - ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager) - } ApplicationLifecycleDispatcher.onApplicationCreate(this) } diff --git a/example-bare/android/app/src/main/res/drawable/splashscreen.xml b/example-bare/android/app/src/main/res/drawable/ic_launcher_background.xml similarity index 65% rename from example-bare/android/app/src/main/res/drawable/splashscreen.xml rename to example-bare/android/app/src/main/res/drawable/ic_launcher_background.xml index 12f2f769..bab718fa 100644 --- a/example-bare/android/app/src/main/res/drawable/splashscreen.xml +++ b/example-bare/android/app/src/main/res/drawable/ic_launcher_background.xml @@ -1,4 +1,3 @@ - - \ No newline at end of file + diff --git a/example-bare/android/app/src/main/res/drawable/rn_edit_text_material.xml b/example-bare/android/app/src/main/res/drawable/rn_edit_text_material.xml index 73b37e4d..5c25e728 100644 --- a/example-bare/android/app/src/main/res/drawable/rn_edit_text_material.xml +++ b/example-bare/android/app/src/main/res/drawable/rn_edit_text_material.xml @@ -17,7 +17,8 @@ android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material" android:insetRight="@dimen/abc_edit_text_inset_horizontal_material" android:insetTop="@dimen/abc_edit_text_inset_top_material" - android:insetBottom="@dimen/abc_edit_text_inset_bottom_material"> + android:insetBottom="@dimen/abc_edit_text_inset_bottom_material" + > Dly_^lOSy&zIIhm*HXm1?VS=_iacG);_I9c zUQH1>i#*?oPIwBMJkzi_*>HoUe}_4o>2(SHWzqQ=;TyhAHS;Enr7!#8;sdlty&(>d zl%5cjri8`2X^Ds`jnw7>A`X|bl=U8n+3LKLy(1dAu8`g@9=5iw$R0qk)w8Vh_Dt^U zIglK}sn^)W7aB(Q>HvrX=rxB z+*L)3DiqpQ_%~|m=44LcD4-bxO3OO*LPjsh%p(k?&jvLp0py57oMH|*IMa(<|{m1(0S|x)?R-mqJ=I;_YUZA>J z62v*eSK;5w!h8J+6Z2~oyGdZ68waWfy09?4fU&m7%u~zi?YPHPgK6LDwphgaYu%0j zurtw)AYOpYKgHBrkX189mlJ`q)w-f|6>IER{5Lk97%P~a-JyCRFjejW@L>n4vt6#hq;!|m;hNE||LK3nw1{bJOy+eBJjK=QqNjI;Q6;Rp5 z&035pZDUZ#%Oa;&_7x0T<7!RW`#YBOj}F380Bq?MjjEhrvlCATPdkCTTl+2efTX$k zH&0zR1n^`C3ef~^sXzJK-)52(T}uTG%OF8yDhT76L~|^+hZ2hiSM*QA9*D5odI1>& z9kV9jC~twA5MwyOx(lsGD_ggYmztXPD`2=_V|ks_FOx!_J8!zM zTzh^cc+=VNZ&(OdN=y4Juw)@8-85lwf_#VMN!Ed(eQiRiLB2^2e`4dp286h@v@`O%_b)Y~A; zv}r6U?zs&@uD_+(_4bwoy7*uozNvp?bXFoB8?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Wb#_`xWwLSLdfu+PAu+o3| zGVnpzPr=ch{uuoHjtw7+_!L_2;knQ!DuDl0R`|%jr+}jFzXtrHIKc323?JO{l&;VF z*L1+}JU7%QJOg|5|Tc|D8fN zJORAg=_vsy{ak|o);@)Yh8Lkcg@$FG3k@ep36BRa^>~UmnRPziS>Z=`Jb2x*Q#`%A zU*i3&Vg?TluO@X0O;r2Jl6LKLUOVhSqg1*qOt^|8*c7 zo(298@+r$k_wQNGHv{|$tW(T8L+4_`FQ{kEW5Jgg{yf7ey4ss_(SNKfz(N9lx&a;< je(UuV8hP?p&}TPdm1I$XmG#(RzlD&B2izSj9sl%y5~4qc diff --git a/example-bare/android/gradle/wrapper/gradle-wrapper.properties b/example-bare/android/gradle/wrapper/gradle-wrapper.properties index e7646dea..79eb9d00 100644 --- a/example-bare/android/gradle/wrapper/gradle-wrapper.properties +++ b/example-bare/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/example-bare/android/gradlew b/example-bare/android/gradlew index 1aa94a42..f5feea6d 100755 --- a/example-bare/android/gradlew +++ b/example-bare/android/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/example-bare/android/gradlew.bat b/example-bare/android/gradlew.bat index f127cfd4..9d21a218 100644 --- a/example-bare/android/gradlew.bat +++ b/example-bare/android/gradlew.bat @@ -13,6 +13,8 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## @@ -26,6 +28,7 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -42,11 +45,11 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail diff --git a/example-bare/android/settings.gradle b/example-bare/android/settings.gradle index 5d743f9e..da906aa6 100644 --- a/example-bare/android/settings.gradle +++ b/example-bare/android/settings.gradle @@ -1,4 +1,27 @@ -rootProject.name = 'examplebare' +pluginManagement { + includeBuild(new File(["node", "--print", "require.resolve('@react-native/gradle-plugin/package.json')"].execute(null, rootDir).text.trim()).getParentFile().toString()) +} +plugins { id("com.facebook.react.settings") } + +extensions.configure(com.facebook.react.ReactSettingsExtension) { ex -> + if (System.getenv('EXPO_USE_COMMUNITY_AUTOLINKING') == '1') { + ex.autolinkLibrariesFromCommand() + } else { + def command = [ + 'node', + '--no-warnings', + '--eval', + 'require(require.resolve(\'expo-modules-autolinking\', { paths: [require.resolve(\'expo/package.json\')] }))(process.argv.slice(1))', + 'react-native-config', + '--json', + '--platform', + 'android' + ].toList() + ex.autolinkLibrariesFromCommand(command) + } +} + +rootProject.name = 'example-bare' dependencyResolutionManagement { versionCatalogs { @@ -11,8 +34,5 @@ dependencyResolutionManagement { apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle"); useExpoModules() -apply from: new File(["node", "--print", "require.resolve('@react-native-community/cli-platform-android/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim(), "../native_modules.gradle"); -applyNativeModulesSettingsGradle(settings) - include ':app' includeBuild(new File(["node", "--print", "require.resolve('@react-native/gradle-plugin/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim()).getParentFile()) diff --git a/example-bare/app.json b/example-bare/app.json index eeb82f81..d6f02a9c 100644 --- a/example-bare/app.json +++ b/example-bare/app.json @@ -8,6 +8,9 @@ ], "ios": { "bundleIdentifier": "com.jvjv33.example-bare" + }, + "android": { + "package": "com.jvjv33.examplebare" } }, "ios": {