googlesamples / unity-jar-resolver

Unity plugin which resolves Android & iOS dependencies and performs version management
Other
1.21k stars 337 forks source link

Support for Gradle dependencyResolutionManagement RepositoriesMode.PREFER_SETTINGS #605

Closed 256p closed 1 year ago

256p commented 1 year ago

This PR fixes https://github.com/googlesamples/unity-jar-resolver/issues/594#issue-1553387077

Changes influence only builds when main Gradle template patching is enabled.

Changes:

The logic of repositories injection depends on the project state:

chkuang-g commented 1 year ago

Hi @256p Thank you so much for contributing this patch for EDM4U! We are doing very similar things in #610 with some additional touches

  1. Unity 2022.2.1 - 2022.2.9 does not support template variable like **DIR_UNITYPROJECT** unfortunately. Therefore we added two settings to force EDM4U to always use absolute path.
  2. Unity 2022.2.1 - 2022.2.9 also does not have an option to enable custom Gradle settings template. This change automatically copy the template from the engine folder.

Still we appreciate your effort to put together this change for the community. And kudos to you to also add integration tests! The proper fix for this is a bit involved so we spent some time to make sure the experience is right.

I will close this PR for now.

Regards, Shawn