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

[DO NOT MERGE] - eas spike #11315

Draft
wants to merge 33 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
c12c5d3
configure eas build, first pass
brainbicycle Dec 5, 2024
904f8ac
add expo as dev dep
brainbicycle Dec 5, 2024
4757d46
erroneous char in devmenu
brainbicycle Dec 5, 2024
08c8e5a
add eas-cli dev dep
brainbicycle Dec 5, 2024
aab5326
minor eas config updates
brainbicycle Dec 5, 2024
08ecd76
skip pre-commit hook during merge
brainbicycle Dec 12, 2024
9ba9a5c
Merge remote-tracking branch 'origin/main' into brian/eas-spike
brainbicycle Dec 12, 2024
0c204c9
so much fun with node_modules
brainbicycle Dec 12, 2024
b564b6a
hardcode bundle id to workaround expo issue
brainbicycle Dec 12, 2024
455387e
hardcode some more bundle ids to workaround expo issue
brainbicycle Dec 12, 2024
826e058
put valid version num in plist
brainbicycle Dec 12, 2024
a4678f6
hardcode bundle ids for dev builds
brainbicycle Dec 12, 2024
48446a3
placeholder script for a local build
brainbicycle Dec 12, 2024
6b6b9aa
automatic project changes
brainbicycle Dec 12, 2024
d95bb90
non-working workaround for env copy
brainbicycle Dec 13, 2024
8cc0de6
remove cocoapods patch, interfering with pod install in expo
brainbicycle Dec 13, 2024
1ff44f1
temp add back ORStackView patch to fix eas build
brainbicycle Dec 16, 2024
69c0f6c
podfile churn
brainbicycle Dec 16, 2024
ae9d3ba
attempt to generate easignore file
brainbicycle Dec 16, 2024
c9d71f1
local build script organized
brainbicycle Dec 16, 2024
941a6d6
remove codepush dep
brainbicycle Dec 18, 2024
800aabb
remove codepush refs on js side
brainbicycle Dec 18, 2024
52ceb7a
remove codepush native dep
brainbicycle Dec 18, 2024
4f32eb8
remove codepush android native side
brainbicycle Dec 18, 2024
3e0c6b1
remove codepush iOS native side
brainbicycle Dec 18, 2024
02be216
fix rxjs conflicting packages
brainbicycle Dec 18, 2024
d794ff5
remove appcenter dev dep
brainbicycle Dec 18, 2024
021a237
add empty expo key
brainbicycle Dec 18, 2024
af2aaa3
missed android file change
brainbicycle Dec 19, 2024
5478d78
npx install-expo-modules@latest failed modifying appdelegate
brainbicycle Dec 19, 2024
0cd8fed
add expo package
brainbicycle Dec 19, 2024
ccfcf4d
manual expo project modifications
brainbicycle Dec 19, 2024
60f732d
install pods after expo integration
brainbicycle Dec 19, 2024
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
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,20 @@ Brewfile.lock.json
# for tsconfig `incremental`
tsconfig.tsbuildinfo


# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*

# expo
.easignore

#########################################################
# Keep this rule last.
# Keep these, so we can keep the folders these appear in.
!.gitkeep
#########################################################

main.jsbundle.map
main.jsbundle.map
# Expo
.expo
dist/
web-build/
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

# Skip pre-commit during a merge
if git rev-parse -q --verify MERGE_HEAD > /dev/null 2>&1; then
echo "Merge in progress; skipping pre-commit hook."
exit 0
fi

yarn lint-staged
6 changes: 5 additions & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ project.ext.envConfigFiles = [
]

apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"
apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"

/**
* This is the configuration block to customize your React Native Android app.
Expand Down Expand Up @@ -62,6 +61,11 @@ react {

/* Autolinking */
autolinkLibrariesWithApp()
//
// Added by install-expo-modules
entryFile = file(["node", "-e", "require('expo/scripts/resolveAppEntry')", rootDir.getAbsoluteFile().getParentFile().getAbsolutePath(), "android", "absolute"].execute(null, rootDir).text.trim())
cliFile = new File(["node", "--print", "require.resolve('@expo/cli')"].execute(null, rootDir).text.trim())
bundleCommand = "export:embed"
}

