Skip to content

Commit

Permalink
Build stack update
Browse files Browse the repository at this point in the history
# What
Update build stack
Update kotlin logging

# Why
To allow dependabot to update the dependencies
Package has been renamed
  • Loading branch information
deejay1 committed Oct 3, 2023
1 parent 54f7ecb commit 37ea7f8
Show file tree
Hide file tree
Showing 33 changed files with 147 additions and 213 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ updates:
schedule:
interval: "monthly"
open-pull-requests-limit: 10

# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
30 changes: 15 additions & 15 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import io.gitlab.arturbosch.detekt.DetektPlugin
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jlleitschuh.gradle.ktlint.KtlintPlugin

plugins {
kotlin("jvm") version Kotlin.version apply false
id(AxionReleasePlugin.plugin) version AxionReleasePlugin.version
id(DetektPlugin.plugin) version DetektPlugin.version
id(KtlintPlugin.plugin) version KtlintPlugin.version
id(NexusPublishPlugin.plugin) version NexusPublishPlugin.version
kotlin("jvm") version libs.versions.kotlin
alias(libs.plugins.axion.release)
alias(libs.plugins.detekt)
alias(libs.plugins.ktlint)
alias(libs.plugins.nexus)
}

scmVersion {
Expand All @@ -17,17 +18,21 @@ scmVersion {
}

allprojects {
apply(plugin = Kotlin.plugin)
apply(plugin = "kotlin")

kotlin {
jvmToolchain(11)
}

repositories {
mavenCentral()
maven { url = uri(BigQueue.repositoryUri) }
maven { url = uri("https://raw.github.com/bulldog2011/bulldog-repo/master/repo/releases/") }
}
}

subprojects {
apply(plugin = DetektPlugin.plugin)
apply(plugin = KtlintPlugin.plugin)
apply<DetektPlugin>()
apply<KtlintPlugin>()

project.group = "pl.allegro.tech"
project.version = rootProject.scmVersion.version
Expand All @@ -40,12 +45,7 @@ subprojects {
}
}

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "11"
}

detekt {
toolVersion = DetektPlugin.version
ignoreFailures = true
}
}
Expand Down
7 changes: 0 additions & 7 deletions buildSrc/build.gradle.kts

This file was deleted.

117 changes: 0 additions & 117 deletions buildSrc/src/main/kotlin/Dependencies.kt

This file was deleted.

54 changes: 54 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[versions]
logging = "5.1.0"
snappy = "1.1.9.1"
zstd = "1.5.4-1"
shadow = "8.1.1"
logback = "1.2.11"
ktlint = "10.3.0"
detekt = "1.21.0"
axion = "1.14.3"
kotlin = "1.8.22"
properlty = "1.8.1"
mongodb = "4.8.2"
kotest = "5.3.1"
failsafe = "3.2.4"
testcontainers = "1.19.0"
awaitility = "4.2.0"
guava = "31.1-jre"
micrometer = "1.9.3"
commons = "3.12.0"
log4j = "1.7.36"
nexus = "1.3.0"
bigqueue = "0.7.0"

[libraries]
kotlin-logging = { group = "io.github.oshai", name = "kotlin-logging", version.ref = "logging" }
snappy = { group = "org.xerial.snappy", name = "snappy-java", version.ref = "snappy" }
zstd = { group = "com.github.luben", name = "zstd-jni", version.ref = "zstd" }
logback = { group = "ch.qos.logback", name = "logback-classic", version.ref = "logback" }
properlty = { group = "com.ufoscout.properlty", name = "properlty-kotlin", version.ref = "properlty" }
mongo-sync = { group = "org.mongodb", name = "mongodb-driver-sync", version.ref = "mongodb" }
mongo-reactive = { group = "org.mongodb", name = "mongodb-driver-reactivestreams", version.ref = "mongodb" }
kotest-runner-junit5 = { group = "io.kotest", name = "kotest-runner-junit5", version.ref = "kotest" }
kotest-assertions-core = { group = "io.kotest", name = "kotest-assertions-core", version.ref = "kotest" }
failsafe = { group = "dev.failsafe", name = "failsafe", version.ref = "failsafe" }
testcontainers = { group = "org.testcontainers", name = "testcontainers", version.ref = "testcontainers" }
testcontainers-mongodb = { group = "org.testcontainers", name = "mongodb", version.ref = "testcontainers" }
awaitility = { group = "org.awaitility", name = "awaitility-kotlin", version.ref = "awaitility" }
guava = { group = "com.google.guava", name = "guava", version.ref = "guava" }
micrometer = { group = "io.micrometer", name = "micrometer-registry-jmx", version.ref = "micrometer" }
apache-commons = { group = "org.apache.commons", name = "commons-lang3", version.ref = "commons" }
log4j = { group = "org.slf4j", name = "log4j-over-slf4j", version.ref = "log4j" }
bigqueue = { group = "com.leansoft", name = "bigqueue", version.ref = "bigqueue" }
[bundles]
compressors = ["zstd", "snappy"]
mongo-drivers = ["mongo-sync", "mongo-reactive"]
kotest = ["kotest-assertions-core", "kotest-runner-junit5"]
testcontainers = ["testcontainers", "testcontainers-mongodb"]

[plugins]
shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" }
ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint" }
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
axion-release = { id = "pl.allegro.tech.build.axion-release", version.ref = "axion" }
nexus = { id = "io.github.gradle-nexus.publish-plugin", version.ref = "nexus" }
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
25 changes: 17 additions & 8 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,13 +80,11 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -133,22 +131,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -193,6 +198,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down
1 change: 1 addition & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand Down
23 changes: 8 additions & 15 deletions mongo-migration-stream-cli/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
id(GradleShadowPlugin.plugin) version GradleShadowPlugin.version
alias(libs.plugins.shadow)
}

dependencies {
implementation(project(":mongo-migration-stream-core"))

implementation(Logback.dependency)
implementation(KotlinLogging.dependency)
implementation(Properlty.dependency)
implementation(Log4jOverSlf4j.dependency)
implementation(Micrometer.dependency)
implementation(MongoDbDriver.syncDependency)
implementation(libs.logback)
implementation(libs.properlty)
implementation(libs.log4j)
implementation(libs.micrometer)
implementation(libs.mongo.sync)

testImplementation(libs.kotlin.logging)
testImplementation(kotlin("test"))
testImplementation(Kotest.runnerJunit5)
testImplementation(Kotest.assertionsCore)
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(11))
}
testImplementation(libs.bundles.kotest)
}

tasks.getByName<Jar>("jar") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import com.mongodb.client.model.Filters
import com.mongodb.client.model.IndexOptions
import com.mongodb.client.model.Indexes
import com.mongodb.client.model.Updates
import mu.KotlinLogging
import io.github.oshai.kotlinlogging.KotlinLogging
import org.bson.BsonDocument
import org.bson.Document
import pl.allegro.tech.mongomigrationstream.configuration.MongoProperties
Expand Down
Loading

0 comments on commit 37ea7f8

Please sign in to comment.