Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Android Only react-native Upgrade to 0.73.x #18496

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,16 @@ def getEnvOrConfig = { varName ->
android {
ndkVersion rootProject.ext.ndkVersion

compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
compileSdk rootProject.ext.compileSdkVersion

kotlinOptions {
jvmTarget = JavaVersion.VERSION_17
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

namespace "im.status.ethereum"
Expand Down
4 changes: 1 addition & 3 deletions android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,5 @@
<!-- Remove licensing permission since we don't license our app and it blocks F-Droid submissions. -->
<uses-permission tools:node="remove" android:name="com.android.vending.CHECK_LICENSE"/>

<application tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" android:usesCleartextTraffic="true" >
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
</application>
<application tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" android:usesCleartextTraffic="true" />
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class MainActivity : NavigationActivity(), ActivityCompat.OnRequestPermissionsRe

private fun tryToEmit(eventName: String, event: WritableMap) {
try {
(getApplication() as MainApplication).getReactNativeHost()
(getApplication() as MainApplication).reactNativeHost
.getReactInstanceManager()
.getCurrentReactContext()
?.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
Expand Down
20 changes: 9 additions & 11 deletions android/app/src/main/java/im/status/ethereum/MainApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ class MainApplication : NavigationApplication() {
return BuildConfig.DEBUG
}

override fun getPackages(): List<ReactPackage> {
val statusPackage = StatusPackage(RootUtil.isDeviceRooted())
val packages = PackageList(this).getPackages()
packages.add(statusPackage)
packages.add(RNStatusKeycardPackage())
packages.add(PushNotificationPackage())
packages.add(BlurViewPackage())
return packages
override fun getPackages(): List<ReactPackage> =
PackageList(this).packages.apply {
// Packages that cannot be autolinked yet can be added manually here
add(StatusPackage(RootUtil.isDeviceRooted()))
add(RNStatusKeycardPackage())
add(PushNotificationPackage())
add(BlurViewPackage())
}

override fun getJSMainModuleName(): String = "index"
Expand All @@ -42,9 +41,8 @@ class MainApplication : NavigationApplication() {
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
}

override fun getReactNativeHost(): ReactNativeHost {
return mReactNativeHost
}
override val reactNativeHost: ReactNativeHost
get() = mReactNativeHost

override fun onCreate() {
super.onCreate()
Expand Down
18 changes: 4 additions & 14 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ ext {
supportLibVersion = project.supportLibVersion
gradlePluginVersion = project.gradlePluginVersion
kotlinVersion = project.kotlinPluginVersion
kotlinPluginVersion = project.kotlinPluginVersion
kotlinToolsVersion = project.kotlinToolsVersion
ndkVersion = "25.2.9519653"
}

Expand All @@ -28,23 +30,11 @@ buildscript {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${project.ext.kotlinPluginVersion}"
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
}
}

subprojects {
afterEvaluate {
if (project.hasProperty("android")) {
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
targetSdkVersion rootProject.ext.targetSdkVersion
}
}
}
}
}
apply plugin: "com.facebook.react.rootproject"

allprojects {
beforeEvaluate {
Expand Down
2 changes: 2 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
# $keytool -genkey -v -keystore ./status-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias status

# Version requirements used throughout the Gradle scripts
kotlinVersion=1.7.22
kotlinToolsVersion=1.8.0
minSdkVersion=24
compileSdkVersion=33
targetSdkVersion=33
Expand Down
17 changes: 1 addition & 16 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,4 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
presets: ['module:@react-native/babel-preset'],
plugins: ['react-native-reanimated/plugin', '@babel/plugin-transform-named-capturing-groups-regex'],
env: {
test: {
presets: [
'@babel/preset-react',
[
'@babel/preset-env',
{
targets: {
node: 'current',
},
},
],
],
},
},
};
96 changes: 0 additions & 96 deletions ci/Jenkinsfile.ios

This file was deleted.

Loading