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
3 changes: 3 additions & 0 deletions .github/workflows/sample-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:
- bump: 'v7'
SAMPLE_DIR: 'example/ionic-angular-v7'
JAVA_VERSION: '21'
- bump: 'v8'
SAMPLE_DIR: 'example/ionic-angular-v8'
JAVA_VERSION: '22'
- bump: 'sample-vue'
SAMPLE_DIR: 'example/ionic-vue3'
JAVA_VERSION: '17'
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
> [migration guide](https://docs.sentry.io/platforms/javascript/guides/capacitor/migration/) first.
<!-- prettier-ignore-end -->

## Unreleased

### Features

- Support for Capacitor 8 ([#1071](https://github.com/getsentry/sentry-capacitor/pull/1071)) - Special thanks to ([jb3rndt](https://github.com/getsentry/sentry-capacitor/pull/1061)).

## 3.0.0-beta.1

### Break Changes
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let package = Package(
targets: ["SentryCapacitorPlugin"])
],
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", "7.0.0"..<"9.0.0"),
.package(url: "https://github.com/getsentry/sentry-cocoa", from: "8.56.2")
],
targets: [
Expand Down
29 changes: 25 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ def getCapacitorCompileSdkVersion() {

def GetCapacitorVersion() {
def compileVersion = getCapacitorCompileSdkVersion()
if (compileVersion >= 36) {
return 8
}
if (compileVersion >= 35) {
return 7
}
Expand All @@ -24,15 +27,33 @@ def GetCapacitorVersion() {
def capVersion = GetCapacitorVersion()

def defaultSdkVersion = getCapacitorCompileSdkVersion()
def defaultMinAndroidVersion = 23
def defaultMinAndroidVersion = 24
def targetJavaVersion = JavaVersion.VERSION_21
if (capVersion >= 7) {
println "Sentry Capacitor: Applying defaults for Capacitor 7 or higher"
if ( capVersion >= 8) {
println "Sentry Capacitor: Applying defaults for Capacitor 8 or higher"
targetJavaVersion = JavaVersion.VERSION_21
}
else if ( capVersion >= 6) {
println "Sentry Capacitor: Applying defaults for Capacitor 6 or 7"
targetJavaVersion = JavaVersion.VERSION_17
}
else {
throw new GradleException("The version of Capacitor is not supported by Sentry, CODE: " + capVersion)
}
if (capVersion == 8) {
println "Sentry Capacitor: Applying defaults for Capacitor 8 or higher"
ext {
androidxAppCompatVersion = safeExtGet('androidxAppCompatVersion', '1.7.0')
androidxAppCompatVersion = safeExtGet('androidxAppCompatVersion', '1.7.1')
androidxEspressoCoreVersion = safeExtGet('androidxEspressoCoreVersion', '3.6.1')
}
}
else if (capVersion == 7) {
println "Sentry Capacitor: Applying defaults for Capacitor 7"
ext {
androidxAppCompatVersion = safeExtGet('androidxAppCompatVersion', '1.7.0')
androidxEspressoCoreVersion = safeExtGet('androidxEspressoCoreVersion', '3.7.0')
}
}
else {
println "Sentry Capacitor: Applying defaults for Capacitor 6"
targetJavaVersion = JavaVersion.VERSION_17
Expand Down
1 change: 1 addition & 0 deletions example/ionic-angular-v6/ios/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
App/CapApp-SPM/.build
App/build
App/Pods
App/App/public
Expand Down
4 changes: 2 additions & 2 deletions example/ionic-angular-v6/ios/App/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PODS:
- CapacitorCordova
- CapacitorCordova (6.0.0)
- Sentry/HybridSDK (8.56.2)
- "SentryCapacitor (2.4.1+5bc37111)":
- "SentryCapacitor (3.0.0-beta.1+802a545b)":
- Capacitor
- Sentry/HybridSDK (= 8.56.2)

Expand All @@ -28,7 +28,7 @@ SPEC CHECKSUMS:
Capacitor: c527d208447590a004f0a4a2c42a5f361848fa8a
CapacitorCordova: 8c4bfdf69368512e85b1d8b724dd7546abeb30af
Sentry: b53951377b78e21a734f5dc8318e333dbfc682d7
SentryCapacitor: aca7107d64fc3d0603279789a53d921433ec5df0
SentryCapacitor: 6031aedf880a1fef0d5618977936f19230ddb80a

PODFILE CHECKSUM: 618eb4d85f9b0c9e5a37fffa86a92d1569bd6800

Expand Down
1 change: 0 additions & 1 deletion example/ionic-angular-v6/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"author": "Ionic Framework",
"dependencies": {
"@angular/common": "^14.3.0",
"@angular/core": "^14.3.0",
Expand Down
1 change: 1 addition & 0 deletions example/ionic-angular-v7/ios/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
App/CapApp-SPM/.build
App/build
App/Pods
App/App/public
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions example/ionic-angular-v7/ios/App/CapApp-SPM/Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions example/ionic-angular-v7/ios/App/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PODS:
- CapacitorCordova
- CapacitorCordova (7.0.1)
- Sentry/HybridSDK (8.56.2)
- "SentryCapacitor (2.4.1+5bc37111)":
- "SentryCapacitor (3.0.0-beta.1+802a545b)":
- Capacitor
- Sentry/HybridSDK (= 8.56.2)

Expand All @@ -28,7 +28,7 @@ SPEC CHECKSUMS:
Capacitor: de199cba6c8b20995428ad0b7cb0bc6ca625ffd4
CapacitorCordova: 63d476958d5022d76f197031e8b7ea3519988c64
Sentry: b53951377b78e21a734f5dc8318e333dbfc682d7
SentryCapacitor: bc71a1be754e714f0de3b1bc27e90f9a5f185e2d
SentryCapacitor: 8684c21f817772464007fbdbeb5000d37fae05c2

PODFILE CHECKSUM: e512db45f101b9092c98513e2bceba3944192dde

Expand Down
1 change: 0 additions & 1 deletion example/ionic-angular-v7/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"author": "Ionic Framework",
"dependencies": {
"@angular/common": "^14.3.0",
"@angular/core": "^14.3.0",
Expand Down
9 changes: 9 additions & 0 deletions example/ionic-angular-v8/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.vscode/
typings/


# Sentry Auth Token
.sentryclirc

# Local environment configuration (do not commit)
src/environments/environment.local.ts
38 changes: 38 additions & 0 deletions example/ionic-angular-v8/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
> [!WARNING]
> This Sample code may contain security vulnerabilities, should never be used in production, and exists only for illustrative purposes.

# Instructions for using the example app

## Add the local SDK from yalc

On the Sentry Capacitor root folder
`yalc publish`

Then on the ionic-angular folder
`yalc add @sentry/capacitor`

## Install dependencies

`yarn install`

## Build for native

`ionic build`

## Sync resources

`npx cap sync`

## Running

### Android

`npx cap open android`

### iOS

`npx cap open ios`

### Web

`http-server ./www`
91 changes: 91 additions & 0 deletions example/ionic-angular-v8/android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# NPM renames .gitignore to .npmignore
# In order to prevent that, we remove the initial "."
# And the CLI then renames it

# Using Android gitignore template: https://github.com/github/gitignore/blob/master/Android.gitignore

# Built application files
*.apk
*.ap_
*.aab

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/
release/

# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# IntelliJ
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
# Android Studio 3 in .gitignore file.
.idea/caches
.idea/modules.xml
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
.idea/navEditor.xml

# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
#*.jks
#*.keystore

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild

# Freeline
freeline.py
freeline/
freeline_project_description.json

# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md

# Version control
vcs.xml

# lint
lint/intermediates/
lint/generated/
lint/outputs/
lint/tmp/
# lint/reports/

# Cordova plugins for Capacitor
capacitor-cordova-android-plugins

# Copied web assets
app/src/main/assets/public
1 change: 1 addition & 0 deletions example/ionic-angular-v8/android/.java-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
21
53 changes: 53 additions & 0 deletions example/ionic-angular-v8/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
apply plugin: 'com.android.application'

android {

namespace 'io.ionic.starter'
compileSdk rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "io.ionic.starter"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

repositories {
flatDir{
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
implementation project(':capacitor-android')
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
implementation project(':capacitor-cordova-android-plugins')
}

apply from: 'capacitor.build.gradle'

try {
def servicesJSON = file('google-services.json')
if (servicesJSON.text) {
apply plugin: 'com.google.gms.google-services'
}
} catch(Exception e) {
logger.warn("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
}
Loading
Loading