Skip to content
Merged
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
22 changes: 22 additions & 0 deletions .github/actions/prepare-example-app/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: 'Prepare Example app'
description: 'Does necessary pre-work for the example app to compile natively'

runs:
using: 'composite'
steps:
- name: 'Build plugin'
working-directory: ./packages/capacitor-plugin
shell: bash
run: npm run build
- name: 'Install example app dependencies'
working-directory: ./packages/example-app-capacitor
shell: bash
run: npm i
- name: 'Build Web example app'
working-directory: ./packages/example-app-capacitor
shell: bash
run: npm run build
- name: 'Sync example app native platforms'
working-directory: ./packages/example-app-capacitor
shell: bash
run: npx cap sync
45 changes: 29 additions & 16 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,41 +16,54 @@ jobs:
needs: 'setup'
uses: ./.github/workflows/reusable_build.yml

verify-plugin:
verify-plugin-android:
needs: ['setup', 'lint', 'build']
runs-on: 'macos-15'
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: 'Setup Tools'
uses: ./.github/actions/setup-tools
- name: 'Verify iOS + Android + Web'
- name: 'Verify Android'
working-directory: ./packages/capacitor-plugin
run: npm run verify
run: npm run verify:android

build-example-app:
needs: ['verify-plugin']
verify-plugin-ios:
needs: ['setup', 'lint', 'build']
runs-on: 'macos-15'
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: 'Setup Tools'
uses: ./.github/actions/setup-tools
- name: 'Build plugin'
- name: 'Verify iOS'
working-directory: ./packages/capacitor-plugin
run: npm run build
- name: 'Install example app dependencies'
working-directory: ./packages/example-app-capacitor
run: npm i
- name: 'Build Web example app'
working-directory: ./packages/example-app-capacitor
run: npm run build
- name: 'Sync example app native platforms'
working-directory: ./packages/example-app-capacitor
run: npx cap sync
run: npm run verify:ios

build-example-app-android:
needs: ['verify-plugin-ios', 'verify-plugin-android']
runs-on: 'macos-15'
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: 'Setup Tools'
uses: ./.github/actions/setup-tools
- name: 'Prepare example app'
uses: ./.github/actions/prepare-example-app
- name: 'Build Android example app'
working-directory: ./packages/example-app-capacitor/android
run: ./gradlew clean assembleDebug

build-example-app-ios:
needs: ['verify-plugin-ios', 'verify-plugin-android']
runs-on: 'macos-15'
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: 'Setup Tools'
uses: ./.github/actions/setup-tools
- name: 'Prepare example app'
uses: ./.github/actions/prepare-example-app
- name: 'Build iOS example app'
working-directory: ./packages/example-app-capacitor/ios/App
run: xcodebuild clean build -workspace App.xcworkspace -scheme App CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
10 changes: 3 additions & 7 deletions packages/capacitor-plugin/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,16 @@ let package = Package(
targets: ["GeolocationPlugin"])
],
dependencies: [
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "7.0.0")
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "7.0.0"),
.package(url: "https://github.com/ionic-team/ion-ios-geolocation.git", from: "1.0.2")
],
targets: [
.binaryTarget(
name: "IONGeolocationLib",
url: "https://github.com/ionic-team/ion-ios-geolocation/releases/download/1.0.1/IONGeolocationLib.zip",
checksum: "80e0283964bce3c5d05f61ff4acf4e029305f58d1699a7f16453058ba876bc21" // sha-256
),
.target(
name: "GeolocationPlugin",
dependencies: [
.product(name: "Capacitor", package: "capacitor-swift-pm"),
.product(name: "Cordova", package: "capacitor-swift-pm"),
"IONGeolocationLib"
.product(name: "IONGeolocationLib", package: "ion-ios-geolocation")
],
path: "ios/Sources/GeolocationPlugin"),
.testTarget(
Expand Down