Skip to content

Fixing maven repo path separator char #421

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
Feb 23, 2022

Conversation

marfx000
Copy link
Contributor

@marfx000 marfx000 commented Feb 4, 2021

The bug happens only if:

  • "Patch mainTemplate.gradle" setting is enabled;
  • You are resolving dependencies on Windows platform;

Examples of bad repo path string in mainTemplate.gradle:
file:///C:/Work/UnityProject\Assets/GeneratedLocalRepo/Firebase/m2repository

This happened because Path.Combine uses "" as path separator for
windows platforms. But gradle actually expects not a regular path
but file URI, where "/" must be used as path separator.

This bug happens only if:
- "Patch mainTemplate.gradle" setting is enabled;
- You are resolving dependencies on Windows platform;

Examples of bad repo path string in mainTemplate.gradle:
file:///C:/Work/UnityProject\Assets/GeneratedLocalRepo/Firebase/m2repository

This happened because Path.Combine uses "\" as path separator for
windows platforms. But gradle actually expects not a regular path
but file URI, where "/" must be used as path separator.
@google-cla
Copy link

google-cla bot commented Feb 4, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@marfx000
Copy link
Contributor Author

marfx000 commented Feb 4, 2021

@googlebot I signed it!

@chkuang-g chkuang-g merged commit 1c23023 into googlesamples:master Feb 23, 2022
@googlesamples googlesamples locked and limited conversation to collaborators Mar 26, 2022
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.

2 participants