-
-
Notifications
You must be signed in to change notification settings - Fork 267
SPM Support #2280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SPM Support #2280
Changes from 30 commits
8adbf8e
a0de8e2
0ccc10e
a2afc01
16bae70
0636b64
9a635fa
6034522
acc2ff0
160e5a5
31fcd63
866fe0f
bb6d8ac
a4e2e38
c694a20
249bb1e
00cd940
aaf4042
45b985e
b2e572d
bffad02
cc12932
a6d93f2
7dc46fd
b1b32ca
a63be8b
b50e0b8
cf145b9
b3d4f09
5f38dda
3b4be53
b2ebcf5
4ae483e
63f93d3
124590f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,6 +143,33 @@ jobs: | |
;; | ||
esac | ||
|
||
spm: | ||
name: "SPM" | ||
runs-on: macos-15 | ||
timeout-minutes: 30 | ||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: flutter/example | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: [ios, macos] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 # [email protected] | ||
with: | ||
channel: main | ||
- run: flutter upgrade | ||
- run: flutter config --enable-swift-package-manager | ||
- name: Run on iOS | ||
if: matrix.target == 'ios' | ||
run: flutter build ios --no-codesign | ||
- name: Run on macOS | ||
if: matrix.target == 'macos' | ||
run: flutter build macos | ||
|
||
analyze: | ||
uses: ./.github/workflows/analyze.yml | ||
with: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,8 @@ build/ | |
.cxx/ | ||
|
||
.vscode/launch.json | ||
cocoa_bindings_temp | ||
|
||
ios/sentry_flutter/Package.resolved | ||
|
||
temp |
This file was deleted.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// swift-tools-version: 5.9 | ||
// The swift-tools-version declares the minimum version of Swift required to build this package. | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "sentry_flutter", | ||
platforms: [ | ||
.iOS("12.0"), | ||
.macOS("10.13") | ||
], | ||
products: [ | ||
.library(name: "sentry-flutter", targets: ["sentry_flutter", "sentry_flutter_objc"]) | ||
], | ||
dependencies: [ | ||
.package(url: "https://github.com/getsentry/sentry-cocoa", from: "8.42.0") | ||
], | ||
targets: [ | ||
.target( | ||
name: "sentry_flutter", | ||
dependencies: [ | ||
"sentry_flutter_objc", | ||
.product(name: "Sentry", package: "sentry-cocoa") | ||
] | ||
), | ||
// SPM does not support mixed-language targets, so we need to move the ObjC files into a separate one | ||
.target( | ||
name: "sentry_flutter_objc", | ||
dependencies: [ | ||
.product(name: "Sentry", package: "sentry-cocoa") | ||
] | ||
) | ||
] | ||
) |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../ios/sentry_flutter/Package.swift |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../ios/sentry_flutter/Sources/sentry_flutter/SentryFlutter.swift |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../ios/sentry_flutter/Sources/sentry_flutter/SentryFlutterPlugin.swift |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../ios/sentry_flutter/Sources/sentry_flutter_objc/SentryFlutterReplayBreadcrumbConverter.m |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../ios/sentry_flutter/Sources/sentry_flutter_objc/SentryFlutterReplayScreenshotProvider.m |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../../ios/sentry_flutter/Sources/sentry_flutter_objc/include/SentryFlutterReplayBreadcrumbConverter.h |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../../ios/sentry_flutter/Sources/sentry_flutter_objc/include/SentryFlutterReplayScreenshotProvider.h |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the point of running Flutter upgrade just after installing the latest flutter from the main channel? I've been removing these calls in the CI in the past and now that it have failed in another PR (https://github.com/getsentry/sentry-dart/actions/runs/13285871769/job/37094344923?pr=2670) I've noticed it's back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should change this to
flutter pub get
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe not even needed since flutter build already calls it