Skip to content
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

Replace packagingOptions to packaging if AGP is 8.0+ #718

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

argzdev
Copy link
Collaborator

@argzdev argzdev commented Nov 13, 2024

Fixes #715.

Due to incompatibility of the packagingOptions keyword in Unity 6, this will create unecessary mainTemplate.gradle.backup. Android keyword Packaging is introduced in Android Gradle Plugin version 8.0+.

Use packaging keyword if AGP version is 8.0+, else use packagingOptions

Unity version Gradle version Android Gradle Plug-in version
Unity-6 8.4 8.3.0
2022.3 7.5.1 7.4.2
2021.3 7.5.1 7.4.2

e.g.

// Android Resolver Exclusions Start
android {
  packaging {
      exclude ('/lib/arm64-v8a/*' + '*')
      exclude ('/lib/armeabi/*' + '*')
      exclude ('/lib/mips/*' + '*')
      exclude ('/lib/mips64/*' + '*')
      exclude ('/lib/x86/*' + '*')
      exclude ('/lib/x86_64/*' + '*')
  }

@argzdev argzdev changed the title Add condition for checking AGP Replace packagingOptions to packaging if AGP is 8.0+ Nov 13, 2024
@Thaina
Copy link

Thaina commented Nov 30, 2024

@a-maurice Please accept fix to this bug

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.

[Bug] gradle modifications not compatible with gradle version latest Unity uses
3 participants