Skip to content

Register new tasks after plugin is configured. #294

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thetoothpick
Copy link

Avoids NPE when trying to check whether a project is affected while creating tasks.

fixes #287

Context

After #270, the plugin registers new tasks during initial setup, then configures the plugin and initializes the AffectedModuleDetector after projects are evaluated. This fixed #205, but registering the test plugins requires the AffectedModuleDetector, which is null until AffectedModuleDetector.configure(project) is called.

registerCustomTasks() already wrapped its setup in rootProject.afterEvaluate, but registerTestTasks() did not. The execution order is important here, so the register functions were moved after AffectedModuleDetector.configure(), after projects are evaluated.

Avoids NPE when trying to check whether a project is affected while creating tasks.

fixes dropbox#287
@CLAassistant
Copy link

CLAassistant commented Jul 11, 2025

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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 this pull request may close these issues.

java.lang.NullPointerException (no error message) on the version 0.5.0 Unable to get Log files to generate
2 participants