Skip to content

Moved lucene.java.tests-and-randomization.gradle and more scripts to java #14897

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

Merged
merged 8 commits into from
Jul 6, 2025

Conversation

dweiss
Copy link
Contributor

@dweiss dweiss commented Jul 3, 2025

  • Convert the related lucene.java.beasting.gradle too.
  • remove root ext props (rootSeedUserProvided) and use build globals extension.

Copy link

github-actions bot commented Jul 3, 2025

This PR does not have an entry in lucene/CHANGES.txt. Consider adding one. If the PR doesn't need a changelog entry, then add the skip-changelog label to it and you will stop receiving this reminder on future updates to the PR.

@dweiss dweiss marked this pull request as draft July 3, 2025 21:09
@dweiss dweiss added the skip-changelog Apply to PRs that don't need a changelog entry, stopping the automated changelog check. label Jul 3, 2025
@dweiss dweiss changed the title Moved lucene.java.tests-and-randomization.gradle to java Moved lucene.java.tests-and-randomization.gradle and more scripts to java Jul 4, 2025
@dweiss dweiss marked this pull request as ready for review July 4, 2025 13:48
@dweiss
Copy link
Contributor Author

dweiss commented Jul 4, 2025

I think this is already large enough and fairly self-isolated. I'd appreciate if you could take a look, @breskeby, although I'm sure it's not light reading.

2 similar comments
@dweiss
Copy link
Contributor Author

dweiss commented Jul 4, 2025

I think this is already large enough and fairly self-isolated. I'd appreciate if you could take a look, @breskeby, although I'm sure it's not light reading.

@dweiss
Copy link
Contributor Author

dweiss commented Jul 4, 2025

I think this is already large enough and fairly self-isolated. I'd appreciate if you could take a look, @breskeby, although I'm sure it's not light reading.

Copy link
Contributor

@breskeby breskeby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few minor remarks. I think k this makes things definitely better.

* resources are located under the top-level {@code gradle/} folder.
*/
protected Path gradlePluginResource(Project project, String relativePath) {
return project
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of project.rootProject.layout.projectDir you can use project.layout. getSettingsDirectory()

This avoids crossreferencing root project here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do remember your comment from before but getSettingsDirectory pops up as "unstable" API though... is it ok?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changed it to getSettingsDirectory, even though it's marked as unstable API (incubating).https://docs.gradle.org/current/javadoc/org/gradle/api/file/ProjectLayout.html#getSettingsDirectory()

jvmMetadata.getJavaHome());
};

project
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I would create a task just for a logger message

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason for it is that I only want to get it printed once. I couldn't figure out any other clean way of doing it. Also, if you log during configuration time, the log message is stripped of the "context" (task where it comes from) and I think it's nice to be able to track it back to something more concrete. If you know how to implement this in a different way, let me know.

.withType(Test.class)
.configureEach(
task -> {
task.dependsOn(":altJvmWarning");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't you just put the logging here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explained above - it'd print the log message multiple times. Not ideal, I think.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ultimately the way for those loggings would be to use the problems api noawadays but again that's an overload to just introduce this for this warning. I have used that while working on the license checks pr. I'd suggest to leave it as is for now and we can look into leverage the problems api at another time Dir more placing to have a central place for these warnings

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@dweiss
Copy link
Contributor Author

dweiss commented Jul 6, 2025

I am going to merge this one in, but I'd love to see what you have to say with regard to the comments above. If there is a better way to achieve the goal (one-time log message), I'll follow up.

@dweiss dweiss merged commit b4f34d0 into apache:main Jul 6, 2025
8 checks passed
@dweiss dweiss deleted the gradle-plugins-to-java-2 branch July 6, 2025 15:57
@rmuir
Copy link
Member

rmuir commented Jul 6, 2025

Thank you for another of these: I just had to mod these sources on another PR and it is really nice to do it with more confidence, compile-time checks, etc.

@dweiss
Copy link
Contributor Author

dweiss commented Jul 6, 2025

I agree. It's more verbose but much easier to write/ modify/ understand. Happy 4th of July!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:luke skip-changelog Apply to PRs that don't need a changelog entry, stopping the automated changelog check.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants