-
Notifications
You must be signed in to change notification settings - Fork 19
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
Procedural Build Plugin #1567
base: develop
Are you sure you want to change the base?
Procedural Build Plugin #1567
Conversation
bc3242f
to
999aeb1
Compare
399bf91
to
1c8bef4
Compare
Question for @dandelany, should this plugin version track the Aerie version? |
@dandelany another thought, we might need to expose |
Can we add the procedural library dependencies in this plugin? |
Hmm good question @JoelCourtney . We'd want to make sure end users can define which version of Aerie deps they want to grab. One option would be pinning this Gradle plugin to Aerie versions, so that applying version e.g. |
I like that idea |
Sounds reasonable to me - we'd just need to make sure we include the plugin in our release process. Would that be relatively straightforward? |
05d1c26
to
e87dea8
Compare
I've taken a slightly different approach implementing this @JoelCourtney @mattdailis. The procedural plugin's version won't directly track Aerie version, since I wasn't able to propagate specific dependency versions to plugin consumers. Instead, the plugin will read the dependency version from |
...main/java/gov/nasa/ammos/aerie/procedural/examples/fooprocedures/procedures/StayWellFed.java
Outdated
Show resolved
Hide resolved
I'm fine with using |
fcf0a87
to
c15c121
Compare
I am totally baffled how the tests are passing... the plugin hasn't been published, yet both the e2e package and the procedural/examples package are fetching and applying them as if they are. It doesn't work on my machine, but it seems to work in gh workflows... ??? |
They actually are published already @JoelCourtney! https://github.com/NASA-AMMOS/aerie/packages/2282306 I sort of accidentally did this, I didn't realize my test API token had write permissions to the aerie packages 🫣. As stated in the caution block, you'll need to expose |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, well we'll need to fix the local plugin applications for e2e tests and procedural examples next time we update the plugin. Otherwise we won't be able to properly test plugin updates.
… of needing it for plugin resolution
this even further simplifies the end users build.gradle scripts
c15c121
to
78f20f0
Compare
closes #1470
Description
Extract the build logic used to generate procedural scheduling (and soon to be constraint) jars into a separate gradle plugin, which can be applied to new projects. This drastically simplifies the new user experience (they don't have to copy paste some build logic) and allows us to "remotely" update build logic with bug fixes or new features, i.e., users can just update to
v0.0.2
of our plugin to get e.g. new dynamic linking support.Caution
The current implementation of this plugin requires anyone who wants to run gradle commands in the
aerie
repo to have aGITHUB_TOKEN
env var populated with an API key. This is so that gradle can consume this plugin before "configuring" the project.Summary of changes
procedural/plugin/src/main/groovy/gov.nasa.ammos.aerie.procedural.plugin.gradle
Verification
I've published many times to my aerie fork to test this plugin works as expected when published. Additionally, I've already published to aerie packages, so our e2e tests for this PR.
Documentation
We can update the new user guides for procedural scheduling / constraints with this plugin. Additionally we can streamline the
build.gradle
in the aerie mission model template repo.Future work
It could also be useful to create an
extension
for this plugin, which would allow us to configure procedural builds something like the following, i.e. we can write our own configuration DSL.It might also be fruitful to extend this plugin idea to mission models.
We can also drastically simplify our existing... 🤔
...two thousand lines of gradle build script by deduplicating shared logic (e.g. a convention script for all our java libraries that gets published and tested in the same way)