Skip to content

Commit

Permalink
fix conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-zimerman committed Jul 6, 2023
2 parents 3415528 + 59b8697 commit 5570f5a
Show file tree
Hide file tree
Showing 24 changed files with 2,349 additions and 2,840 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ jobs:
strategy:
fail-fast: false # keeps matrix running if one fails
matrix:
rn-version: ['0.65.3', '0.71.3']
rn-version: ['0.65.3', '0.72.0']
rn-architecture: ['legacy', 'new']
platform: ['android', 'ios']
build-type: ['dev', 'production']
Expand Down Expand Up @@ -344,7 +344,7 @@ jobs:
strategy:
fail-fast: false # keeps matrix running if one fails
matrix:
rn-version: ['0.65.3', '0.71.3']
rn-version: ['0.65.3', '0.72.0']
rn-architecture: ['legacy', 'new']
platform: ['android', 'ios']
build-type: ['production']
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sample-application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
path: |
node_modules
sample-new-architecture/node_modules
key: ${{ github.workflow }}-${{ github.job }}-npm-${{ hashFiles('yarn.lock', 'sample-new-architecture/node_modules/yarn.lock') }}
key: ${{ github.workflow }}-${{ github.job }}-npm-${{ hashFiles('yarn.lock', 'sample-new-architecture/yarn.lock') }}

- name: Install SDK Dependencies
if: ${{ steps.deps-cache.outputs['cache-hit'] != 'true' }}
Expand Down
18 changes: 15 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,24 @@

