jdk-api-diff
jdk-api-diff copied to clipboard
Automate building reports using Docker and SDKMAN
The process of setting up the environment for the sake of generating a report was in my case a bit tedious so I automated and encapsulated all of that in a single Dockerfile - making it possible to generate reports without downloading multiple JDKs and messing up with Maven's toolchains.xml
.
Parameter names (especially JDKs) remained unchanged and might seem just wrong (just as the JDK version of the builder) - wanted to make the change minimally invasive so I adapted to the existing shape of the codebase.
At the end of the build, the jdk-api-diff.html
spawns in a directory from which the command was called.
In order to build an example report between SDKMAN distributions tagged 11.0.5-open
and 12.0.2-open
, run:
./compare.sh 11.0.5-open 12.0.2-open
which becomes effectively:
docker build --build-arg JDK1=11.0.5-open --build-arg JDK2=12.0.2-open -t jdk-api-diff .
docker run --rm --entrypoint cat jdk-api-diff target/jdk-api-diff.html > ./jdk-api-diff.html
If you don't know what available distributions are, run the script without providing build-args:
./compare.sh
or just:
docker build -t jdk-api-diff .
Depends on: https://github.com/AdoptOpenJDK/jdk-api-diff/pull/8 ✅
@gunnarmorling Should we proceed with this PR?
After such a long time... it's probably not working anymore. But I'm willing to update it if needed.