-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
configure mockito agent #11560
configure mockito agent #11560
Conversation
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.
maybe somebody more in-tune with gradle will flag this, but, this LGTM
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.
This should use a CommandLineArgumentProvider to avoid resolving dependencies during configuration time - I think there are some other spots that may need to change in this direction too, for example stuff used by Javadoc, but it would be better to not increase the tech debt here.
8346235
to
ac66afc
Compare
Hopefully addressed that to your liking. |
It should be something like this abstract class MockitoAgentProvider : CommandLineArgumentProvider {
@get:InputFiles
abstract val fileCollection: ConfigurableFileCollection
override fun asArguments(): Iterable<String> {
return listOf("..." + fileCollection.files.single().absolutePath)
}
}
tasks.test {
val provider = objects.newInstance<MockitoAgentProvider>()
provider.fileCollection.from(configuration)
jvmArgumentProviders.add(provider)
} also should use register instead of create for the Configuration |
e938140
to
52dcbfb
Compare
52dcbfb
to
5ccbc1b
Compare
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.
Looks fine, but one thing to consider is if Spigot configures the equivalent in Maven then this should move to the setup gradle build patch.
5ccbc1b
to
0428003
Compare
Addresses issues with newer Java versions and Mockito.