Skip to content
Closed
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ Build
*.swp
*.orig
.arcconfig

*.tgz
16 changes: 12 additions & 4 deletions android/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@
BUILD_DIR="build/Ninja-ReleaseAssert/swift-linux-x86_64/lib/swift"

cd "$(dirname $0)" &&
TAR_FILE="$(pwd)/android_dispatch.tgz" &&
TAR_FILE="$(pwd)/android_toolchain.tgz" &&

if [[ ! -f "${TAR_FILE}" ]]; then
echo "Fetching binaries and headers for libxml2, libcurl and libdispatch"
curl "https://raw.githubusercontent.com/SwiftJava/SwiftJava/master/android_dispatch.tgz" > "${TAR_FILE}"
curl http://johnholdsworth.com/android_toolchain.tgz > "${TAR_FILE}"
fi

cd "../.." && mkdir -p "${BUILD_DIR}" &&
cd "${BUILD_DIR}" && tar xfvz "${TAR_FILE}"
tar xfvz "${TAR_FILE}"

mkdir -p "../../${BUILD_DIR}/android/armv7" &&

cp -r swift-install/usr/lib/swift/android/{libxml2.so,libcurl.so,libdispatch.so} ../../${BUILD_DIR}/android
cp -r swift-install/usr/lib/swift/android/armv7/Dispatch.swiftmodule ../../${BUILD_DIR}/android/armv7
cp -r swift-install/usr/lib/swift/{curl,dispatch,libxml} ../../${BUILD_DIR}

rm -rf swift-install