Skip to content

Commit d43af20

Browse files
committed
Checkout patches repo instead of using a git submodule
1 parent 9160168 commit d43af20

File tree

5 files changed

+12
-16
lines changed

5 files changed

+12
-16
lines changed

.github/workflows/pull_request.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ jobs:
6767
echo "WORKDIR=${{ runner.temp }}/swift-android-sdk" >> $GITHUB_ENV
6868
- name: Checkout repository
6969
uses: actions/checkout@v4
70-
with:
71-
submodules: 'true'
7270
- name: Build Android SDK (Local)
7371
if: ${{ matrix.build-type == 'local' }}
7472
working-directory: swift-ci/sdks/android

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
[submodule "swift-ci/sdks/android/resources/patches"]
2-
path = swift-ci/sdks/android/resources/patches
3-
url = https://github.com/swift-android-sdk/swift-android-sdk
Lines changed: 0 additions & 1 deletion
This file was deleted.

swift-ci/sdks/android/scripts/fetch-source.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ fi
9191
if [[ -z "${BORINGSSL_VERSION}" ]]; then
9292
BORINGSSL_VERSION=fips-20220613
9393
fi
94+
if [[ -z "${SWIFT_ANDROID_PATCHES_VERSION}" ]]; then
95+
SWIFT_ANDROID_PATCHES_VERSION=main
96+
fi
9497

9598
clone_with_ssh=false
9699
while [ "$#" -gt 0 ]; do
@@ -139,7 +142,7 @@ mkdir -p swift-project
139142
groupstart "Fetching Swift"
140143
pushd swift-project >/dev/null
141144

142-
[[ -d swift ]] || git clone ${github}apple/swift.git
145+
[[ -d swift ]] || git clone ${github}swiftlang/swift.git
143146
cd swift
144147

145148
# Get its dependencies
@@ -181,3 +184,10 @@ git checkout ${BORINGSSL_VERSION}
181184
popd >/dev/null 2>&1
182185
groupend
183186

187+
# Fetch BoringSSL
188+
groupstart "Fetching Patches"
189+
[[ -d swift-android-patches ]] || git clone https://github.com/swift-android-sdk/swift-android-sdk swift-android-patches
190+
pushd swift-android-patches >/dev/null 2>&1
191+
git checkout ${SWIFT_ANDROID_PATCHES_VERSION}
192+
popd >/dev/null 2>&1
193+
groupend

swift-ci/sdks/android/scripts/patch-sources.sh

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,12 @@
33
set -e
44

55
source_dir=$1
6-
76
if [[ ! -d "${source_dir}" ]]; then
87
echo "$0: source_dir ${source_dir} does not exist"
98
exit 1
109
fi
1110

12-
script_dir=$(dirname -- "${BASH_SOURCE[0]}")
13-
resource_dir=$(realpath "${script_dir}/../resources")
14-
patches_dir="${resource_dir}/patches"
15-
11+
patches_dir="${source_dir}/swift-android-patches"
1612
if [[ ! -d "${patches_dir}" ]]; then
1713
echo "$0: patches_dir ${patches_dir} does not exist"
1814
exit 1
@@ -21,10 +17,6 @@ fi
2117
cd ${source_dir}/swift-project
2218
swift_android_patch="${patches_dir}/swift-android.patch"
2319

24-
ls -la swift/utils/build-script-impl
25-
ls -la ${swift_android_patch}
26-
ls -la swiftpm/Sources/PackageRegistryCommand/PackageRegistryCommand+Auth.swift
27-
2820
# patch the patch, which seems to only be needed for an API less than 28
2921
# https://github.com/finagolfin/swift-android-sdk/blob/main/swift-android.patch#L110
3022
perl -pi -e 's/#if os\(Windows\)/#if os\(Android\)/g' $swift_android_patch

0 commit comments

Comments
 (0)