Skip to content

Fix Unity 6 Android compatibility with gradle #776

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 1 commit into from
Apr 2, 2025

Conversation

jkasten2
Copy link
Member

@jkasten2 jkasten2 commented Apr 2, 2025

Confirmed this change works with Unity 6.0.42f1 and is still compatible with the Unity's oldest LTS, 2021.3.45f1.

Description

One Line Summary

Fixes Android build issue with Unity 6 as it's Gradle version requires namespace to be defined in the build.gradle.

Details

This addresses Issues:

Motivation

SDK should continue to be compatible with newer versions of Unity, without work arounds.

Scope

Only effects the Android build process that runs on app developers projects.

Testing

Unit testing

No testing suite that builds an app end-to-end in place.

Manual testing

Testing a new Unity project and ensure an Android APK was built successfully on:

  • Unity 6.0.42f1
  • Unity 2021.3.45f1 (Unity's oldest LTS)

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes
  • Android build system

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
  • I have reviewed this PR myself, ensuring it meets each checklist item

This change is Reviewable

Sorry, something went wrong.

Newer versions of Gradle require 'namespace' to be defined in the build.gradle.
Such as the one that ships with Unity 6.

Confirmed this change works with Unity 6.0.42f1 and is still compatible with the Unity's oldest LTS, 2021.3.45f1.
@jkasten2 jkasten2 requested review from nan-li and fadi-george April 2, 2025 16:12
@jkasten2 jkasten2 assigned fadi-george and unassigned nan-li Apr 2, 2025
@jkasten2 jkasten2 merged commit d7d7e6a into main Apr 2, 2025
1 check passed
@jkasten2 jkasten2 deleted the fix/unity6-android-compatibility-gradle branch April 2, 2025 17:21
@jkasten2 jkasten2 mentioned this pull request Apr 16, 2025
18 tasks
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.

None yet

3 participants