Skip to content
Merged
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
7 changes: 0 additions & 7 deletions apps/expo-go/.eslintignore

This file was deleted.

1 change: 0 additions & 1 deletion apps/expo-go/.eslintrc.js

This file was deleted.

24 changes: 4 additions & 20 deletions apps/expo-go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ If you need to make native code changes to your Expo project, such as adding cus
- Run `yarn setup:native` in the root directory.
- Run `yarn build` in the `packages/expo` directory.


## Building Expo Go

1. Set up React Native
Expand All @@ -45,20 +44,16 @@ Go to the `react-native-lab/react-native` directory and run `yarn install` to in

You can build the React Native Android dep using `./gradlew :packages:react-native:ReactAndroid:buildCMakeDebug` in `react-native-lab/react-native` directory. This is optional because React Native will be built anyway when you build Expo Go, but can help to narrow down a potential issue surface area.

2. Run `yarn start` in `apps/expo-go` directory to start Metro

Metro needs to run prior running the build. Verify it runs on port 80. This is because `et android-generate-dynamic-macros` / `et ios-generate-dynamic-macros` is run during the build and needs Metro on port 80 to be running.

3. Build Expo Go
2. Build Expo Go

For Android, run `./gradlew app:assembleDebug` in the `apps/expo-go/android` directory.

For iOS:

- run `pod install` in the `apps/expo-go/ios` directory
- set `DEV_KERNEL_SOURCE` to `LOCAL` in `EXBuildConstants.plist`
- open and run `ios/Exponent.xcworkspace` in Xcode.

4. Run Metro for Native Component List
3. Run Metro for Native Component List

- `cd apps/native-component-list`
- `EXPO_SDK_VERSION=UNVERSIONED npx expo start --clear`
Expand All @@ -67,17 +62,6 @@ Use the Expo Go app that you built in the previous step to scan the QR code and

## Troubleshooting

- If you see
```
error: ReferenceError: SHA-1 for file /Users/vojta/_dev/expo/react-native-lab/react-native/packages/polyfills/console.js (/Users/vojta/_dev/expo/react-native-lab/react-native/packages/polyfills/console.js) is not computed.
Potential causes:
1) You have symlinks in your project - watchman does not follow symlinks.
2) Check `blockList` in your metro.config.js and make sure it isn't excluding the file path.
```

run `rm -rf ./react-native-lab/react-native/node_modules`

