mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Merge pull request #2405 from chinmaygarde/master
Make the buildbot generate an archive for the dynamic services SDK
This commit is contained in:
commit
48bfd120bb
1
BUILD.gn
1
BUILD.gn
@ -7,6 +7,7 @@ group("default") {
|
||||
testonly = true
|
||||
deps = [
|
||||
"//sky",
|
||||
"//sky/services/dynamic:sdk_lib",
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@ -25,19 +25,29 @@ source_set("embedder") {
|
||||
check_includes = false
|
||||
}
|
||||
|
||||
source_set("dylib") {
|
||||
sources = [
|
||||
"dynamic_service.c",
|
||||
"dynamic_service.h",
|
||||
"dynamic_service_dylib.cc",
|
||||
"dynamic_service_dylib.h",
|
||||
"dynamic_service_macros.h",
|
||||
]
|
||||
service_sources = [
|
||||
"dynamic_service.c",
|
||||
"dynamic_service.h",
|
||||
"dynamic_service_dylib.cc",
|
||||
"dynamic_service_dylib.h",
|
||||
"dynamic_service_macros.h",
|
||||
]
|
||||
|
||||
deps = [
|
||||
"//mojo/public/c/system",
|
||||
"//mojo/public/cpp/bindings",
|
||||
"//mojo/public/cpp/environment:standalone",
|
||||
"//mojo/public/platform/native:system",
|
||||
]
|
||||
service_deps = [
|
||||
"//mojo/public/c/system",
|
||||
"//mojo/public/cpp/bindings",
|
||||
"//mojo/public/cpp/environment:standalone",
|
||||
"//mojo/public/platform/native:system",
|
||||
]
|
||||
|
||||
source_set("dylib") {
|
||||
sources = service_sources
|
||||
deps = service_deps
|
||||
}
|
||||
|
||||
static_library("sdk_lib") {
|
||||
output_name = "FlutterServices"
|
||||
complete_static_lib = true
|
||||
sources = service_sources
|
||||
deps = service_deps
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
FLUTTER_C_API_START
|
||||
|
||||
/// ============================================================================
|
||||
/// The definitions in the file (and this file alone) form the stable Flutter
|
||||
/// The definitions in this file (and this file alone) form the stable Flutter
|
||||
/// dynamic services ABI.
|
||||
/// ============================================================================
|
||||
|
||||
|
||||
@ -5,7 +5,6 @@
|
||||
#ifndef SKY_SERVICES_DYNAMIC_DYNAMIC_SERVICE_DYLIB_H_
|
||||
#define SKY_SERVICES_DYNAMIC_DYNAMIC_SERVICE_DYLIB_H_
|
||||
|
||||
#include "sky/services/dynamic/dynamic_service_macros.h"
|
||||
#include "mojo/public/cpp/system/message_pipe.h"
|
||||
#include "mojo/public/cpp/bindings/string.h"
|
||||
|
||||
|
||||
@ -9,6 +9,8 @@ set -ex
|
||||
# use /tmp
|
||||
WORKSPACE=${TARGET_TEMP_DIR}/tmp/flutter_build_workspace
|
||||
DEPOT_WORKSPACE=${TARGET_TEMP_DIR}/tmp/flutter_depot_tools
|
||||
SERVICES_SDK_DIR=FlutterServicesSDK
|
||||
SERVICES_ARCHIVE=${SERVICES_SDK_DIR}.zip
|
||||
|
||||
function NukeWorkspace {
|
||||
rm -rf ${WORKSPACE}
|
||||
@ -59,6 +61,35 @@ ninja -C out/ios_sim_Release ${GOMA_FLAGS}
|
||||
sky/tools/gn --ios --release
|
||||
ninja -C out/ios_Release ${GOMA_FLAGS}
|
||||
|
||||
pushd out/
|
||||
|
||||
# Package up the services SDK
|
||||
|
||||
mkdir -p ${SERVICES_SDK_DIR}/include/mojo/public
|
||||
mkdir -p ${SERVICES_SDK_DIR}/lib
|
||||
|
||||
# Create the fat services binary
|
||||
|
||||
lipo -create \
|
||||
ios_sim_Release/obj/sky/services/dynamic/libFlutterServices.a \
|
||||
ios_Release/obj/sky/services/dynamic/libFlutterServices.a \
|
||||
-output ${SERVICES_SDK_DIR}/lib/libFlutterServicesIOS.a
|
||||
|
||||
# Copy all relevant headers
|
||||
|
||||
rsync -a --prune-empty-dirs --include '*/' --include '*.h' --exclude '*' \
|
||||
../mojo/public/c ${SERVICES_SDK_DIR}/include/mojo/public
|
||||
rsync -a --prune-empty-dirs --include '*/' --include '*.h' --exclude '*' \
|
||||
../mojo/public/cpp ${SERVICES_SDK_DIR}/include/mojo/public
|
||||
cp ../sky/services/dynamic/dynamic_service_dylib.h \
|
||||
${SERVICES_SDK_DIR}/include/FlutterService.h
|
||||
|
||||
# Create the service archive
|
||||
|
||||
zip -r ${SERVICES_ARCHIVE} ${SERVICES_SDK_DIR}/
|
||||
|
||||
popd # Out of the out/ directory
|
||||
|
||||
# Create the directory for the merged project
|
||||
mkdir -p out/FlutterXcode
|
||||
|
||||
@ -82,6 +113,7 @@ if [[ ! -z ${BUCKET_KEY_FILE} ]]; then
|
||||
fi
|
||||
gcloud auth activate-service-account --key-file ${BUCKET_KEY_FILE}
|
||||
gsutil cp FlutterXcode.zip gs://flutter_infra/flutter/${ENGINE_SHA}/ios/FlutterXcode.zip
|
||||
gsutil cp ../${SERVICES_ARCHIVE} gs://flutter_infra/flutter/${ENGINE_SHA}/ios/${SERVICES_ARCHIVE}
|
||||
fi
|
||||
|
||||
popd # Out of the Xcode project
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user