Skip to content

Commit

Permalink
Merge branch 'getsentry:master' into pr/geting_context_for_mac
Browse files Browse the repository at this point in the history
  • Loading branch information
saf-e authored Nov 21, 2024
2 parents c5f6535 + d431ab9 commit 03eec55
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 41 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 0.7.15

**Fixes**:

- Fix DLL versioning for projects that add the Native SDK as a CMake subdirectory. ([#1086](https://github.com/getsentry/sentry-native/pull/1086))

## 0.7.14

**Features**:
Expand Down
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ if(WIN32)
else()
# The Android tools ship with this ancient version, which we need to support.
cmake_minimum_required (VERSION 3.10)
cmake_policy(SET CMP0077 NEW)
endif()

#read sentry-native version
Expand All @@ -25,6 +26,14 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
set(SENTRY_MAIN_PROJECT ON)
endif()

# We have 4 source directories:
# * `CMAKE_SOURCE_DIR`: points to the directory of the top-level CMakeLists.txt of the main project.
# * `CMAKE_CURRENT_SOURCE_DIR`: points to the directory of any CMakeLists.txt in any subdirectories.
# * `PROJECT_SOURCE_DIR`: points to the directory of any CMakeLists.txt in any subdirectories that defined a `project`.
# * `SENTRY_SOURCE_DIR`: points to the directory of this `CMakeLists.txt` independent of whether it was added as a
# subdirectory in another project or whether we access it from one of our subdirectories.
set(SENTRY_SOURCE_DIR ${PROJECT_SOURCE_DIR})

if(NOT CMAKE_C_STANDARD)
set(CMAKE_C_STANDARD 11)
endif()
Expand Down
2 changes: 1 addition & 1 deletion cmake/utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function(sentry_add_version_resource TGT FILE_DESCRIPTION)
list(GET _SENTRY_VERSION_LIST 2 SENTRY_VERSION_PATCH)

# Produce the resource file with configure-time replacements
configure_file("${CMAKE_SOURCE_DIR}/sentry.rc.in" "${RESOURCE_PATH_TMP}" @ONLY)
configure_file("${SENTRY_SOURCE_DIR}/sentry.rc.in" "${RESOURCE_PATH_TMP}" @ONLY)

# Replace the `ORIGINAL_FILENAME` at generate-time using the generator expression `TARGET_FILE_NAME`
file(GENERATE OUTPUT ${RESOURCE_PATH} INPUT ${RESOURCE_PATH_TMP})
Expand Down
2 changes: 1 addition & 1 deletion external/libunwindstack-ndk
2 changes: 1 addition & 1 deletion include/sentry.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ extern "C" {
# define SENTRY_SDK_NAME "sentry.native"
# endif
#endif
#define SENTRY_SDK_VERSION "0.7.14"
#define SENTRY_SDK_VERSION "0.7.15"
#define SENTRY_SDK_USER_AGENT SENTRY_SDK_NAME "/" SENTRY_SDK_VERSION

/* common platform detection */
Expand Down
66 changes: 33 additions & 33 deletions ndk/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Android NDK support for sentry-native

| Package | Maven Central | Minimum Android API Level | Supported ABIs |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | ------------------------------------------- |
|-------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------|---------------------------------------------|
| `io.sentry:sentry-native-ndk` | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-native-ndk/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.sentry/sentry-native-ndk) | 19 | "x86", "armeabi-v7a", "x86_64", "arm64-v8a" |

## Resources
Expand Down Expand Up @@ -29,46 +29,46 @@ The `ndk` project uses the Gradle build system in combination with CMake. You ca
1. Set a custom `versionName` in the `ndk/gradle.properties` file
2. Publish the package locally

```shell
cd ndk
./gradlew :sentry-native-ndk:publishToMavenLocal
```
```shell
cd ndk
./gradlew :sentry-native-ndk:publishToMavenLocal
```

3. Consume the build in your app

```
// usually settings.gradle
allprojects {
repositories {
mavenLocal()
}
}
// usually app/build.gradle
android {
buildFeatures {
prefab = true
}
}
dependencies {
implementation("io.sentry:sentry-native-ndk:<version>")
}
```
```
// usually settings.gradle
allprojects {
repositories {
mavenLocal()
}
}
// usually app/build.gradle
android {
buildFeatures {
prefab = true
}
}
dependencies {
implementation("io.sentry:sentry-native-ndk:<version>")
}
```

4. Link the pre-built packages with your native code

```cmake
# usually app/CMakeLists.txt
```cmake
# usually app/CMakeLists.txt
find_package(sentry-native-ndk REQUIRED CONFIG)
find_package(sentry-native-ndk REQUIRED CONFIG)
target_link_libraries(<app> PRIVATE
${LOG_LIB}
sentry-native-ndk::sentry-android
sentry-native-ndk::sentry
)
```
target_link_libraries(<app> PRIVATE
${LOG_LIB}
sentry-native-ndk::sentry-android
sentry-native-ndk::sentry
)
```

## Development

Expand Down
2 changes: 1 addition & 1 deletion ndk/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ android.useAndroidX=true
android.defaults.buildfeatures.buildconfig=true

# Release information, used for maven publishing
versionName=0.7.14
versionName=0.7.15

# disable renderscript, it's enabled by default
android.defaults.buildfeatures.renderscript=false
Expand Down
5 changes: 5 additions & 0 deletions src/sentry_value.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@
#if defined(_MSC_VER)
# pragma warning(push)
# pragma warning(disable : 4127) // conditional expression is constant
#elif defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wstatic-in-inline"
#endif

#include "../vendor/mpack.h"

#if defined(_MSC_VER)
# pragma warning(pop)
#elif defined(__clang__)
# pragma clang diagnostic pop
#endif

#include "sentry_alloc.h"
Expand Down
4 changes: 2 additions & 2 deletions tests/assertions.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ def assert_event_meta(
}
expected_sdk = {
"name": "sentry.native",
"version": "0.7.14",
"version": "0.7.15",
"packages": [
{"name": "github:getsentry/sentry-native", "version": "0.7.14"},
{"name": "github:getsentry/sentry-native", "version": "0.7.15"},
],
}
if is_android:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_integration_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

# fmt: off
auth_header = (
"Sentry sentry_key=uiaeosnrtdy, sentry_version=7, sentry_client=sentry.native/0.7.14"
"Sentry sentry_key=uiaeosnrtdy, sentry_version=7, sentry_client=sentry.native/0.7.15"
)
# fmt: on

Expand Down
2 changes: 1 addition & 1 deletion tests/win_utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pathlib
import win32api

sentry_version = "0.7.14"
sentry_version = "0.7.15"


def check_binary_version(binary_path: pathlib.Path):
Expand Down

0 comments on commit 03eec55

Please sign in to comment.