- Filter beforeSendTransaction from the Native SDK ([#3140](https://github.com/getsentry/sentry-react-native/pull/3140))

### Features

- Use `android.namespace` for AGP 8 and RN 0.73 ([#3133](https://github.com/getsentry/sentry-react-native/pull/3133))

### Dependencies

- Bump JavaScript SDK from v7.54.0 to v7.56.0 ([#3119](https://github.com/getsentry/sentry-react-native/pull/3119))
- [changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#7560)
- [diff](https://github.com/getsentry/sentry-javascript/compare/7.54.0...7.56.0)
- Bump JavaScript SDK from v7.54.0 to v7.57.0 ([#3119](https://github.com/getsentry/sentry-react-native/pull/3119), [#3153](https://github.com/getsentry/sentry-react-native/pull/3153))
- [changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#7570)
- [diff](https://github.com/getsentry/sentry-javascript/compare/7.54.0...7.57.0)
- Bump CLI from v2.18.1 to v2.19.4 ([#3124](https://github.com/getsentry/sentry-react-native/pull/3124), [#3151](https://github.com/getsentry/sentry-react-native/pull/3151))
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2194)
- [diff](https://github.com/getsentry/sentry-cli/compare/2.18.1...2.19.4)
- Bump Android SDK from v6.22.0 to v6.24.0 ([#3127](https://github.com/getsentry/sentry-react-native/pull/3127))
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#6240)
- [diff](https://github.com/getsentry/sentry-java/compare/6.22.0...6.24.0)
- Bump Cocoa SDK from v8.7.3 to v8.8.0 ([#3123](https://github.com/getsentry/sentry-react-native/pull/3123))
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#880)
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.7.3...8.8.0)

## 5.6.0

Expand Down
2 changes: 1 addition & 1 deletion RNSentry.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Pod::Spec.new do |s|
s.preserve_paths = '*.js'

s.dependency 'React-Core'
s.dependency 'Sentry/HybridSDK', '8.7.3'
s.dependency 'Sentry/HybridSDK', '8.8.0'

s.source_files = 'ios/**/*.{h,mm}'
s.public_header_files = 'ios/RNSentry.h'
Expand Down
7 changes: 6 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ if (isNewArchitectureEnabled()) {
android {
compileSdkVersion safeExtGet('compileSdkVersion', 31)

// Conditional for compatibility with AGP <4.2.
if (project.android.hasProperty("namespace")) {
namespace = "io.sentry.react"
}

defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', 21)
targetSdkVersion safeExtGet('targetSdkVersion', 31)
Expand Down Expand Up @@ -42,5 +47,5 @@ android {

dependencies {
implementation 'com.facebook.react:react-native:+'
api 'io.sentry:sentry-android:6.22.0'
api 'io.sentry:sentry-android:6.24.0'
}
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,18 @@
"react-native": ">=0.65.0"
},
"dependencies": {
"@sentry/browser": "7.56.0",
"@sentry/cli": "2.18.1",
"@sentry/core": "7.56.0",
"@sentry/hub": "7.56.0",
"@sentry/integrations": "7.56.0",
"@sentry/react": "7.56.0",
"@sentry/types": "7.56.0",
"@sentry/utils": "7.56.0"
"@sentry/browser": "7.57.0",
"@sentry/cli": "2.19.4",
"@sentry/core": "7.57.0",
"@sentry/hub": "7.57.0",
"@sentry/integrations": "7.57.0",
"@sentry/react": "7.57.0",
"@sentry/types": "7.57.0",
"@sentry/utils": "7.57.0"
},
"devDependencies": {
"@sentry-internal/eslint-config-sdk": "7.56.0",
"@sentry-internal/eslint-plugin-sdk": "7.56.0",
"@sentry-internal/eslint-config-sdk": "7.57.0",
"@sentry-internal/eslint-plugin-sdk": "7.57.0",
"@sentry/typescript": "^5.20.1",
"@sentry/wizard": "3.2.3",
"@types/jest": "^29.2.5",
Expand All @@ -80,7 +80,7 @@
"jest-environment-jsdom": "^29.4.1",
"prettier": "^2.0.5",
"react": "18.2.0",
"react-native": "0.71.7",
"react-native": "0.72.0",
"replace-in-file": "^6.0.0",
"rimraf": "^4.1.1",
"ts-jest": "^29.0.5",
Expand Down
2 changes: 1 addition & 1 deletion sample-new-architecture/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
root: true,
extends: '@react-native-community',
extends: '@react-native',
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
overrides: [
Expand Down
4 changes: 3 additions & 1 deletion sample-new-architecture/__tests__/App-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
* @format
*/

import 'react-native';
import React from 'react';

// Note: import explicitly to use the types shipped with jest.
import { it } from '@jest/globals';

// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';

Expand Down
50 changes: 2 additions & 48 deletions sample-new-architecture/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ apply plugin: "com.android.application"
apply plugin: "com.facebook.react"
apply plugin: "io.sentry.android.gradle"

import com.android.build.OutputFile

sentry {
// Disables or enables the automatic configuration of Native Symbols
// for Sentry. This executes sentry-cli automatically so
Expand All @@ -24,8 +22,8 @@ react {
// root = file("../")
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
// reactNativeDir = file("../node_modules/react-native")
// The folder where the react-native Codegen package is. Default is ../node_modules/react-native-codegen
// codegenDir = file("../node_modules/react-native-codegen")
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
// codegenDir = file("../node_modules/@react-native/codegen")
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
// cliFile = file("../node_modules/react-native/cli.js")
/* Variants */
Expand Down Expand Up @@ -71,14 +69,6 @@ project.ext.sentryCli = [

apply from: "../../../sentry.gradle"

/**
* Set this to true to create four separate APKs instead of one,
* one for each native architecture. This is useful if you don't
* use App Bundles (https://developer.android.com/guide/app-bundle/)
* and want to have separate APKs to upload to the Play Store.
*/
def enableSeparateBuildPerCPUArchitecture = false

/**
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
*/
Expand All @@ -97,14 +87,6 @@ def enableProguardInReleaseBuilds = true
*/
def jscFlavor = 'org.webkit:android-jsc:+'

/**
* Architectures to build native code for.
*/
def reactNativeArchitectures() {
def value = project.getProperties().get("reactNativeArchitectures")
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
}

android {
ndkVersion rootProject.ext.ndkVersion

Expand All @@ -119,14 +101,6 @@ android {
versionName "1.0"
}

splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include (*reactNativeArchitectures())
}
}
signingConfigs {
debug {
storeFile file('debug.keystore')
Expand All @@ -147,32 +121,12 @@ android {
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}

// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// https://developer.android.com/studio/build/configure-apk-splits.html
// Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
}

}
}


}

dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")

implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"

debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.squareup.okhttp3', module:'okhttp'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ protected ReactActivityDelegate createReactActivityDelegate() {
this,
getMainComponentName(),
// If you opted-in for the New Architecture, we enable the Fabric Renderer.
DefaultNewArchitectureEntryPoint.getFabricEnabled(), // fabricEnabled
// If you opted-in for the New Architecture, we enable Concurrent React (i.e. React 18).
DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled() // concurrentRootEnabled
);
DefaultNewArchitectureEntryPoint.getFabricEnabled());
}

@Override
Expand Down
4 changes: 2 additions & 2 deletions sample-new-architecture/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ buildscript {
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:7.3.1")
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("io.sentry:sentry-android-gradle-plugin:3.4.2")
classpath("io.sentry:sentry-android-gradle-plugin:3.11.1")
}
}
2 changes: 1 addition & 1 deletion sample-new-architecture/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ android.useAndroidX=true
android.enableJetifier=true

# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.164.0
FLIPPER_VERSION=0.182.0

# Use this property to specify which architecture you want to build.
# You can also override it from the CLI using
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
28 changes: 19 additions & 9 deletions sample-new-architecture/android/gradlew
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

#
# Copyright © 2015-2021 the original authors.
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,10 +32,10 @@
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
Expand All @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,10 +80,10 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
Expand Down Expand Up @@ -143,12 +143,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -205,6 +209,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"

# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
Expand Down
Loading

0 comments on commit 5570f5a

Please sign in to comment.