Skip to content

[Build] Reinforce the Gradle configuration for sample folder selection #115

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
Dec 7, 2023

Conversation

eyal-lezmy
Copy link
Contributor

@eyal-lezmy eyal-lezmy commented Oct 20, 2023

The problem

In the project, a folder walk is done to list all the "samples" folders. This is done by checking the path in the settings.gradle.kts file.

The path provided in the filter logic can be absolute and in this case it can include parents folders names, which can corrupt the check.

Example

My project is cloned in the following folder: <user-home>/android/samples/platform-samples Then all the folders will be considered as samples and the Gradle build will failed at configuration step.

Problem is reproduced on my configuration: macOS 12.6.2

Solution

Remove the parents folders part in the path during the filtering if the path is absolute.

In the project, a folder walk is done to list all the "samples" folders.
This is done by checking the path in the settings.gradle.kts file.
The path provided in the filter logic can be absolute and in this case it can include parents folders names, which can corrupt the check.

Example:
My project is cloned in the following folder: `<user-home>/android/samples/platform-samples`
Then all the folders will be considered as samples and the Gradle build will failed at configuration step.

Solution:
Remove the parents folders part in the path during the filtering if the path is absolute.
@yaraki yaraki merged commit dbaa5c7 into android:main Dec 7, 2023
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.

2 participants