Skip to content

Commit

Permalink
Bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Lipen committed Oct 24, 2023
1 parent 5ebd28f commit 38ffe7c
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 64 deletions.
4 changes: 1 addition & 3 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ ifdef::env-github[]
:warning-caption: :warning:
endif::[]

[.right]
image::logo.png["kotlin-satlib",64]

image:logo.png["kotlin-satlib",64]
image:https://github.com/Lipen/kotlin-satlib/workflows/ci.yml/badge.svg?branch=master["Build status",link="https://github.com/Lipen/kotlin-satlib/actions"]
image:https://jitpack.io/v/Lipen/kotlin-satlib.svg["JitPack",link="https://jitpack.io/p/Lipen/kotlin-satlib"]
image:https://hitsofcode.com/github/Lipen/kotlin-satlib["Hits-of-Code",link="https://hitsofcode.com/view/github/Lipen/kotlin-satlib"]
Expand Down
23 changes: 3 additions & 20 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,15 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
group = "com.github.Lipen"

plugins {
idea
kotlin("jvm") version Versions.kotlin
with(Plugins.Kotlinter) { id(id) version (version) }
with(Plugins.Jgitver) { id(id) version (version) }
with(Plugins.GradleVersions) { id(id) version (version) }
with(Plugins.Shadow) { id(id) version (version) }
with(Plugins.Jmh) { id(id) version (version) apply false }
`maven-publish`
}

fun Project.configureKotlinConventions() {
apply(plugin = "kotlin")
apply(plugin = Plugins.Kotlinter.id)
apply(plugin = "maven-publish")

repositories {
Expand Down Expand Up @@ -58,12 +54,6 @@ fun Project.configureKotlinConventions() {
}
}

kotlinter {
ignoreFailures = true
experimentalRules = true
disabledRules = arrayOf("import-ordering")
}

java {
withSourcesJar()
withJavadocJar()
Expand All @@ -78,7 +68,7 @@ fun Project.configureKotlinConventions() {
}
}
repositories {
maven(url = "$buildDir/repository")
maven(layout.buildDirectory.dir("repository"))
}
}
}
Expand All @@ -105,17 +95,10 @@ dependencies {
// runtimeOnly(Libs.Log4j.log4j_core)
// runtimeOnly(Libs.Log4j.log4j_slf4j2_impl)

testImplementation(Libs.Klock.klock_jvm)
testImplementation(Libs.Klock.klock)
testImplementation(Libs.Okio.okio)
}

idea {
module {
isDownloadSources = true
isDownloadJavadoc = true
}
}

jgitver {
strategy("MAVEN")
}
Expand All @@ -125,7 +108,7 @@ tasks.shadowJar {
}

tasks.wrapper {
gradleVersion = "8.3"
gradleVersion = "8.4"
distributionType = Wrapper.DistributionType.ALL
}

Expand Down
38 changes: 12 additions & 26 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
@file:Suppress("PublicApiImplicitType", "MemberVisibilityCanBePrivate", "unused")
@file:Suppress("PublicApiImplicitType", "MemberVisibilityCanBePrivate", "unused", "ConstPropertyName")

object Versions {
const val gradle_versions = "0.44.0"
const val jgitver = "0.9.1"
const val jmh = "1.23"
const val jmh_gradle_plugin = "0.5.3"
const val jna = "5.12.1"
const val junit = "5.9.1"
const val klock = "2.4.8"
const val kluent = "1.72"
const val kotlin = "1.7.21"
const val kotlin_logging = "3.0.4"
const val kotlinter = "3.12.0"
const val kotlinx_coroutines = "1.6.4"
const val log4j = "2.19.0"
const val jna = "5.13.0"
const val junit = "5.10.0"
const val klock = "4.0.10"
const val kluent = "1.73"
const val kotlin = "1.9.10"
const val kotlin_logging = "3.0.5"
const val kotlinx_coroutines = "1.7.3"
const val log4j = "2.21.0"
const val multiarray = "0.13.1"
const val okio = "3.2.0"
const val shadow = "7.1.2"
const val okio = "3.6.0"
const val shadow = "8.1.1"
}

object Libs {
Expand All @@ -37,7 +35,7 @@ object Libs {
// https://github.com/korlibs/klock
object Klock {
const val version = Versions.klock
const val klock_jvm = "com.soywiz.korlibs.klock:klock-jvm:$version"
const val klock = "com.soywiz.korlibs.klock:klock:$version"
}

// https://github.com/square/okio
Expand Down Expand Up @@ -85,18 +83,6 @@ object Plugins {
const val id = "fr.brouillard.oss.gradle.jgitver"
}

// https://github.com/ben-manes/gradle-versions-plugin
object GradleVersions {
const val version = Versions.gradle_versions
const val id = "com.github.ben-manes.versions"
}

// https://github.com/JLLeitschuh/ktlint-gradle
object Kotlinter {
const val version = Versions.kotlinter
const val id = "org.jmailen.kotlinter"
}

// https://github.com/johnrengelman/shadow
object Shadow {
const val version = Versions.shadow
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
14 changes: 7 additions & 7 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@ 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
# shellcheck disable=SC2039,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
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -202,11 +202,11 @@ 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
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
4 changes: 2 additions & 2 deletions kotlin-satlib-jni/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies {

jmh {
jmhVersion = Versions.jmh
humanOutputFile = file("$buildDir/reports/jmh/human.txt")
resultsFile = file("$buildDir/reports/jmh/results.json")
humanOutputFile = layout.buildDirectory.file("reports/jmh/human.txt").get().asFile
resultsFile = layout.buildDirectory.file("reports/jmh/results.json").get().asFile
resultFormat = "JSON"
}
2 changes: 1 addition & 1 deletion src/test/kotlin/examples/bf/Common.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import com.github.lipen.satlib.core.IntVarArray
import com.github.lipen.satlib.core.Model
import com.github.lipen.satlib.core.convert
import com.github.lipen.satlib.utils.writeln
import com.soywiz.klock.measureTimeWithResult
import examples.utils.pow
import korlibs.time.measureTimeWithResult
import okio.buffer
import okio.sink
import java.io.File
Expand Down
2 changes: 1 addition & 1 deletion src/test/kotlin/examples/ph/IncrementalPH.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import com.github.lipen.satlib.solver.addClause
import com.github.lipen.satlib.solver.solve
import com.github.lipen.satlib.utils.useWith
import com.github.lipen.satlib.utils.writeln
import com.soywiz.klock.measureTimeWithResult
import korlibs.time.measureTimeWithResult
import examples.utils.secondsSince
import examples.utils.timeNow
import okio.buffer
Expand Down
2 changes: 1 addition & 1 deletion src/test/kotlin/examples/ph/IterativePH.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import com.github.lipen.satlib.op.atMostOne
import com.github.lipen.satlib.solver.Solver
import com.github.lipen.satlib.utils.useWith
import com.github.lipen.satlib.utils.writeln
import com.soywiz.klock.measureTimeWithResult
import korlibs.time.measureTimeWithResult
import examples.utils.secondsSince
import examples.utils.timeNow
import okio.buffer
Expand Down
4 changes: 2 additions & 2 deletions src/test/kotlin/examples/utils/Utils.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package examples.utils

import com.soywiz.klock.PerformanceCounter
import com.soywiz.klock.TimeSpan
import korlibs.time.PerformanceCounter
import korlibs.time.TimeSpan
import kotlin.math.pow

fun timeNow(): TimeSpan = PerformanceCounter.reference
Expand Down

0 comments on commit 38ffe7c

Please sign in to comment.