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

Fixes Issue About Extra Generated Resources Rendering #1339

Merged
merged 1 commit into from
Mar 16, 2024

Conversation

kevinzheng-ap
Copy link
Collaborator

@kevinzheng-ap kevinzheng-ap commented Mar 14, 2024

Additional fix to #1067 to handle extra generated res folders, which are set via BaseVariant.registerGeneratedResFolders

@kevinzheng-ap kevinzheng-ap changed the title Fixes Issue About Extra Generated Strings Rendering Fixes Issue About Extra Generated Resources Rendering Mar 14, 2024
val generateResValuesDirs = project.tasks.withType(GenerateResValues::class.java).filter { it.variantName == variant.name }.map { it.resOutputDir }
localResourceDirs.relativize(projectDirectory) + generateResValuesDirs.map(projectDirectory::relativize)
val generateResValuesDirs = project.findTask<GenerateResValues>(variant).map { it.resOutputDir }
val extraGeneratedResDirs = project.findTask<MapSourceSetPathsTask>(variant).map { it.extraGeneratedResDir.get().map { File(it) } }.flatten()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed in #1307 (comment), this is a temp solution to fetch extra generated res folders. It will be changed to new Gradle API after #1136 lands

Copy link
Collaborator

@jrodbx jrodbx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@kevinzheng-ap kevinzheng-ap merged commit fe72a8c into master Mar 16, 2024
14 checks passed
@kevinzheng-ap kevinzheng-ap deleted the kzheng/2024-03-13/issue-1067 branch March 16, 2024 06:38
@jrodbx jrodbx added this to the 1.3.4 milestone Mar 19, 2024
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.

None yet

2 participants