- If you're seeing C++ related errors, run `find . -name ".cxx" -type d -prune -exec rm -rf '{}' +` which clears `.cxx` build artifacts. Alternatively, use the "nuke" approach below.
- If you get `A valid Firebase Project ID is required to communicate with Firebase server APIs.`, make sure you Metro is running in the `apps/expo-go` directory and run `et android-generate-dynamic-macros`.
- You might need clean the project before building it. Run `./gradlew clean` in the `apps/expo-go/android` directory.
- the "nuke" option is `git submodule foreach --recursive git clean -xfd` and / or `git clean -xfd` which removes all untracked files so you need to run the setup script `./scripts/download-dependencies.sh` again and building then takes a bit longer - but this approach appears to be effective.
- The "nuke" option is `git submodule foreach --recursive git clean -xfd` and / or `git clean -xfd` which removes all untracked files so you need to run the setup script `./scripts/download-dependencies.sh` again and building then takes a bit longer - but this approach appears to be effective.
13 changes: 7 additions & 6 deletions apps/expo-go/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ buildscript {
apply plugin: 'com.android.application'
apply plugin: 'org.jetbrains.kotlin.android'
apply plugin: 'com.google.firebase.crashlytics'

def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
apply from: expoModulesCorePlugin
applyKotlinExpoModulesCorePlugin()
useDefaultAndroidSdkVersions()

apply plugin: 'com.facebook.react'

react {
Expand All @@ -49,6 +43,11 @@ react {
}

android {
ndkVersion rootProject.ext.ndkVersion

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

namespace "host.exp.exponent"

buildFeatures {
Expand All @@ -57,6 +56,8 @@ android {

defaultConfig {
applicationId 'host.exp.exponent'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 229
versionName '55.0.2'

Expand Down
11 changes: 4 additions & 7 deletions apps/expo-go/android/expoview/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@ plugins {
alias libs.plugins.download
id("org.jetbrains.kotlin.plugin.compose") version "2.2.21"
id("org.jetbrains.kotlin.plugin.serialization") version "2.2.21" // Use your Kotlin version
id 'expo-module-gradle-plugin'
}
apply plugin: 'kotlin-kapt'
apply from: new File(rootDir, "versioning_linking.gradle")
apply plugin: 'com.apollographql.apollo'

expoModule {
canBePublished false
}

def reactProperties = new Properties()
file("${project(':packages:react-native:ReactAndroid').projectDir}/gradle.properties").withInputStream { reactProperties.load(it) }
Expand All @@ -36,18 +40,11 @@ group = 'host.exp.exponent'
version = '45.0.0'
// WHEN_VERSIONING_REMOVE_TO_HERE

def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
apply from: expoModulesCorePlugin
applyKotlinExpoModulesCorePlugin()
useDefaultAndroidSdkVersions()
useExpoPublishing()

repositories {
mavenCentral()
maven { url "https://jitpack.io" }
}


apply plugin: 'com.facebook.react'
apply plugin: 'org.jetbrains.kotlin.plugin.compose'

Expand Down
1 change: 0 additions & 1 deletion apps/expo-go/android/sdkVersions.json

This file was deleted.

38 changes: 0 additions & 38 deletions apps/expo-go/app.json

This file was deleted.

10 changes: 5 additions & 5 deletions apps/expo-go/ios/Build-Phases/generate-dynamic-macros.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ EXPO_DIR="$(cd "$IOS_DIR/../../.." && pwd)"

# Key paths
EXPO_GO_DIR="$EXPO_DIR/apps/expo-go"
APP_JSON="$EXPO_GO_DIR/app.json"
SDK_VERSIONS_JSON="$EXPO_GO_DIR/sdkVersions.json"
INFO_PLIST="$IOS_DIR/Exponent/Supporting/Info.plist"
BUILD_CONSTANTS_PLIST="$IOS_DIR/Exponent/Supporting/EXBuildConstants.plist"
TEMPLATE_FILES_DIR="$EXPO_DIR/template-files"
Expand Down Expand Up @@ -219,12 +219,12 @@ resolve_macros() {
fi
echo "Resolved TEST_RUN_ID macro to \"$TEST_RUN_ID\""

# TEMPORARY_SDK_VERSION (from app.json)
if [[ -f "$APP_JSON" ]]; then
TEMPORARY_SDK_VERSION=$(json_read "$APP_JSON" ".expo.sdkVersion")
# TEMPORARY_SDK_VERSION (from sdkVersions.json)
if [[ -f "$SDK_VERSIONS_JSON" ]]; then
TEMPORARY_SDK_VERSION=$(json_read "$SDK_VERSIONS_JSON" ".sdkVersion")
else
TEMPORARY_SDK_VERSION=""
echo "Warning: app.json not found at $APP_JSON"
echo "Warning: sdkVersions.json not found at $SDK_VERSIONS_JSON"
fi
echo "Resolved TEMPORARY_SDK_VERSION macro to \"$TEMPORARY_SDK_VERSION\""

Expand Down
1 change: 0 additions & 1 deletion apps/expo-go/ios/Exponent/Supporting/sdkVersions.json

This file was deleted.

4 changes: 2 additions & 2 deletions apps/expo-go/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4742,7 +4742,7 @@ SPEC CHECKSUMS:
ExpoVideoThumbnails: 7e5f6bddec993b7930b41fd47646a27e4f8133e9
ExpoWebBrowser: 19c5d250e0c101027677970a5f2fc635d9df2e73
EXStructuredHeaders: aa49a5557fa24aa61dda4ac665f3987bf3e9e35d
EXUpdates: 5b1b025edd0e9596b8633a62e0792c17f0e8c932
EXUpdates: 427abdf3ad98db45733c1497cf60ce04c179dc8f
EXUpdatesInterface: 26412751a0f7a7130614655929e316f684552aab
fast_float: b32c788ed9c6a8c584d114d0047beda9664e7cc6
FBLazyVector: f1200e6ef6cf24885501668bdbb9eff4cf48843f
Expand All @@ -4759,7 +4759,7 @@ SPEC CHECKSUMS:
GoogleAppMeasurement: 8a82b93a6400c8e6551c0bcd66a9177f2e067aed
GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d
hermes-engine: ca6495d9d859ae100566305c4d0afe7a0c777a46
hermes-engine: a785894172be9ea26a2d808760e5954874576bd8
libavif: 84bbb62fb232c3018d6f1bab79beea87e35de7b7
libdav1d: 23581a4d8ec811ff171ed5e2e05cd27bad64c39f
libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8
Expand Down
1 change: 1 addition & 0 deletions apps/expo-go/sdkVersions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"sdkVersion":"55.0.0"}
14 changes: 0 additions & 14 deletions apps/expo-go/tsconfig.json

This file was deleted.

33 changes: 4 additions & 29 deletions packages/expo-module-template-local/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,36 +1,11 @@
apply plugin: 'com.android.library'
plugins {
id 'com.android.library'
id 'expo-module-gradle-plugin'
}

group = '<%- project.package %>'
version = '0.7.8'

def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
apply from: expoModulesCorePlugin
applyKotlinExpoModulesCorePlugin()
useCoreDependencies()
useExpoPublishing()

// If you want to use the managed Android SDK versions from expo-modules-core, set this to true.
// The Android SDK versions will be bumped from time to time in SDK releases and may introduce breaking changes in your module code.
// Most of the time, you may like to manage the Android SDK versions yourself.
def useManagedAndroidSdkVersions = false
if (useManagedAndroidSdkVersions) {
useDefaultAndroidSdkVersions()
} else {
buildscript {
// Simple helper that allows the root project to override versions declared by this library.
ext.safeExtGet = { prop, fallback ->
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}
}
project.android {
compileSdkVersion safeExtGet("compileSdkVersion", 36)
defaultConfig {
minSdkVersion safeExtGet("minSdkVersion", 24)
targetSdkVersion safeExtGet("targetSdkVersion", 36)
}
}
}

android {
namespace "<%- project.package %>"
defaultConfig {
Expand Down
33 changes: 4 additions & 29 deletions packages/expo-module-template/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,36 +1,11 @@
apply plugin: 'com.android.library'
plugins {
id 'com.android.library'
id 'expo-module-gradle-plugin'
}

group = '<%- project.package %>'
version = '<%- project.version %>'

def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
apply from: expoModulesCorePlugin
applyKotlinExpoModulesCorePlugin()
useCoreDependencies()
useExpoPublishing()

// If you want to use the managed Android SDK versions from expo-modules-core, set this to true.
// The Android SDK versions will be bumped from time to time in SDK releases and may introduce breaking changes in your module code.
// Most of the time, you may like to manage the Android SDK versions yourself.
def useManagedAndroidSdkVersions = false
if (useManagedAndroidSdkVersions) {
useDefaultAndroidSdkVersions()
} else {
buildscript {
// Simple helper that allows the root project to override versions declared by this library.
ext.safeExtGet = { prop, fallback ->
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}
}
project.android {
compileSdkVersion safeExtGet("compileSdkVersion", 36)
defaultConfig {
minSdkVersion safeExtGet("minSdkVersion", 24)
targetSdkVersion safeExtGet("targetSdkVersion", 36)
}
}
}

android {
namespace "<%- project.package %>"
defaultConfig {
Expand Down
9 changes: 8 additions & 1 deletion tools/src/Npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,14 @@ export async function grantReadWriteAccessAsync(
packageName: string,
teamName: string
): Promise<void> {
await spawnAsync('npm', ['access', 'grant', 'read-write', teamName, packageName]);
await spawnAsync('npm', [
'access',
'grant',
'read-write',
teamName,
packageName,
...maybeNpmOtpFlag(),
]);
}

/**
Expand Down
Loading
Loading