Skip to content

Commit

Permalink
Merge pull request flutter#2405 from chinmaygarde/master
Browse files Browse the repository at this point in the history
Make the buildbot generate an archive for the dynamic services SDK
  • Loading branch information
chinmaygarde committed Feb 18, 2016
2 parents 3fdf0e5 + 0cc5558 commit 48bfd12
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 15 deletions.
1 change: 1 addition & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ group("default") {
testonly = true
deps = [
"//sky",
"//sky/services/dynamic:sdk_lib",
]
}

Expand Down
36 changes: 23 additions & 13 deletions sky/services/dynamic/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,29 @@ source_set("embedder") {
check_includes = false
}

service_sources = [
"dynamic_service.c",
"dynamic_service.h",
"dynamic_service_dylib.cc",
"dynamic_service_dylib.h",
"dynamic_service_macros.h",
]

service_deps = [
"//mojo/public/c/system",
"//mojo/public/cpp/bindings",
"//mojo/public/cpp/environment:standalone",
"//mojo/public/platform/native:system",
]

source_set("dylib") {
sources = [
"dynamic_service.c",
"dynamic_service.h",
"dynamic_service_dylib.cc",
"dynamic_service_dylib.h",
"dynamic_service_macros.h",
]
sources = service_sources
deps = service_deps
}

deps = [
"//mojo/public/c/system",
"//mojo/public/cpp/bindings",
"//mojo/public/cpp/environment:standalone",
"//mojo/public/platform/native:system",
]
static_library("sdk_lib") {
output_name = "FlutterServices"
complete_static_lib = true
sources = service_sources
deps = service_deps
}
2 changes: 1 addition & 1 deletion sky/services/dynamic/dynamic_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
/// ============================================================================

Expand Down
1 change: 0 additions & 1 deletion sky/services/dynamic/dynamic_service_dylib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
32 changes: 32 additions & 0 deletions travis/build_xcode_sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 48bfd12

Please sign in to comment.