Skip to content

Instantly share code, notes, and snippets.

@Garima829
Last active September 26, 2022 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Garima829/a348563fa4908570dcc4ec45be25f1b0 to your computer and use it in GitHub Desktop.
Save Garima829/a348563fa4908570dcc4ec45be25f1b0 to your computer and use it in GitHub Desktop.
Google Summer of Code 2020 Work Product Submission

Google Summer of Code 2020 Work Product Submission

Student: Garima Monga (@Garima829)
Organisation: JBoss
Project: Quarkus: Improve Gradle support


Overview of Work Done

(Click on the title for link to PR)

Test Coverage for missing resources

Provided missing test coverage for Gradle tool -


Detailed Description of the PRs

  • Generating Far Jar This test simply generates a fast jar for a single module project.

  • Updated the Fast Jar Test This PR modifies the fast jar test to check if the generated fast jar is launched correctly and works correctly in dev mode.

  • Uber Jar Test for single module projects This test first generates uber-jar for a single module project and then launches the same to check if it gives the expected output under a time limit.

  • Uber jar test for multi module projects This test is the same as above one except for having multi-module projects

  • Adding and removing extensions from single module projects This simple test includes checking if the extensions are added and removed correctly from any single module project and that removing any non-existent extension from project works as expected.

  • Enabling dev mode for jandex plugin Generally, in a multi-module project we have a common bean which is injection into the application bean and beans.xml (marker file) is what enables that injection, in this PR, I worked around generating jandex index as injectable beans instead of META-INF/beans.xml as it gets stored in the jar and can be re-used instead of being recalculated every time an application is built, this completes generation of jandex plugin while creating a jar but Quarkus doesn't make a jar file during "dev mode". To resolve this, we peek into the quarkusDev task and see in its process resources if it depends on jandex task and if it does, add a dependency from quarkusDev on jandex and add the generated index onto the classpath. After this, to support the hot reload of the live changes in dev mode, we remove the check of jandex_index and simply return the file path which finally picks up the live code updates.

  • Fixing version range to support backwards compatibility Earlier while generating a project, specifying -DplatformArtifactId=quarkus-bom was necessary or else the project searched for the latest available release of quarkus-universe-bom itself and this broke the backwards compatibility. To resolve this issue, we create a version range expression for the generated project to look up instead of looking for the latest available quarkus-universe-bom release. This expression is used when either all the BOM coordinates are null or when bomArtifactId = quarkus-universe-bom and ends up rectifying the compatibility while also supporting the offline mode.

  • List extensions of a single module project A test to verify that running the :listExtensions task gives an output which contains all the extensions specified by our project by asserting the same.


Blogs


Thank You!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment