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

fix: example deps update #256

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions .github/workflows/e2e-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ jobs:
working-directory: example
run: yarn e2e:build:android-release || yarn e2e:build:android-release

- name: Show build outputs
working-directory: example
run: tree android/app/build/outputs/
# - name: Show build outputs
# working-directory: example
# run: tree android/app/build/outputs/

- name: Kill java processes
run: pkill -9 -f java || true
Expand Down
26 changes: 25 additions & 1 deletion .github/workflows/mocha-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,31 @@ jobs:
disable-animations: true
working-directory: example
script: |
../.github/workflows/mocha-anrdoid.sh
adb root
adb reverse tcp:3003 tcp:3003
adb reverse tcp:8090 tcp:8090
adb reverse tcp:9090 tcp:9090
adb reverse tcp:9091 tcp:9091
adb reverse tcp:9092 tcp:9092
adb reverse tcp:9735 tcp:9735
adb reverse tcp:9736 tcp:9736
adb reverse tcp:9737 tcp:9737
adb reverse tcp:18080 tcp:18080
adb reverse tcp:28081 tcp:28081
adb reverse tcp:60001 tcp:60001
adb shell date `date +%m%d%H%M%G.%S`
set +e
yarn test:mocha:android
EXIT_CODE=$?
set -e
echo $EXIT_CODE;
if [ $EXIT_CODE -ne 0 ]; then
sleep 10
adb pull /data/user/0/com.exmpl/files/ldk/ /mnt/artifacts/
fi
sleep 10
echo "Test finished"
exit $EXIT_CODE

- uses: actions/upload-artifact@v4
if: failure()
Expand Down
2 changes: 1 addition & 1 deletion example/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
root: true,
extends: '@react-native',
extends: ['@react-native', 'plugin:prettier/recommended'],
parser: '@typescript-eslint/parser',
env: {
jest: true,
Expand Down
12 changes: 10 additions & 2 deletions example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ DerivedData
*.hmap
*.ipa
*.xcuserstate
ios/.xcode.env.local
**/.xcode.env.local

# Android/IntelliJ
#
Expand Down Expand Up @@ -56,7 +56,7 @@ yarn-error.log
*.jsbundle

# Ruby / CocoaPods
/ios/Pods/
**/Pods/
/vendor/bundle/

# Temporary files created by Metro to check the health of the file watcher
Expand All @@ -65,4 +65,12 @@ yarn-error.log
# testing
/coverage

# Yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

/artifacts/
3 changes: 3 additions & 0 deletions example/.yarnrc.yml_
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.6.4.cjs
5 changes: 4 additions & 1 deletion example/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ source 'https://rubygems.org'
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby ">= 2.6.10"

gem 'cocoapods', '~> 1.12'
# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
# bound in the template on Cocoapods with next React Native release.
gem 'cocoapods', '>= 1.13', '< 1.15'
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
11 changes: 3 additions & 8 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"

/**
Expand Down Expand Up @@ -70,8 +71,8 @@ def jscFlavor = 'org.webkit:android-jsc:+'

android {
ndkVersion rootProject.ext.ndkVersion

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

namespace "com.exmpl"
defaultConfig {
Expand Down Expand Up @@ -114,12 +115,6 @@ dependencies {
implementation("com.facebook.react:react-android")
implementation files("../../node_modules/@synonymdev/react-native-ldk/android/libs/LDK-release.aar")

debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.squareup.okhttp3', module:'okhttp'
}

debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
} else {
Expand Down
4 changes: 1 addition & 3 deletions example/android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,5 @@
<application
android:usesCleartextTraffic="true"
tools:targetApi="28"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
</application>
tools:ignore="GoogleAppIndexingWarning"/>
</manifest>

This file was deleted.

32 changes: 0 additions & 32 deletions example/android/app/src/main/java/com/exmpl/MainActivity.java

This file was deleted.

22 changes: 22 additions & 0 deletions example/android/app/src/main/java/com/exmpl/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.exmpl

import com.facebook.react.ReactActivity
import com.facebook.react.ReactActivityDelegate
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
import com.facebook.react.defaults.DefaultReactActivityDelegate

class MainActivity : ReactActivity() {

/**
* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
*/
override fun getMainComponentName(): String = "exmpl"

/**
* Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
*/
override fun createReactActivityDelegate(): ReactActivityDelegate =
DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
}
62 changes: 0 additions & 62 deletions example/android/app/src/main/java/com/exmpl/MainApplication.java

This file was deleted.

43 changes: 43 additions & 0 deletions example/android/app/src/main/java/com/exmpl/MainApplication.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package com.exmpl

import android.app.Application
import com.facebook.react.PackageList
import com.facebook.react.ReactApplication
import com.facebook.react.ReactHost
import com.facebook.react.ReactNativeHost
import com.facebook.react.ReactPackage
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.soloader.SoLoader

class MainApplication : Application(), ReactApplication {

override val reactNativeHost: ReactNativeHost =
object : DefaultReactNativeHost(this) {
override fun getPackages(): List<ReactPackage> =
PackageList(this).packages.apply {
// Packages that cannot be autolinked yet can be added manually here, for example:
// add(MyReactNativePackage())
}

override fun getJSMainModuleName(): String = "index"

override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG

override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
}

override val reactHost: ReactHost
get() = getDefaultReactHost(applicationContext, reactNativeHost)

override fun onCreate() {
super.onCreate()
SoLoader.init(this, false)
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load()
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
>

<selector>
<!--
Expand Down
Loading
Loading