Skip to content

Commit c4efc66

Browse files
committed
Automatic Configuration + Dependency Updates
1 parent a31d587 commit c4efc66

6 files changed

Lines changed: 42 additions & 10 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ And the following to your `gradle.properties`:
3737
embedded_postgres_version = 3.0.2
3838
```
3939

40-
The default version of the embedded postgres is `PostgreSQL 18.0.0`, but you can change it by following the instructions described in [Postgres version](#postgres-version).
40+
The default version of the embedded postgres is `PostgreSQL 18.1.0`, but you can change it by following the instructions described in [Postgres version](#postgres-version).
4141

4242
## Basic Usage
4343

@@ -75,7 +75,7 @@ independent databases gives you.
7575

7676
## Postgres version
7777

78-
The default version of the embedded postgres is `PostgreSQL 18.0.0`, but it can be changed by importing `embedded-postgres-binaries-bom`.
78+
The default version of the embedded postgres is `PostgreSQL 18.1.0`, but it can be changed by importing `embedded-postgres-binaries-bom`.
7979

8080
Add the following to your `build.gradle.kts`;
8181
```kotlin
@@ -88,7 +88,7 @@ dependencies {
8888
And the following to your `gradle.properties`:
8989
```properties
9090
# Check this on https://central.sonatype.com/artifact/io.zonky.test.postgres/embedded-postgres-binaries-bom/
91-
postgresql_version = 18.0.0
91+
postgresql_version = 18.1.0
9292
```
9393

9494
A list of all available versions of postgres binaries can be found [here](https://central.sonatype.com/artifact/io.zonky.test.postgres/embedded-postgres-binaries-bom/).

build.gradle.kts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ val projectGroup = providers.gradleProperty("group")
1313
val projectVersion = providers.gradleProperty("version")
1414

1515
val javaVersion = providers.gradleProperty("java_version")
16+
val gradleJavaVersion = providers.gradleProperty("gradle_java_version")
1617

1718
val embeddedPostgresBinariesVersion = providers.gradleProperty("embedded_postgres_binaries_version")
1819
val commonsCompressVersion = providers.gradleProperty("commons_compress_version")
@@ -58,7 +59,10 @@ dependencies {
5859
testRuntimeOnly("org.slf4j:slf4j-simple:${slf4jVersion.get()}")
5960
}
6061
java {
61-
toolchain.languageVersion = JavaLanguageVersion.of(javaVersion.get())
62+
toolchain {
63+
languageVersion = JavaLanguageVersion.of(javaVersion.get().toInt())
64+
vendor = JvmVendorSpec.ADOPTIUM
65+
}
6266
sourceCompatibility = JavaVersion.toVersion(javaVersion.get().toInt())
6367
targetCompatibility = JavaVersion.toVersion(javaVersion.get().toInt())
6468
withSourcesJar()
@@ -69,7 +73,11 @@ tasks {
6973
options.encoding = "UTF-8"
7074
sourceCompatibility = javaVersion.get()
7175
targetCompatibility = javaVersion.get()
72-
options.release = javaVersion.get().toInt()
76+
if (javaVersion.get().toInt() > 8) options.release = javaVersion.get().toInt()
77+
}
78+
named<UpdateDaemonJvm>("updateDaemonJvm") {
79+
languageVersion = JavaLanguageVersion.of(gradleJavaVersion.get().toInt())
80+
vendor = JvmVendorSpec.ADOPTIUM
7381
}
7482
withType<JavaExec>().configureEach { defaultCharacterEncoding = "UTF-8" }
7583
withType<Javadoc>().configureEach { options.encoding = "UTF-8" }

gradle.properties

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,19 @@ group = com.smushytaco
99
name = embedded-postgres
1010
version = 3.0.2
1111
##########################################################################
12-
# Java Version
12+
# Java Configuration
13+
# The Java version the JDK will be for compiling and running code.
1314
java_version = 25
15+
# The Java version the JDK will be for running Gradle.
16+
gradle_java_version = 25
1417
##########################################################################
1518
# Dependency Versions
1619
# Check this on https://central.sonatype.com/artifact/io.zonky.test.postgres/embedded-postgres-binaries-bom/
17-
embedded_postgres_binaries_version = 18.0.0
20+
embedded_postgres_binaries_version = 18.1.0
1821
# Check this on https://central.sonatype.com/artifact/org.apache.commons/commons-compress/
1922
commons_compress_version = 1.28.0
2023
# Check this on https://central.sonatype.com/artifact/org.flywaydb/flyway-database-postgresql/
21-
flyway_version = 11.16.0
24+
flyway_version = 11.17.0
2225
# Check this on https://central.sonatype.com/artifact/org.junit.jupiter/junit-jupiter-api/
2326
junit_version = 6.0.1
2427
# Check this on https://central.sonatype.com/artifact/org.liquibase/liquibase-core/
@@ -38,5 +41,9 @@ yumi_gradle_licenser_version = 2.2.1
3841
# Check this on https://plugins.gradle.org/plugin/co.uzzu.dotenv.gradle/
3942
dotenv_version = 4.0.0
4043
# Check this on https://github.com/GradleUp/nmcp/releases/latest/
41-
nmcp_version = 1.2.0
44+
nmcp_version = 1.3.0
45+
##########################################################################
46+
# Plugin Dependency
47+
# Check this on https://plugins.gradle.org/plugin/org.gradle.toolchains.foojay-resolver-convention/
48+
foojay_resolver_version = 1.0.0
4249
##########################################################################
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#This file is generated by updateDaemonJvm
2+
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c5ee947fbfb70bc347d8d531e3a578c4/redirect
3+
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/5ee463876563a46fff651cce1bc53a4c/redirect
4+
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c5ee947fbfb70bc347d8d531e3a578c4/redirect
5+
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/5ee463876563a46fff651cce1bc53a4c/redirect
6+
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/e1118b4c7c2858d28154d086dbff010e/redirect
7+
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/59a9771cad43219260d9aac9a8ec4d6a/redirect
8+
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c5ee947fbfb70bc347d8d531e3a578c4/redirect
9+
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/5ee463876563a46fff651cce1bc53a4c/redirect
10+
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/b96cb7670c095245220e7d01d5927b58/redirect
11+
toolchainVendor=ADOPTIUM
12+
toolchainVersion=25

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-all.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

settings.gradle.kts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,19 @@ pluginManagement {
55
mavenCentral()
66
gradlePluginPortal()
77
}
8+
val foojayResolverVersion = providers.gradleProperty("foojay_resolver_version")
89
val dokkaVersion = providers.gradleProperty("dokka_version")
910
val yumiGradleLicenserVersion = providers.gradleProperty("yumi_gradle_licenser_version")
1011
val dotenvVersion = providers.gradleProperty("dotenv_version")
1112
val nmcpVersion = providers.gradleProperty("nmcp_version")
1213
plugins {
14+
id("org.gradle.toolchains.foojay-resolver-convention").version(foojayResolverVersion.get())
1315
id("org.jetbrains.dokka").version(dokkaVersion.get())
1416
id("dev.yumi.gradle.licenser").version(yumiGradleLicenserVersion.get())
1517
id("co.uzzu.dotenv.gradle").version(dotenvVersion.get())
1618
id("com.gradleup.nmcp").version(nmcpVersion.get())
1719
}
20+
}
21+
plugins {
22+
id("org.gradle.toolchains.foojay-resolver-convention")
1823
}

0 commit comments

Comments
 (0)