-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Access build tools resources #32201
Access build tools resources #32201
Conversation
Pinging @elastic/es-core-infra |
@atorok Thanks for getting started on this. Accessing resources from build tools is something we do in many places in our build, but it has created a spaghetti network of implicit cross project dependencies, and formalizing these will be great for ensuring our gradle plugin continues to work externally. I have 2 general comments so far:
|
I wasn't 100% sure on the white-listing either, will remove it. We could add conventions to reduce the boilerplate. |
I found gradle/gradle#3811 which has some more insight into why some of the lazy configuration doesn't work. |
@elasticmachine test this please |
1 similar comment
@elasticmachine test this please |
@rjernst this is ready for another review |
|
||
exportBuildResources { | ||
resource 'checkstyle.xml' | ||
resource 'minimumCompilerVersion' |
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.
Use other files, e.x. forbidden APIs to avoid confusion.
Rename task to buildResources and method to use |
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.
LGTM. One suggestion: change "exportBuildResources" to "buildResources" and then the method to "use", so it looks more like a normal DSL.
it's |
Add a buildResources buildResources.take('resource') writes the resources out to the filesystem so the paths can be sent int other tools.
@atorok I don't think |
…listeners * elastic/master: (58 commits) [ML] Partition-wise maximum scores (elastic#32748) [DOCS] XContentBuilder#bytes method removed, using BytesReference.bytes(docBuilder) (elastic#32771) HLRC: migration get assistance API (elastic#32744) Add a task to run forbiddenapis using cli (elastic#32076) [Kerberos] Add debug log statement for exceptions (elastic#32663) Make x-pack core pull transport-nio (elastic#32757) Painless: Clean Up Whitelist Names (elastic#32791) Cat apis: Fix index creation time to use strict date format (elastic#32510) Clear Job#finished_time when it is opened (elastic#32605) (elastic#32755) Test: Only sniff host metadata for node_selectors (elastic#32750) Update scripted metric docs to use `state` variable (elastic#32695) Painless: Clean up PainlessCast (elastic#32754) [TEST] Certificate NONE not allowed in FIPS JVM (elastic#32753) [ML] Refactor ProcessCtrl into Autodetect and Normalizer builders (elastic#32720) Access build tools resources (elastic#32201) Tests: Disable rolling upgrade tests with system key on fips JVM (elastic#32775) HLRC: Ban LoggingDeprecationHandler (elastic#32756) Fix test reproducability in AbstractBuilderTestCase setup (elastic#32403) Only require java<version>_home env var if needed Tests: Muted ScriptDocValuesDatesTests.testJodaTimeBwc ...
The build plugin now adds a task to write out specific resources meant for consumption to the file sustem.
The task is not ran by default, the tasks that need the files should depend on it.
Will update existing uses in checkstyle and look for others in a subsequent PR.
Came out of a discussion following #31989.