Skip to content

fix: Update Android SDK build integration #1318

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

Merged
merged 19 commits into from
May 22, 2023
Merged

Conversation

bitsandfoxes
Copy link
Contributor

@bitsandfoxes bitsandfoxes commented May 11, 2023

Fixes the way the Unity SDK integrates the Android SDK into the gradle project.
Also resolves #1317

The Android SDK had issues with resolving its internal dependencies with the current way it got embedded in the output gradle project. There was no way to tell gradle in which order to deal with the dependencies

The things that changed:

  • Instead of the .jar and .aar we now build the Android SDK as it's own, local repository.
  • That repository gets copied from Plugins/Android/Sentry~ to outputProjectRoot/unityLibrary/android-sdk-repository
  • The local repository gets added to the build.gradle on the root of the project
  • The SDK gets imported in the build.gradle in unityLibrary with the exclusion of androidx.core and androidx.lifecycle

All of those modifications are reentrant and reversible.

@bitsandfoxes bitsandfoxes requested a review from vaind May 12, 2023 14:17
@bitsandfoxes bitsandfoxes merged commit 3959029 into main May 22, 2023
@bitsandfoxes bitsandfoxes deleted the fix/android-native branch May 22, 2023 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Could not find method implementation() for arguments [{name=sentry-android-ndk-release, ext=aar}] (Sentry-Unity-v1.2.0)
2 participants