imgix / imgix-java

A Java client library for generating URLs with imgix
https://www.imgix.com
BSD 2-Clause "Simplified" License
19 stars 8 forks source link

feat: custom srcsets #44

Closed ericdeansanchez closed 4 years ago

ericdeansanchez commented 4 years ago

The purpose of this PR is to implement custom source set functionality. It does so by extending and overloading createSrcSet.

targetWidths functionality is now public in anticipation of things to come as well as to expose more functionality.

The ensureEven requirement was removed from this PR/feature as it has been removed from the other SDK as well. In this case, it never made it into the feature (good).

The removal of custom qualities commit, afd8586, should serve as a starting point for if/when that feature does make it into the sdk.

For example on how to use the new functionality see the tests located at src/test/java/com/imgix/test/TestSrcSet.java lines 566 through 706.

ericdeansanchez commented 4 years ago

In the first commit, the JDK: openjdk11 build failed due to malformed html in a java doc. It also failed in the follow up commit c2b6e44. I restarted the build and it passed. I'm going to continue to keep an eye on this, and will dig in if needed or as time permits.