/**
Expand Down
3 changes: 2 additions & 1 deletion android/app/src/main/java/net/artsy/app/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package net.artsy.app
import expo.modules.ReactActivityDelegateWrapper

import android.graphics.Color
import android.os.Build
Expand Down Expand Up @@ -34,7 +35,7 @@ class MainActivity : ReactActivity() {
* which allows you to enable New Architecture with a single boolean flag [fabricEnabled].
*/
override fun createReactActivityDelegate(): ReactActivityDelegate =
DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
ReactActivityDelegateWrapper(this, BuildConfig.IS_NEW_ARCHITECTURE_ENABLED, DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled))

private fun isTablet(): Boolean {
return (this.resources.configuration.screenLayout
Expand Down
18 changes: 13 additions & 5 deletions android/app/src/main/java/net/artsy/app/MainApplication.kt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
package net.artsy.app
import android.content.res.Configuration
import expo.modules.ApplicationLifecycleDispatcher
import expo.modules.ReactNativeHostWrapper

import android.app.Application
import android.content.Context
Expand All @@ -16,15 +19,14 @@ import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.soloader.SoLoader
import com.google.firebase.messaging.FirebaseMessaging
import com.microsoft.codepush.react.CodePush
import com.segment.analytics.Analytics
import net.artsy.app.utils.ReactNativeConfigUtils
import io.sentry.react.RNSentryPackage

class MainApplication : Application(), ReactApplication {

override val reactNativeHost: ReactNativeHost =
object : DefaultReactNativeHost(this) {
ReactNativeHostWrapper(this, 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:
Expand All @@ -38,10 +40,10 @@ class MainApplication : Application(), ReactApplication {

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)
get() = ReactNativeHostWrapper.createReactHost(applicationContext, reactNativeHost)


override fun onCreate() {
Expand All @@ -66,5 +68,11 @@ class MainApplication : Application(), ReactApplication {
Analytics.setSingletonInstance(analytics)

registerActivityLifecycleCallbacks(BrazeActivityLifecycleCallbackListener())
}
ApplicationLifecycleDispatcher.onApplicationCreate(this)
}

override fun onConfigurationChanged(newConfig: Configuration) {
super.onConfigurationChanged(newConfig)
ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig)
}
}
1 change: 0 additions & 1 deletion android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
<string name="facebook_app_id">308278682573501</string>
<string name="facebook_client_token">5407e54f59d45eab502144b2e6943c6e</string>
<string name="fb_login_protocol_scheme">fb308278682573501</string>
<string moduleConfig="true" name="CodePushDeploymentKey">fake_deployment_key</string>
</resources>
6 changes: 4 additions & 2 deletions android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
plugins { id("com.facebook.react.settings") }
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
rootProject.name = 'Artsy'
include ':app', ':react-native-code-push'
project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android/app')
include ':app'
includeBuild('../node_modules/@react-native/gradle-plugin')

apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle")
useExpoModules()
10 changes: 9 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,13 @@
"version": "8.59.0",
"isAndroidBeta": false,
"codePushReleaseName": "none",
"codePushDist": "none"
"codePushDist": "none",
"expo": {
"name": "Artsy"
},
"extra": {
"eas": {
"projectId": "39b092dc-effa-4d59-a530-85107bdfd668"
}
}
}
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module.exports = (api) => {
// presets run after
presets: [
[
"module:@react-native/babel-preset",
"babel-preset-expo",
{ useTransformReactJSXExperimental: true }, // this is so `import React from "react"` is not needed.
],
// TODO: Remove this once we determine if its actually needed. Added during reanimated upgrade.
Expand Down
30 changes: 30 additions & 0 deletions eas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"cli": {
"version": "14.1.0",
"appVersionSource": "remote"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal",
"ios": {
"scheme": "Artsy",
"buildConfiguration": "Debug"
}
},
"preview": {
"distribution": "internal",
"ios": {
"scheme": "Artsy",
"buildConfiguration": "Debug",
"simulator": true
}
},
"production": {
"autoIncrement": true
}
},
"submit": {
"production": {}
}
}
Loading