Skip to content
This repository has been archived by the owner on Jan 3, 2025. It is now read-only.

feat(build): Use java matrix in github action #222

Merged
merged 9 commits into from
Oct 22, 2022
Merged

feat(build): Use java matrix in github action #222

merged 9 commits into from
Oct 22, 2022

Conversation

ursjoss
Copy link
Contributor

@ursjoss ursjoss commented Oct 21, 2022

Adds the jvm version to the github action build job.

Configured in the course of trying to work on #220.

Checklist

  • I've added my name to the AUTHORS file.

@MarkusAmshove
Copy link
Owner

I'm wondering if it's because I build the release artifacts locally with Java 17, meaning the target version doesn't get picked up correctly, although setting it in the resulting module file.

I think that's an easy test that I can do locally with your earlier repro

@MarkusAmshove
Copy link
Owner

I think I could make you repro work locally.

When building Kluent with Java 11 and publishing it locally, then I can run all tests in your project with that version and Java 11.
I must have built it with java 11 in the past (which is not unlikely) and didn't notice that it picks it up for APIs.

Your matrix with JVM versions is interesting, I think we'll take that for github actions :) I'll also set up a JDK 8 build for publishing.

You can test your projects locally by doing the following:

  1. Set the Kluent version in build.gradle allProjects to something like 55.0
  2. Build the project with Java 11 and gradlew build publishToMavenLocal
  3. Add mavenLocal() as a repository in your project
  4. Increment the version you use as dependency to 55.0
  5. Run a build

This worked for me

@ursjoss ursjoss changed the title fix(build): [#220] sets jvmTarget feat(build): Use java matrix in github action Oct 22, 2022
@ursjoss
Copy link
Contributor Author

ursjoss commented Oct 22, 2022

Yep that worked for me too (after having disabled signing). Glad you like the java matrix and thanks for fixing the issue.

@MarkusAmshove
Copy link
Owner

I've found a nasty workaround, as described in #223
For that the matrix isn't necessary anymore, as it's dependent on the JVM that Gradle was launched with.

I'll merge this PR anyway, to give you all the credit to deserve for hunting down this issue, thank you :)

@MarkusAmshove MarkusAmshove merged commit 1367166 into MarkusAmshove:master Oct 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants