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

Add hook for Groovy compilations to be processed as well #50

Merged
merged 1 commit into from Nov 1, 2014

Conversation

Projects
None yet
2 participants
@harningt
Copy link
Contributor

harningt commented Oct 6, 2014

Attempting to use Retrolambda-processed code alongside Spock tests results in incompatible class files being used.

For example:

us.eharning.base.SplitObservableTest > initializationError FAILED
    java.lang.UnsupportedClassVersionError: us/eharning/base/SplitObservableTest : Unsupported major.minor version 52.0

The general cause:

  • compileGroovy task outputs Java 8 code
  • compileRetrolambdaTest is skipped if no Java test code running, even if present, changes may be missed
  • test executes using older JRE - resulting in failure

This change hooks onto the Groovy plugin and attaches a compileRetrolambdaGroovy* task.
I had to fake the Groovy compilation task name by collecting the Java task name and replacing with Groovy... there's probably a better way but I could not find any relevant Groovy properties on any sourceSet

@harningt

This comment has been minimized.

Copy link
Contributor

harningt commented Oct 22, 2014

Are there any concerns with this patch?

@evant

This comment has been minimized.

Copy link
Owner

evant commented Oct 22, 2014

Sorry, I should have replied sooner. It looks good, I just haven't had a chance to test it yet.

@evant evant merged commit 2269533 into evant:master Nov 1, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment