You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There should be a possibility to refer binary resources just like there's project.resources.text.
Certain data formats can't be converted to text.
For instance, XML is a binary format, not a text one, and XML might contain the encoding in the <?xml version="1.0" encoding="..."?> pragma.
That means, project.resources.fromUri("..") is not a valid option to fetch XML contents, as Gradle would somehow decode the result to text form, and there's no proper way to decode XML without fully-workable XML decoder.
I would expect an API like project.resources.binary.fromUri("https://gist.githubusercontent.com/hsz/5bf5c84a6a2e36f2a6716f28f287783c/raw/b0ba02f53f5937643701b848cb3728b0f3dfb144/updates.xml").
In that case Gradle must not re-encode the contents, and it must tread the data as binary.
Current Behavior (optional)
Currently, only project.resources.text is available
This feature request is in the backlog of the relevant team, but this area of Gradle is currently not a focus one, so it might take a while before it gets implemented.
The request makes sense. However, the ResouceHandler API needs some work to integrate with the Provider API better, and we're reluctant to adding new ResourceHandler methods until this adaptation is ready.
Expected Behavior
There should be a possibility to refer binary resources just like there's
project.resources.text
.Certain data formats can't be converted to text.
For instance, XML is a binary format, not a text one, and XML might contain the encoding in the
<?xml version="1.0" encoding="..."?>
pragma.That means,
project.resources.fromUri("..")
is not a valid option to fetch XML contents, as Gradle would somehow decode the result to text form, and there's no proper way to decode XML without fully-workable XML decoder.I would expect an API like
project.resources.binary.fromUri("https://gist.githubusercontent.com/hsz/5bf5c84a6a2e36f2a6716f28f287783c/raw/b0ba02f53f5937643701b848cb3728b0f3dfb144/updates.xml")
.In that case Gradle must not re-encode the contents, and it must tread the data as binary.
Current Behavior (optional)
Currently, only
project.resources.text
is availableContext
JetBrains/intellij-platform-gradle-plugin#1389 (comment)
Gradle 8.1.1
The text was updated successfully, but these errors were encountered: