Skip to content

use AGP version as condition check #700

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

Closed
wants to merge 2 commits into from

Conversation

argzdev
Copy link
Collaborator

@argzdev argzdev commented Aug 1, 2024

Possible fix for #699

Adding the plugin repositories in settingsTemplate.gradle and mainTemplate.gradle condition checker will be based on the AGP version instead of the Unity Editor version.

@manugildev
Copy link

In order to test, please download 2021.3.42f1 from unityhub://2021.3.42f1/f1197811e8ce (copy paste into your browser navigation bar).

@argzdev
Copy link
Collaborator Author

argzdev commented Aug 2, 2024

Thanks for the heads up, @manugildev. From my understanding, shouldn't this fix also work for version 2021.3.41f1 since the mapped AGP version is >= 7.0?

Update: We're running some tests with this fix, but it still encounters the same issue.

Also, I tried testing the version you've linked 2021.3.42f1. This version doesn't seem stable yet. It's encountering the an issue as previously reported here, where the JDK is not found.

UnityException: JDK not found
Java Development Kit (JDK) directory is not set or invalid. Please, fix it in Edit / Unity -> Preferences -> External Tools

@manugildev
Copy link

manugildev commented Aug 2, 2024

Update: We're running some tests with this fix, but it still encounters the same issue.

@argzdev Yes, 2021.3.41f1 had a bug where **DIR_UNITYPROJECT** on the settingsTemplate.gradle is not being replaced by the actual directory. This might be causing an issue. It's fixed for 2021.3.42f1, but as you said, since it's officially released next week that version is still missing the JDK requirements.

While we wait for 2021.3.42f1 to be fully publicly released next week, could you check in 2021.3.41f1 if manually replacing **DIR_UNITYPROJECT** in settingsTemplate.gradle by the actual directory of the project solves the issue?

Just to sum up there are two issues with 2021.3.41f1 (AGP 7.4.2) at the moment:

  • The repositories section needs to be put in settingsTemplate.gradle, this is solved by your changes in unity-jar-resolver.
  • **DIR_UNITYPROJECT** is not being replaced by the actual directory during build/export time. This is solved by Unity in next release 2021.3.42f1.

Thank you for your help!

@argzdev
Copy link
Collaborator Author

argzdev commented Aug 2, 2024

Thanks for the updates, and guiding me through, @manugildev. I was able test and verify that the fix does work, when the DIR_UNITYPROJECT is replaced. I'll go ahead and reach out to our engineer and see if we can get this merged.

By the way, is it possible for you the share where you got the updates of version 2021.3.42f1. Just so that we can also get a heads up with upcoming releases. Thanks!

@a-maurice
Copy link
Collaborator

I ended up doing this change with this PR, so that I could get the release out faster with it. #702

Thanks for setting it up, and testing it out on your end.

@a-maurice a-maurice closed this Aug 2, 2024
@manugildev
Copy link

manugildev commented Aug 3, 2024

🙌🏽 @a-maurice Tested out locally, the issue seems to be now fixed. Thank you!

When should we expect this EDM4U version to be shipped with the rest of SDKs (google-mobile-ads, firebase-unity-sdk, etc.)?

@a-maurice
Copy link
Collaborator

@manugildev Good to hear. I can't share any firm dates, but the next releases should have the latest EDM4U version. The Firebase Unity SDK should be out soon.

@googlesamples googlesamples locked and limited conversation to collaborators Sep 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants