-
Notifications
You must be signed in to change notification settings - Fork 59
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
add support for libraries to have classes #182
Conversation
This is really cool @steven-terrana thank you for adding this feature |
Hey @nrayapati - The pattern I would recommend for that would to be to create a utility library that has helper steps and common classes consumed by other libraries. Would this work for your use case? |
It sounds like you already mentioned about it in the description that these classes can be used across other libraries as well, so I don't think of a need where we need to maintain classes in the root directory anymore. :) Thank you for quick response. |
Sounds like a good idea too! Thank you! |
PR Details
This Pull Request adds support for JTE libraries to contribute classes via a
src
directory. These classes can be imported from pipeline templates, steps from the same library, or steps from another library.For example, a library with a
src/example/Utility.groovy
file of:could be imported and used via:
Description
The
src
directory contents of all loaded libraries are synced to a commonsrc
directory within the build root directory'sjte
directory. This happens prior to loading the steps so that the classes are available to the classloader during compilation.How Has This Been Tested
Manual testing + relevant unit tests.
Types of Changes
Checklist