Skip to content
This repository has been archived by the owner on Oct 31, 2022. It is now read-only.

Set jvm version for compileGroovy #166

Merged
merged 1 commit into from
Jun 11, 2021
Merged

Conversation

jkasten2
Copy link
Member

@jkasten2 jkasten2 commented Jun 11, 2021

  • Groovy does not automatically use the compileJava settings so we need
    to define compileGroovy.
  • Also defining as Java 1.8 so when a project consuming this plugin
    it can run it with getting a "class file version" error.

This will fix errors such as

* What went wrong:
A problem occurred evaluating project ':app'.
> com/onesignal/androidsdk/GradleProjectPlugin has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Tests

Manual

Ran ./gradle build on an Android project with a local build of this plugin with Java 8 to reproduce the issue. Then rebuilt with this new setting to ensure this resolved the issue.


This change is Reviewable

* Groovy does not automatically use the compileJava settings so we need
to define compileGroovy.
* Also defining as Java 1.8 so when a project consuming this plugin
it can run it with getting a "class file version" error.
@jkasten2 jkasten2 requested a review from Jeasmine June 11, 2021 20:57
@jkasten2 jkasten2 merged commit 60c2771 into main Jun 11, 2021
@jkasten2 jkasten2 deleted the fix/groovy_jvm_compile_version branch June 11, 2021 21:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants