Re: pgjdbc: Maven -> Gradle, Java 6 => 7, JUnit 4 => 5

From: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>
To: PostgreSQL JDBC list <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: pgjdbc: Maven -> Gradle, Java 6 => 7, JUnit 4 => 5
Date: 2020-03-17 08:38:44
Message-ID: CAB=Je-Fi2BUXc1OV2Y_Muz-Y+_=yLyVVUJa3_Wj+YGKonqaYuA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Michał Niklas 2020-03-25 14:21:19 Is it possible to compress transmission data?
Previous Message Tom Dunstan 2020-03-17 07:03:54 Re: pgjdbc: Maven -> Gradle, Java 6 => 7, JUnit 4 => 5