Re: pgjdbc: Maven -> Gradle, Java 6 => 7, JUnit 4 => 5 - Mailing list pgsql-jdbc

From Vladimir Sitnikov
Subject Re: pgjdbc: Maven -> Gradle, Java 6 => 7, JUnit 4 => 5
Date
Msg-id CAB=Je-Fi2BUXc1OV2Y_Muz-Y+_=yLyVVUJa3_Wj+YGKonqaYuA@mail.gmail.com
Whole thread Raw
In response to Re: pgjdbc: Maven -> Gradle, Java 6 => 7, JUnit 4 => 5  (Tom Dunstan <pgsql@tomd.cc>)
Responses Re: pgjdbc: Maven -> Gradle, Java 6 => 7, JUnit 4 => 5
List pgsql-jdbc
Thanks everybody for the inputs!

I appreciate it, and hopefully, the improvements would simplify development and reviews.


Tom>If we do require JDK7 support, I'd strongly recommend building with 8+ so we can use a recent Gradle and then using JDK7 in the build when compiling

Just in case you missed, there's https://github.com/pgjdbc/pgjdbc/pull/1627 which is a fully-workable PR that migrates the build to Gradle.
The resulting build script produces Java7-compatible jar file as well.
Of course, it requires Java8+ to build (because Gradle requires that), however, it preprocesses the source files and builds with source=target=1.7 to produce -jre7.jar

Tom> then using JDK7 in the build when compiling

The real showstopper for supporting Java7 for me is JUnit5.
We do want to move forward, JUnit5 would simplify certain tests (and IDE integrations), however, JUnit5 can't be executed with Java7.

That means we can use source=target=1.7 to produce the jar, however, we do not really know if the jar works at all.

So far my plan would be as follows:

* 42.3.0 (~April): migrate to Gradle, drop Java6, keep Java7 release as an untested artifact,  enable Java 1.8 syntax in tests.
* 42.4.0 (~June): drop Java7

Tom>Was this suggesting using Kotlin for tests or something else?

My secret plan was to trigger a discussion :)
Kotlin for tests would be a significant signal to noise improvement even if we compare it with Java 1.8
Kotlin for the main code is a slightly bit different discussion.

Vladimir

pgsql-jdbc by date:

Previous
From: Tom Dunstan
Date:
Subject: Re: pgjdbc: Maven -> Gradle, Java 6 => 7, JUnit 4 => 5
Next
From: Michał Niklas
Date:
Subject: Is it possible to compress transmission data?