diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cf6582a782..ea38274ba3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -194,3 +194,20 @@ and let the next build download the pre-built SDK again: $ rm -rf modules/sentry-cocoa $ dotnet build ... # downloads pre-built Cocoa SDK into modules/sentry-cocoa ``` + +## Local Sentry Android SDK checkout + +Similarly, by default, `Sentry.Bindings.Android` downloads a pre-built Sentry Android SDK from +Maven. The version is specified in the `SentryAndroidSdkVersion` build property in `Sentry.Bindings.Android.csproj`. + +If you want to build an unreleased Sentry Android SDK version from source instead, +you'll need to clone both the sentry-java and the sentry-native repositories and publish these locally: +```sh +$ cd $(LocalSentryJavaRepoDir) && ./gradlew publishToMavenLocal +$ cd $(LocalSentryNativeRepoDir)/ndk && ./gradlew publishToMavenLocal +``` + +You'll also need to set `true` and `{whatever_version_you_checked_out}` +in the `Sentry.Bindings.Android.csproj`file. + +To switch back again, simply revert those two build properties to their original values. diff --git a/src/Sentry.Bindings.Android/README.md b/src/Sentry.Bindings.Android/README.md index 3981ca163f..b39a137296 100644 --- a/src/Sentry.Bindings.Android/README.md +++ b/src/Sentry.Bindings.Android/README.md @@ -6,7 +6,7 @@ Instead, reference one of the following: ## SDK Developers and Contributors -For .NET SDK contributors, most of the classes in this package are generated automatically. +For .NET SDK contributors, most of the classes in this package are generated automatically. These can be found in the `src/Sentry.Bindings.Android/obj/{Configuration}/{tfm}/generated/src/` folder after building the project. - Post generation transformations are controlled via various XML files stored in the `/Transforms` directory (see [Java Bindings Metadata documentation](https://learn.microsoft.com/en-gb/previous-versions/xamarin/android/platform/binding-java-library/customizing-bindings/java-bindings-metadata) for details). diff --git a/src/Sentry.Bindings.Android/Sentry.Bindings.Android.csproj b/src/Sentry.Bindings.Android/Sentry.Bindings.Android.csproj index 3da14848ad..a6fc8e605e 100644 --- a/src/Sentry.Bindings.Android/Sentry.Bindings.Android.csproj +++ b/src/Sentry.Bindings.Android/Sentry.Bindings.Android.csproj @@ -3,10 +3,37 @@ $(LatestAndroidTfm);$(PreviousAndroidTfm) 8.29.0 $(BaseIntermediateOutputPath)sdks\$(TargetFramework)\Sentry\Android\$(SentryAndroidSdkVersion)\ - + .NET Bindings for the Sentry Android SDK + + false + $([System.Environment]::GetFolderPath(SpecialFolder.UserProfile))/.m2/repository/ + $(LocalSentryMavenRepoDir)io/sentry/sentry/$(SentryAndroidSdkVersion)/sentry-$(SentryAndroidSdkVersion).jar + $(LocalSentryMavenRepoDir)io/sentry/sentry-android-core/$(SentryAndroidSdkVersion)/sentry-android-core-$(SentryAndroidSdkVersion).aar + $(LocalSentryMavenRepoDir)io/sentry/sentry-android-ndk/$(SentryAndroidSdkVersion)/sentry-android-ndk-$(SentryAndroidSdkVersion).aar + $(LocalSentryMavenRepoDir)io/sentry/sentry-android-replay/$(SentryAndroidSdkVersion)/sentry-android-replay-$(SentryAndroidSdkVersion).aar + $([System.String]::Copy($(LocalSentryJarPath)).Replace('.jar', '.pom')) + $([System.String]::Copy($(LocalSentryAndroidCoreAarPath)).Replace('.aar', '.pom')) + $([System.String]::Copy($(LocalSentryAndroidNdkAarPath)).Replace('.aar', '.pom')) + $([System.String]::Copy($(LocalSentryAndroidReplayAarPath)).Replace('.aar', '.pom')) + $(LocalSentryMavenRepoDir)io/sentry/sentry-native-ndk/$(SentryNativeNdkVersion)/sentry-native-ndk-$(SentryNativeNdkVersion).aar + $([System.String]::Copy($(LocalSentryNativeNdkAarPath)).Replace('.aar', '.pom')) + @@ -73,13 +100,27 @@ - + + + + + + + + + + @@ -88,7 +129,7 @@ - +