Skip to content
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

Option to inject system properties into JApiCmpWorkAction worker #83

Closed
NielsDoucet opened this issue Nov 8, 2024 · 0 comments · Fixed by #86
Closed

Option to inject system properties into JApiCmpWorkAction worker #83

NielsDoucet opened this issue Nov 8, 2024 · 0 comments · Fixed by #86

Comments

@NielsDoucet
Copy link
Contributor

private void execForNewGradle(final List<JApiCmpWorkerAction.Archive> baseline, final List<JApiCmpWorkerAction.Archive> current) {
getWorkerExecutor().processIsolation(new Action<ProcessWorkerSpec>() {
@Override
public void execute(ProcessWorkerSpec spec) {
spec.getClasspath().from(calculateWorkerClasspath());
}
}).submit(JApiCmpWorkAction.class, new Action<JapiCmpWorkParameters>() {
@Override
public void execute(JapiCmpWorkParameters params) {
params.getConfiguration().set(calculateWorkerConfiguration(baseline, current));
}
});
}

Would you allow injecting system properties into the worker process here?
We have a use case where we need to adjust some rules' behavior based on properties in our custom extension.
This seems currently only possible by configuring these rules in an afterEvaluate block, which I'd like to avoid.

If we had an option to inject system properties into the worker, it would be possible to influence a rule's behavior through these using a doFirst action on the JapicmpTask.

NielsDoucet added a commit to NielsDoucet/japicmp-gradle-plugin that referenced this issue Nov 29, 2024
This MapProperty allows to pass in system properties to the forked
worker process that executes the api compare work action.

fixes melix#83
NielsDoucet added a commit to NielsDoucet/japicmp-gradle-plugin that referenced this issue Nov 29, 2024
This MapProperty allows to pass in system properties to the forked
worker process that executes the api compare work action.

fixes melix#83
@melix melix closed this as completed in #86 Jan 17, 2025
melix pushed a commit that referenced this issue Jan 17, 2025
This MapProperty allows to pass in system properties to the forked
worker process that executes the api compare work action.

fixes #83
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant