mirror of
https://github.com/expo/turtle.git
synced 2026-11-14 19:12:55 -10:00
Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2ac87171d0 | ||
|
|
7af5a01c17 | ||
|
|
23fbf5ffb4 | ||
|
|
7a80d92e72 |
No files matched your search
@@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
### Changed
|
||||
- Enabled back optional modules support, but only for specific unimodules.
|
||||
- Updated SDK34 Android shell app with latest fixes (up to 2.12.2)
|
||||
- Updated SDK34 iOS shell app with latest fixes (up to 2.12.3)
|
||||
|
||||
## [0.10.0] - 2019-08-01
|
||||
### Changed
|
||||
|
||||
@@ -1 +1 @@
|
||||
s3://exp-artifacts/android-shell-builder-5e004e9c1a55d4d9c26e221b634a8246080b6e38.tar.gz
|
||||
s3://exp-artifacts/android-shell-builder-d1aabbbe9d124201bf453fa985c36324ae4b76fb.tar.gz
|
||||
@@ -1 +1 @@
|
||||
s3://exp-artifacts/ios-shell-builder-sdk-latest-f7aab5cac069205d0f939bd686a9c0f9239ea6cd.tar.gz
|
||||
s3://exp-artifacts/ios-shell-builder-sdk-latest-7c4c6866646398874a092769299036e8d22e8d49.tar.gz
|
||||
@@ -3,6 +3,7 @@ import path from 'path';
|
||||
import { AndroidShellApp, ImageUtils } from '@expo/xdl';
|
||||
import fs from 'fs-extra';
|
||||
import _ from 'lodash';
|
||||
import semver from 'semver';
|
||||
import { ANDROID_BUILD_TYPES } from 'turtle/constants';
|
||||
import uuidv4 from 'uuid/v4';
|
||||
|
||||
@@ -10,6 +11,7 @@ import getOrCreateCredentials from 'turtle/builders/utils/android/credentials';
|
||||
import { formatShellAppDirectory } from 'turtle/builders/utils/android/workingdir';
|
||||
import * as commonUtils from 'turtle/builders/utils/common';
|
||||
import * as imageHelpers from 'turtle/builders/utils/image';
|
||||
import { resolveExplicitOptIn } from 'turtle/builders/utils/unimodules';
|
||||
import { uploadBuildToS3 } from 'turtle/builders/utils/uploader';
|
||||
import { ensureCanBuildSdkVersion } from 'turtle/builders/utils/version';
|
||||
import config from 'turtle/config';
|
||||
@@ -71,14 +73,15 @@ async function runShellAppBuilder(
|
||||
const sdkVersion = _.get(manifest, 'sdkVersion', sdkVersionFromJob);
|
||||
const workingDir = formatShellAppDirectory({ sdkVersion });
|
||||
|
||||
// logger.info({ buildPhase: 'resolve native modules' }, 'Resolving universal modules dependencies');
|
||||
|
||||
// This can be set to `await resolveNativeModules(workingDir, _.get(manifest, 'dependencies'))`
|
||||
// (depending on project SDK version) in order to enable optional modules.
|
||||
// (2019-07-31) We are explicitly choosing to disable this option until we have more
|
||||
// infrastructure/tooling built around optional modules and OTA updates, as right now it's
|
||||
// very easy for developers to break apps in production with optional modules.
|
||||
const enabledModules = null;
|
||||
//
|
||||
// to enable full resolver switch resolveExplicitOptIn to resolveNativeModules
|
||||
logger.info({ buildPhase: 'resolve native modules' }, 'Resolving universal modules dependencies');
|
||||
const enabledModules = semver.satisfies(sdkVersion, '>= 33.0.0')
|
||||
? await resolveExplicitOptIn(workingDir, _.get(manifest, 'dependencies'))
|
||||
: null;
|
||||
|
||||
try {
|
||||
await AndroidShellApp.createAndroidShellAppAsync({
|
||||
|
||||
@@ -19,6 +19,20 @@ interface IPackageInfo {
|
||||
dependencies: string[];
|
||||
}
|
||||
|
||||
export async function resolveExplicitOptIn(workingdir: string, packages?: string[]): Promise<IUnimoduleEntry[]> {
|
||||
const resolver = new Resolver(workingdir);
|
||||
await resolver.init();
|
||||
|
||||
const optionalModules = ['expo-branch', 'expo-face-detector'];
|
||||
resolver.addAll();
|
||||
const modules = packages
|
||||
? resolver.getModules().filter((mod) => !optionalModules.includes(mod.name) || packages.includes(mod.name))
|
||||
: resolver.getModules().filter((mod) => !optionalModules.includes(mod.name));
|
||||
|
||||
modules.forEach(({ name, version }) => { logger.info(`Adding ${name}:${version}`); });
|
||||
return modules;
|
||||
}
|
||||
|
||||
export async function resolveNativeModules(workingdir: string, packages?: string[]): Promise<IUnimoduleEntry[]> {
|
||||
const resolver = new Resolver(workingdir);
|
||||
await resolver.init();
|
||||
@@ -38,8 +52,9 @@ export async function resolveNativeModules(workingdir: string, packages?: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return resolver.getModules();
|
||||
const modules = resolver.getModules();
|
||||
modules.forEach(({ name, version }) => { logger.info(`Adding ${name}:${version}`); });
|
||||
return modules;
|
||||
}
|
||||
|
||||
async function readCorePackages(workingdir: string) {
|
||||
@@ -101,7 +116,6 @@ class Resolver {
|
||||
return;
|
||||
}
|
||||
const pkg = this.dependencyMap[moduleName];
|
||||
logger.info(`Adding ${moduleName}:${pkg.version}`);
|
||||
this.modulesMap[moduleName] = {
|
||||
name: pkg.name,
|
||||
dirname: pkg.dirname,
|
||||
|
||||
Reference in new issue
Block a user