Skip to content

Commit

Permalink
feat(native-app): Move app to nx (#17098)
Browse files Browse the repository at this point in the history
* feat: init nx create app stuff

* feat: copy src folder from app project

* feat: add dependencies

* feat: updating podFile

* feat copy ios folder from older project

* feat: copy android folder

* feat: final fixes for ios app working locally

* feat: remove old src folder

* feat: add readme

* feat: add storybook folder

* feat: add back test stuff in

* feat: add more stuff from old project

* feat: add all scripts to package.json

* feat: update packages that still have * to proper version

* feat: final additions

* feat: renaming app folder and removing old native folder

* fix: remove mobile from workspaces

* fix: remove extra extension

* feat: add back root level read me

* feat: add prettier and bundle config files

* remove google-services.json file

* feat: update gitignore file

* fix: path for e2e project.json

* chore: bump version to 1.4.8

* remove cache: true from nx.json

* add tags to project.json

* feat: fix yarn.lock

* fix: valid json in nx.json

* fix: remove app-e2e folder

* fix: update package.json

* feat: add license to package.json in app

* remove private: true to fix license check

* chore: nx format:write update dirty files

* fix: remove dom from lib in tsconfig.json

* update entryFilein project.json

* fix: update settings.gradle after android build failing

* fix: update import from build.gradle

* feat: use relative import for ui

* fix: remove duplicates from gitignore

* fix: remove from tsconfig things that are already inherited

* chore: remove babel-plugin-module-resolver

* remove webpack.config.js

* fix: update package.json to have same version as package.json in app

* fix: update yarn.lock

* fix: linting

* chore: update react version to match root project

* chore: update Podfile

* chore: remove patch for old version of rn

---------

Co-authored-by: andes-it <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 10, 2024
1 parent 818f74e commit 83ba8fa
Show file tree
Hide file tree
Showing 104 changed files with 1,774 additions and 711 deletions.
68 changes: 67 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,70 @@ apps/**/index.html
# E2E outputs
test-results/
playwright-report/
tmp-sessions/
tmp-sessions/

# React Native

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.dSYM.zip
*.xcuserstate
**/.xcode.env.local
ios/*.cer
ios/*.certSigningRequest
ios/*.mobileprovision
ios/*.p12

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
*.hprof
.cxx/
*.keystore
!debug.keystore
google-services.json
service-account.json

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

**/fastlane/report.xml
**/fastlane/Preview.html
**/fastlane/screenshots
**/fastlane/test_output

# Bundle artifact
*.jsbundle

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

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

# testing
/coverage
Binary file not shown.
14 changes: 14 additions & 0 deletions apps/native/app/.babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = function (api) {
api.cache(true)

return {
presets: [
['module:@react-native/babel-preset', { useTransformReactJSX: true }],
],
plugins: [
// react-native-reanimated/plugin has to be listed last.
// Reason: In short, the Reanimated babel plugin automatically converts special JavaScript functions (called worklets) to allow them to be passed and run on the UI thread.
'react-native-reanimated/plugin',
],
}
}
2 changes: 1 addition & 1 deletion apps/native/app/.bundle/config
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
BUNDLE_PATH: "vendor/bundle"
BUNDLE_FORCE_RUBY_PLATFORM: 1
BUNDLE_FORCE_RUBY_PLATFORM: 1
11 changes: 8 additions & 3 deletions apps/native/app/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"**/*.stories.tsx",
"lib/pdf417/*-min.js"
],
"rules": {},
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
Expand All @@ -20,7 +19,13 @@
"func-style": "off"
}
},
{ "files": ["*.ts", "*.tsx"], "rules": {} },
{ "files": ["*.js", "*.jsx"], "rules": {} }
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
}
]
}
81 changes: 0 additions & 81 deletions apps/native/app/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion apps/native/app/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ ruby ">= 2.6.10"
# 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'
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
4 changes: 2 additions & 2 deletions apps/native/app/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode getMyVersionCode(143)
versionName "1.4.7"
versionName "1.4.8"
manifestPlaceholders = [
appAuthRedirectScheme: "is.island.app" // project.config.get("BUNDLE_ID_ANDROID")
]
Expand Down Expand Up @@ -171,4 +171,4 @@ dependencies {
}
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
apply from: file("../../../../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
4 changes: 2 additions & 2 deletions apps/native/app/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
rootProject.name = 'IslandApp'

apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle");
apply from: file("../../../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle");
applyNativeModulesSettingsGradle(settings)

include ':app', ':react-native-code-push'
project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android/app')
project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../../../../node_modules/react-native-code-push/android/app')

include ':react-native-clipboard'
project(':react-native-clipboard').projectDir = new File(rootProject.projectDir, '../../node_modules/@react-native-clipboard/clipboard/android')
Expand Down
17 changes: 0 additions & 17 deletions apps/native/app/babel.config.js

This file was deleted.

10 changes: 5 additions & 5 deletions apps/native/app/ios/IslandApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../../../../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../../../../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
};
1D5D14183630A5603D9A6D3E /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -425,7 +425,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n";
shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../../../../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../../../../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -554,7 +554,7 @@
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../../../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
VALIDATE_PRODUCT = YES;
Expand Down Expand Up @@ -629,7 +629,7 @@
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../../../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
VALIDATE_PRODUCT = YES;
Expand Down Expand Up @@ -752,7 +752,7 @@
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../../../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
};
Expand Down
2 changes: 1 addition & 1 deletion apps/native/app/ios/IslandApp/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.4.7</string>
<string>1.4.8</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand Down
Loading

0 comments on commit 83ba8fa

Please sign in to comment.