Skip to content

Commit

Permalink
Update and clean-up dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
serpro69 authored Nov 6, 2022
1 parent bf7e17b commit 21e4183
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 21 deletions.
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ __check_defined = \
$(if $(value $1),, \
$(error Undefined $1$(if $2, ($2))))

__java_version_ok := $(shell java -version 2>&1|grep 1.8.0 >/dev/null; printf $$?)

.PHONE: check_java
check_java: ## check current java version (mostly used in other targets)
ifneq ($(__java_version_ok),$(shell echo 0))
$(error "Expected java 1.8")
endif

.PHONY: deploy-docs
deploy-docs: ## deploys documentation with orchid
sed -i 's/^\s\sbaseUrl:\shttp:\/\/localhost:8080/ baseUrl: https:\/\/serpro69.github.io\/kotlin-faker/' ./docs/src/orchid/resources/config.yml
Expand All @@ -42,7 +50,7 @@ _snapshot-major: ## (DEPRECATED) publishes next snapshot with a major version bu
--info

.PHONY: snapshot-minor
snapshot-minor: ## publishes next snapshot with a minor version bump
snapshot-minor: check_java ## publishes next snapshot with a minor version bump
@:$(call check_defined, VERSION, semantic version string - 'X.Y.Z(-rc.\d+)?')

./gradlew clean test integrationTest -Pversion='$(VERSION)-SNAPSHOT'
Expand Down Expand Up @@ -155,7 +163,7 @@ _release-patch: ## (DEPRECATED) publishes next patch release version
git push origin --tags

.PHONY: release
release: ## publishes the next release with a specified VERSION
release: check_java ## publishes the next release with a specified VERSION
@:$(call check_defined, VERSION, semantic version string - 'X.Y.Z(-rc.\d+)?')

./gradlew clean test integrationTest -Pversion=$(VERSION)
Expand Down
25 changes: 16 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ subprojects {
}

apply {
// plugin("org.gradle.kotlin.kotlin-dsl")
plugin("java")
plugin("org.jetbrains.kotlin.jvm")
plugin("com.adarshr.test-logger")
Expand All @@ -49,15 +48,23 @@ subprojects {
implementation(kotlin("reflect"))
implementation("org.slf4j:slf4j-api:2.0.3")
implementation("com.github.mifmif:generex:1.0.2")
testImplementation("io.kotest:kotest-runner-junit5:5.5.1")
testImplementation("io.kotest:kotest-runner-junit5-jvm:5.5.1")
testImplementation("io.kotest:kotest-assertions-core-jvm:5.5.1")
testImplementation("io.kotest:kotest-property-jvm:5.5.1")
testImplementation("io.kotest:kotest-runner-junit5:5.5.4")
testImplementation("io.kotest:kotest-runner-junit5-jvm:5.5.4")
testImplementation("io.kotest:kotest-assertions-core-jvm:5.5.4")
testImplementation("io.kotest:kotest-property-jvm:5.5.4")
testImplementation("io.kotest.extensions:kotest-extensions-allure:1.2.0")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.1")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.1")
testRuntimeOnly("ch.qos.logback:logback-core:1.3.4")
testRuntimeOnly("ch.qos.logback:logback-classic:1.3.4")
testRuntimeOnly("ch.qos.logback:logback-core:1.3.4") {
version {
strictly("1.3.4") // last stable for java 8
}
}
testRuntimeOnly("ch.qos.logback:logback-classic:1.3.4") {
version {
strictly("1.3.4") // last stable for java 8
}
}
testRuntimeOnly("org.codehaus.groovy:groovy:3.0.13")
}

Expand Down Expand Up @@ -159,9 +166,9 @@ subprojects {
autoconfigure = true
// TODO check if fixed in future versions of allure
configuration = "testRuntimeOnly" // defaults to 'testCompile' which is incompatible with gradle 7.x
allureJavaVersion = "2.19.0"
allureJavaVersion = "2.20.0"
useJUnit5 {
version = "2.19.0"
version = "2.20.0"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ repositories {
}

dependencies {
implementation("com.fasterxml.jackson.core:jackson-databind:2.13.4.2")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.13.4")
implementation("com.fasterxml.jackson.core:jackson-databind:2.14.0")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.14.0")
}
2 changes: 1 addition & 1 deletion cli-bot/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ val mainAppClass = "io.github.serpro69.kfaker.app.KFaker"

dependencies {
implementation(project(":core"))
implementation("info.picocli:picocli:4.6.3")
implementation("info.picocli:picocli:4.7.0")
}

application {
Expand Down
11 changes: 4 additions & 7 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ plugins {
}

dependencies {
implementation("com.fasterxml.jackson.core:jackson-databind:2.13.4.2")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.13.4")
implementation("org.yaml:snakeyaml:1.33")
shadow("com.ibm.icu:icu4j:71.1")
implementation("com.fasterxml.jackson.core:jackson-databind:2.14.0")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.14.0")
shadow("com.ibm.icu:icu4j:72.1")
shadow(kotlin("stdlib-jdk8"))
shadow(kotlin("reflect"))
shadow("org.slf4j:slf4j-api:2.0.3")
Expand Down Expand Up @@ -75,14 +74,12 @@ val shadowJar by tasks.getting(ShadowJar::class) {
archiveBaseName.set(rootProject.name)
archiveClassifier.set("")
relocate("com.fasterxml", "faker.com.fasterxml")
relocate("org.yaml", "faker.org.yaml")
exclude("**/locales/*.yml") // jar already contains json files
dependencies {
exclude("module-info.class")
include {
it.name.startsWith(project.group.toString()) ||
it.name.startsWith("com.fasterxml") ||
it.name.startsWith("org.yaml")
it.name.startsWith("com.fasterxml")
}
}
manifest {
Expand Down

0 comments on commit 21e4183

Please sign in to comment.