Skip to content

Commit

Permalink
Rearranging how dependency versions are defined to reduce noise from … (
Browse files Browse the repository at this point in the history
#31)

* Rearranging how dependency versions are defined to reduce noise from Dependabot

* Adding PR template
  • Loading branch information
SuppieRK authored Dec 28, 2024
1 parent f889656 commit 0f8faa6
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 14 deletions.
8 changes: 8 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
All Submissions:

* [ ] Have you followed the guidelines in our Contributing document?
* [ ] Have you checked to ensure there aren't other open [Pull Requests](../../../pulls) for the same update/change?

### Changes to Core Features:

* [ ] Have you added an explanation of what your changes do and why you'd like us to include them?
15 changes: 12 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import java.nio.charset.StandardCharsets

plugins {
// https://plugins.gradle.org/plugin/com.diffplug.spotless
id 'com.diffplug.spotless' version '6.25.0'
}

Expand All @@ -16,12 +19,18 @@ subprojects {
apply plugin: 'java'

java {
sourceCompatibility = '17'
targetCompatibility = '17'
compileJava.options.encoding = 'UTF-8'
def javaVersion = JavaVersion.VERSION_17.toString()

sourceCompatibility = javaVersion
targetCompatibility = javaVersion
compileJava.options.encoding = StandardCharsets.UTF_8.name()

withSourcesJar()
withJavadocJar()

toolchain {
languageVersion = JavaLanguageVersion.of(javaVersion)
}
}

tasks.withType(Javadoc).configureEach {
Expand Down
14 changes: 11 additions & 3 deletions example-project/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,18 @@ repositories {
mavenCentral()
}

ext {
set('jooqVersion', '3.19.16')
set('postgresqlVersion', '42.7.4')
}

dependencies {
implementation 'org.postgresql:postgresql:42.7.4'
// https://mvnrepository.com/artifact/org.postgresql/postgresql
implementation group: 'org.postgresql', name: 'postgresql', version: postgresqlVersion

// jooqGenerator scope comes from jOOQ code generator plugin
jooqGenerator 'org.postgresql:postgresql:42.7.4'
// https://mvnrepository.com/artifact/org.postgresql/postgresql
jooqGenerator group: 'org.postgresql', name: 'postgresql', version: postgresqlVersion
}

// Standard Flyway plugin configuration
Expand All @@ -31,7 +38,8 @@ flyway {
// See https://github.com/etiennestuder/gradle-jooq-plugin?tab=readme-ov-file#configuration
jooq {
// Allows you to select specific version of jOOQ you want to use
version = '3.19.11'
// https://mvnrepository.com/artifact/org.jooq/jooq
version = jooqVersion

configurations {
main {
Expand Down
26 changes: 18 additions & 8 deletions plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,25 +51,35 @@ repositories {
mavenCentral()
}

ext {
set('flywayVersion', '11.1.0')
set('gradleJooqPluginVersion', '9.0')
set('testContainersVersion', '1.20.4')

set('jUnitVersion', '5.11.4')
set('jUnitPlatformLauncherVersion', '1.11.4')
set('spockVersion', '2.3-groovy-3.0')
}

dependencies {
// ====================
// Exposed plugin dependencies

// https://plugins.gradle.org/plugin/org.flywaydb.flyway
api group: 'org.flywaydb', name: 'flyway-gradle-plugin', version: '11.1.0'
api group: 'org.flywaydb', name: 'flyway-gradle-plugin', version: flywayVersion

// https://plugins.gradle.org/plugin/nu.studer.jooq
api group: 'nu.studer', name: 'gradle-jooq-plugin', version: '9.0'
api group: 'nu.studer', name: 'gradle-jooq-plugin', version: gradleJooqPluginVersion


// ====================
// Implementation dependencies

// https://mvnrepository.com/artifact/org.testcontainers/postgresql
implementation group: 'org.testcontainers', name: 'postgresql', version: '1.20.4'
implementation group: 'org.testcontainers', name: 'postgresql', version: testContainersVersion

// https://mvnrepository.com/artifact/org.flywaydb/flyway-database-postgresql
implementation group: 'org.flywaydb', name: 'flyway-database-postgresql', version: '11.1.0'
implementation group: 'org.flywaydb', name: 'flyway-database-postgresql', version: flywayVersion


// ====================
Expand All @@ -78,22 +88,22 @@ dependencies {
testImplementation gradleTestKit()

// https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: '5.11.3'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: jUnitVersion

// https://mvnrepository.com/artifact/org.junit.platform/junit-platform-launcher
testImplementation group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.11.3'
testImplementation group: 'org.junit.platform', name: 'junit-platform-launcher', version: jUnitPlatformLauncherVersion


// ====================
// Functional test dependencies

// https://mvnrepository.com/artifact/org.spockframework/spock-core
functionalTestImplementation(group: 'org.spockframework', name: 'spock-core', version: '2.3-groovy-3.0') {
functionalTestImplementation(group: 'org.spockframework', name: 'spock-core', version: spockVersion) {
exclude group: 'org.codehaus.groovy'
}

// https://mvnrepository.com/artifact/org.junit.platform/junit-platform-launcher
functionalTestRuntimeOnly group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.11.3'
functionalTestRuntimeOnly group: 'org.junit.platform', name: 'junit-platform-launcher', version: jUnitPlatformLauncherVersion
}

tasks.withType(Test).configureEach {
Expand Down

0 comments on commit 0f8faa6

Please sign in to comment.