Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade dependencies, gradle, jdk #178

Merged
merged 2 commits into from
Sep 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,6 @@ ij_kotlin_wrap_elvis_expressions = 1
ij_kotlin_wrap_expression_body_functions = 1
ij_kotlin_wrap_first_method_in_call_chain = false

[{*.json, *.yml}]
[*.{json,yml,yaml}]
indent_size = 2

[pom.xml]
max_line_length = 120
tab_width = 2
103 changes: 0 additions & 103 deletions .github/workflows/detekt-analysis.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/gradle-publish.yml

This file was deleted.

46 changes: 23 additions & 23 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,31 @@ jobs:

strategy:
matrix:
java: [ '11', '17', '21' ]
java: [ '17', '21' ]

name: Build under JDK ${{ matrix.Java }}

steps:
- name: Checkout github repo (+ download lfs dependencies)
uses: actions/checkout@v4
with:
lfs: true
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'corretto'
cache: 'gradle'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: wrapper
arguments: check build --stacktrace
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure()
with:
report_paths: '**/TEST-*.xml'
- name: Checkout github repo (+ download lfs dependencies)
uses: actions/checkout@v4
with:
lfs: true
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'corretto'
cache: 'gradle'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: wrapper
arguments: check build --stacktrace
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure()
with:
report_paths: '**/TEST-*.xml'

2 changes: 1 addition & 1 deletion .java-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
11.0
17
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

71 changes: 34 additions & 37 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,48 +1,42 @@
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.platform.jvm.JvmPlatform

plugins {
`java-library`
kotlin("jvm") version "1.7.0"
id("org.jetbrains.dokka") version "1.7.0"
id("org.jlleitschuh.gradle.ktlint") version "10.3.0"
alias(libs.plugins.kotlinJvm)
alias(libs.plugins.dokka)
alias(libs.plugins.detekt)
signing
`maven-publish`

// https://github.com/gradle-nexus/publish-plugin
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
alias(libs.plugins.nexusPublish)
}

repositories {
mavenLocal()
mavenCentral()
}

dependencies {
val awitilityVersion = "4.2.0"
val junitJupiterVersion = "5.8.2"
val mockitoVersion = "4.3.1"
val nettyVersion = "4.1.78.Final"
val slf4jVersion = "1.7.36"
val springVersion = "5.3.21"

api("com.google.code.findbugs:jsr305:3.0.2")
api("io.netty:netty-handler:$nettyVersion")
api("net.sf.j8583:j8583:1.17.0")
api("org.slf4j:slf4j-api:$slf4jVersion")
api(libs.findbugs)
api(libs.netty)
api(libs.j8583)
api(libs.slf4j.api)
api(kotlin("stdlib-jdk8"))
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
testImplementation("net.jcip:jcip-annotations:1.0")
testImplementation("org.apache.commons:commons-lang3:3.12.0")
testImplementation("org.assertj:assertj-core:3.22.0")
testImplementation("org.awaitility:awaitility-kotlin:$awitilityVersion")
testImplementation("org.junit.jupiter:junit-jupiter-params:$junitJupiterVersion")
testImplementation("org.mockito:mockito-junit-jupiter:$mockitoVersion")
testImplementation("org.slf4j:slf4j-simple:$slf4jVersion")
testImplementation("org.springframework:spring-context")
testImplementation("org.springframework:spring-test")

testImplementation(libs.jcip)
testImplementation(libs.commons.lang3)
testImplementation(libs.assertj)
testImplementation(libs.awaitility)
testImplementation(libs.junit.jupiter.params)
testImplementation(libs.mockito)
testImplementation(libs.slf4j.simple)
testImplementation(platform(libs.spring.bom))
testImplementation(libs.spring.context)
testImplementation(libs.spring.test)
testImplementation(kotlin("test-junit5"))
testImplementation(platform("org.springframework:spring-framework-bom:$springVersion"))
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion")
testRuntimeOnly(libs.junit.jupiter.engine)
}

group = "com.github.kpavlov.jreactive8583"
Expand All @@ -54,17 +48,20 @@ version = (
}
)
description = "ISO8583 Connector for Netty"
java.sourceCompatibility = JavaVersion.VERSION_11
java.targetCompatibility = JavaVersion.VERSION_11

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = "11"
apiVersion = "1.7"
freeCompilerArgs = listOf(

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlin {
compilerOptions {
jvmTarget = JvmTarget.JVM_17
progressiveMode = true
freeCompilerArgs.addAll(
"-Xjvm-default=all",
"-Xjsr305=strict",
"-Xexplicit-api=strict"
"-Xexplicit-api=strict",
)
}
}
Expand Down
34 changes: 34 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[versions]
awaitility = "4.2.2"
detekt = "1.23.7"
dokka = "1.9.20"
junitJupiter = "5.11.0"
kotlin = "2.0.20"
mockito = "5.13.0"
netty = "4.1.113.Final"
slf4j = "2.0.16"
spring = "6.1.13"
findbugs = "3.0.2"

[libraries]
findbugs = { group = "com.google.code.findbugs", name = "jsr305", version.ref = "findbugs" }
netty = { group = "io.netty", name = "netty-handler", version.ref = "netty" }
j8583 = { group = "net.sf.j8583", name = "j8583", version = "2.0.0" }
jcip = { group = "net.jcip", name = "jcip-annotations", version = "1.0" }
commons-lang3 = { group = "org.apache.commons", name = "commons-lang3", version = "3.17.0" }
assertj = { group = "org.assertj", name = "assertj-core", version = "3.26.3" }
awaitility = { group = "org.awaitility", name = "awaitility-kotlin", version.ref = "awaitility" }
junit-jupiter-params = { group = "org.junit.jupiter", name = "junit-jupiter-params", version.ref = "junitJupiter" }
mockito = { group = "org.mockito", name = "mockito-junit-jupiter", version.ref = "mockito" }
spring-bom = { group = "org.springframework", name = "spring-framework-bom", version.ref = "spring" }
spring-context = { group = "org.springframework", name = "spring-context" }
spring-test = { group = "org.springframework", name = "spring-test" }
junit-jupiter-engine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", version.ref = "junitJupiter" }
slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }
slf4j-simple = { module = "org.slf4j:slf4j-simple", version.ref = "slf4j" }

[plugins]
kotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
nexusPublish = { id = "io.github.gradle-nexus.publish-plugin", version = "2.0.0" }
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.jar
Git LFS 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.10-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading