Skip to content

Commit dbcdd72

Browse files
authored
Merge pull request #473 from maksymilian-majer/feature/expo-lint-upgrade
Expo + Lint update
2 parents 2697e06 + 4bdbde6 commit dbcdd72

28 files changed

+3979
-4221
lines changed

.eslintignore

Lines changed: 0 additions & 10 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 104 deletions
This file was deleted.

__mocks__/expo-localization.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export const locale = 'en-US';
2+
export const locales = ['en-US'];
3+
export const timezone = 'UTC';
4+
export const isRTL = false;

android/app/build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ react {
1414
hermesCommand = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/sdks/hermesc/%OS-BIN%/hermesc"
1515
codegenDir = new File(["node", "--print", "require.resolve('@react-native/codegen/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim()).getParentFile().getAbsoluteFile()
1616

17+
enableBundleCompression = (findProperty('android.enableBundleCompression') ?: false).toBoolean()
1718
// Use Expo CLI to bundle the app, this ensures the Metro config
1819
// works correctly with Expo projects.
1920
cliFile = new File(["node", "--print", "require.resolve('@expo/cli', { paths: [require.resolve('expo/package.json')] })"].execute(null, rootDir).text.trim())
@@ -78,7 +79,7 @@ def enableProguardInReleaseBuilds = (findProperty('android.enableProguardInRelea
7879
* give correct results when using with locales other than en-US. Note that
7980
* this variant is about 6MiB larger per architecture than default.
8081
*/
81-
def jscFlavor = 'org.webkit:android-jsc:+'
82+
def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'
8283

8384
android {
8485
ndkVersion rootProject.ext.ndkVersion
@@ -156,15 +157,15 @@ dependencies {
156157

157158
if (isGifEnabled) {
158159
// For animated gif support
159-
implementation("com.facebook.fresco:animated-gif:${reactAndroidLibs.versions.fresco.get()}")
160+
implementation("com.facebook.fresco:animated-gif:${expoLibs.versions.fresco.get()}")
160161
}
161162

162163
if (isWebpEnabled) {
163164
// For webp support
164-
implementation("com.facebook.fresco:webpsupport:${reactAndroidLibs.versions.fresco.get()}")
165+
implementation("com.facebook.fresco:webpsupport:${expoLibs.versions.fresco.get()}")
165166
if (isWebpAnimatedEnabled) {
166167
// Animated webp support
167-
implementation("com.facebook.fresco:animated-webp:${reactAndroidLibs.versions.fresco.get()}")
168+
implementation("com.facebook.fresco:animated-webp:${expoLibs.versions.fresco.get()}")
168169
}
169170
}
170171

android/app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
<category android:name="android.intent.category.DEFAULT"/>
2626
<category android:name="android.intent.category.BROWSABLE"/>
2727
<data android:scheme="obytesApp"/>
28-
<data android:scheme="com.obytes.development"/>
2928
<data android:scheme="exp+obytesapp"/>
3029
</intent-filter>
3130
</activity>

android/app/src/main/java/com/obytes/development/MainApplication.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
package com.obytes.development
2+
import com.facebook.react.common.assets.ReactFontManager
23

34
import android.app.Application
45
import android.content.res.Configuration
@@ -24,7 +25,7 @@ class MainApplication : Application(), ReactApplication {
2425
override fun getPackages(): List<ReactPackage> {
2526
val packages = PackageList(this).packages
2627
// Packages that cannot be autolinked yet can be added manually here, for example:
27-
// packages.add(new MyReactNativePackage());
28+
// packages.add(MyReactNativePackage())
2829
return packages
2930
}
3031

@@ -42,6 +43,9 @@ class MainApplication : Application(), ReactApplication {
4243

4344
override fun onCreate() {
4445
super.onCreate()
46+
// @generated begin xml-fonts-init - expo prebuild (DO NOT MODIFY) sync-da39a3ee5e6b4b0d3255bfef95601890afd80709
47+
48+
// @generated end xml-fonts-init
4549
SoLoader.init(this, OpenSourceMergedSoMapping)
4650
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
4751
// If you opted-in for the New Architecture, we load the native entry point for this app.

android/app/src/main/res/values/styles.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
<resources xmlns:tools="http://schemas.android.com/tools">
22
<style name="AppTheme" parent="Theme.EdgeToEdge">
3-
<item name="android:textColor">@android:color/black</item>
4-
<item name="android:editTextStyle">@style/ResetEditText</item>
53
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
64
<item name="colorPrimary">@color/colorPrimary</item>
75
</style>
8-
<style name="ResetEditText" parent="@android:style/Widget.EditText">
9-
<item name="android:padding">0dp</item>
10-
<item name="android:textColorHint">#c8c8c8</item>
11-
<item name="android:textColor">@android:color/black</item>
12-
</style>
136
<style name="Theme.App.SplashScreen" parent="Theme.SplashScreen">
147
<item name="windowSplashScreenBackground">@color/splashscreen_background</item>
158
<item name="windowSplashScreenAnimatedIcon">@drawable/splashscreen_logo</item>

android/build.gradle

Lines changed: 28 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,37 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext {
5-
buildToolsVersion = findProperty('android.buildToolsVersion') ?: '35.0.0'
6-
minSdkVersion = Integer.parseInt(findProperty('android.minSdkVersion') ?: '24')
7-
compileSdkVersion = Integer.parseInt(findProperty('android.compileSdkVersion') ?: '35')
8-
targetSdkVersion = Integer.parseInt(findProperty('android.targetSdkVersion') ?: '34')
9-
kotlinVersion = findProperty('android.kotlinVersion') ?: '1.9.24'
10-
11-
ndkVersion = "26.1.10909125"
12-
}
13-
repositories {
14-
google()
15-
mavenCentral()
16-
}
17-
dependencies {
18-
classpath('com.android.tools.build:gradle')
19-
classpath('com.facebook.react:react-native-gradle-plugin')
20-
classpath('org.jetbrains.kotlin:kotlin-gradle-plugin')
21-
}
4+
repositories {
5+
google()
6+
mavenCentral()
7+
}
8+
dependencies {
9+
classpath('com.android.tools.build:gradle')
10+
classpath('com.facebook.react:react-native-gradle-plugin')
11+
classpath('org.jetbrains.kotlin:kotlin-gradle-plugin')
12+
}
2213
}
2314

24-
apply plugin: "com.facebook.react.rootproject"
15+
def reactNativeAndroidDir = new File(
16+
providers.exec {
17+
workingDir(rootDir)
18+
commandLine("node", "--print", "require.resolve('react-native/package.json')")
19+
}.standardOutput.asText.get().trim(),
20+
"../android"
21+
)
2522

2623
allprojects {
27-
repositories {
28-
maven {
29-
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
30-
url(new File(['node', '--print', "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), '../android'))
31-
}
32-
maven {
33-
// Android JSC is installed from npm
34-
url(new File(['node', '--print', "require.resolve('jsc-android/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim(), '../dist'))
35-
}
36-
37-
google()
38-
mavenCentral()
39-
maven { url 'https://www.jitpack.io' }
24+
repositories {
25+
maven {
26+
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
27+
url(reactNativeAndroidDir)
4028
}
29+
30+
google()
31+
mavenCentral()
32+
maven { url 'https://www.jitpack.io' }
33+
}
4134
}
35+
36+
apply plugin: "expo-root-project"
37+
apply plugin: "com.facebook.react.rootproject"

android/gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,6 @@ EX_DEV_CLIENT_NETWORK_INSPECTOR=true
5454

5555
# Use legacy packaging to compress native libraries in the resulting APK.
5656
expo.useLegacyPackaging=false
57+
58+
# Whether the app is configured to use edge-to-edge via the app config or `react-native-edge-to-edge` plugin
59+
expo.edgeToEdgeEnabled=true

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)