Skip to content

Commit

Permalink
Merge pull request #511 from SpineEventEngine/bump-thirdparty-07-05-2024
Browse files Browse the repository at this point in the history
Bump third-party dependencies
  • Loading branch information
armiol committed May 8, 2024
2 parents bb06dc1 + ac28938 commit 3d12433
Show file tree
Hide file tree
Showing 27 changed files with 434 additions and 53 deletions.
19 changes: 12 additions & 7 deletions buildSrc/src/main/kotlin/BuildExtensions.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023, TeamDev. All rights reserved.
* Copyright 2024, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -31,6 +31,7 @@ import io.spine.internal.dependency.GradleDoctor
import io.spine.internal.dependency.Kotest
import io.spine.internal.dependency.Kover
import io.spine.internal.dependency.ProtoData
import io.spine.internal.dependency.ProtoTap
import io.spine.internal.dependency.Protobuf
import io.spine.internal.dependency.Spine
import io.spine.internal.gradle.standardToSpineSdk
Expand Down Expand Up @@ -81,8 +82,9 @@ val PluginDependenciesSpec.mcJava: Spine.McJava
/**
* Shortcut to [ProtoData] dependency object.
*
* This plugin is in Gradle Portal. But when used in pair with [mcJava], it cannot be applied
* directly to a project. It is so, because [mcJava] uses [protoData] as its dependency.
* This plugin is published at Gradle Portal. But when used in a pair with [mcJava],
* it cannot be applied directly to a project.
* It is so, because [mcJava] uses [protoData] as its dependency.
* And buildscript's classpath ends up with both of them.
*/
val PluginDependenciesSpec.protoData: ProtoData
Expand All @@ -95,8 +97,8 @@ val PluginDependenciesSpec.protoData: ProtoData
* declared in auto-generated `org.gradle.kotlin.dsl.PluginAccessors.kt` file.
* It conflicts with our own declarations.
*
* Declaring of top-level shortcuts eliminates need in applying plugins
* using fully-qualified name of dependency objects.
* Declaring of top-level shortcuts eliminates the need in applying plugins
* using fully qualified name of dependency objects.
*
* It is still possible to apply a plugin with a custom version, if needed.
* Just declare a version again on the returned [PluginDependencySpec].
Expand All @@ -117,6 +119,9 @@ val PluginDependenciesSpec.errorprone: PluginDependencySpec
val PluginDependenciesSpec.protobuf: PluginDependencySpec
get() = id(Protobuf.GradlePlugin.id)

val PluginDependenciesSpec.prototap: PluginDependencySpec
get() = id(ProtoTap.gradlePluginId).version(ProtoTap.version)

val PluginDependenciesSpec.`gradle-doctor`: PluginDependencySpec
get() = id(GradleDoctor.pluginId).version(GradleDoctor.version)

Expand All @@ -132,9 +137,9 @@ val PluginDependenciesSpec.kover: PluginDependencySpec
* Configures the dependencies between third-party Gradle tasks
* and those defined via ProtoData and Spine Model Compiler.
*
* It is required in order to avoid warnings in build logs, detecting the undeclared
* It is required to avoid warnings in build logs, detecting the undeclared
* usage of Spine-specific task output by other tasks,
* e.g. the output of `launchProtoData` is used by `compileKotlin`.
* e.g., the output of `launchProtoData` is used by `compileKotlin`.
*/
@Suppress("unused")
fun Project.configureTaskDependencies() {
Expand Down
8 changes: 6 additions & 2 deletions buildSrc/src/main/kotlin/DependencyResolution.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023, TeamDev. All rights reserved.
* Copyright 2024, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -57,7 +57,7 @@ import org.gradle.api.artifacts.ConfigurationContainer
import org.gradle.api.artifacts.ResolutionStrategy

/**
* The function to be used in `buildscript` when a fully-qualified call must be made.
* The function to be used in `buildscript` when a fully qualified call must be made.
*/
@Suppress("unused")
fun doForceVersions(configurations: ConfigurationContainer) {
Expand Down Expand Up @@ -122,6 +122,10 @@ private fun ResolutionStrategy.forceTestDependencies() {
private fun ResolutionStrategy.forceTransitiveDependencies() {
force(
Asm.lib,
Asm.tree,
Asm.analysis,
Asm.util,
Asm.commons,
AutoValue.annotations,
CommonsCli.lib,
CommonsCodec.lib,
Expand Down
10 changes: 9 additions & 1 deletion buildSrc/src/main/kotlin/io/spine/internal/dependency/Asm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ package io.spine.internal.dependency
// https://asm.ow2.io/
@Suppress("unused", "ConstPropertyName")
object Asm {
private const val version = "9.2"
private const val version = "9.6"
const val lib = "org.ow2.asm:asm:$version"

// We use the following artifacts only to force the versions
// of the dependencies which are transitive for us.
//
const val tree = "org.ow2.asm:asm-tree:$version"
const val analysis = "org.ow2.asm:asm-analysis:$version"
const val util = "org.ow2.asm:asm-util:$version"
const val commons = "org.ow2.asm:asm-commons:$version"
}
41 changes: 41 additions & 0 deletions buildSrc/src/main/kotlin/io/spine/internal/dependency/Caffeine.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright 2024, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Redistribution and use in source and/or binary forms, with or without
* modification, must retain the above copyright notice and the following
* disclaimer.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package io.spine.internal.dependency

/**
* A [high performance](https://github.com/ben-manes/caffeine/wiki/Benchmarks),
* [near optimal](https://github.com/ben-manes/caffeine/wiki/Efficiency) caching library.
*
* This library is a transitive dependency for us via ErrorProne.
*
* @see <a href="https://github.com/ben-manes/caffeine">Caffeine at GitHub</a>
*/
@Suppress("unused")
object Caffeine {
private const val version = "3.0.5"
const val lib = "com.github.ben-manes.caffeine:caffeine:$version"
}
37 changes: 37 additions & 0 deletions buildSrc/src/main/kotlin/io/spine/internal/dependency/Jacoco.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright 2023, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Redistribution and use in source and/or binary forms, with or without
* modification, must retain the above copyright notice and the following
* disclaimer.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package io.spine.internal.dependency

/**
* Code coverage library for Java.
*
* @see <a href="https://www.eclemma.org/jacoco/">Releases</a>
*/
@Suppress("ConstPropertyName")
object Jacoco {
const val version = "0.8.12"
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ package io.spine.internal.dependency
// https://github.com/Kotlin/kotlinx-kover
@Suppress("unused", "ConstPropertyName")
object Kover {
const val version = "0.7.4"
const val version = "0.7.6"
const val id = "org.jetbrains.kotlinx.kover"
const val classpath = "org.jetbrains.kotlinx:kover-gradle-plugin:$version"
}
42 changes: 42 additions & 0 deletions buildSrc/src/main/kotlin/io/spine/internal/dependency/Log4j2.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright 2024, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Redistribution and use in source and/or binary forms, with or without
* modification, must retain the above copyright notice and the following
* disclaimer.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package io.spine.internal.dependency

/**
* An open-source logging framework.
*
* Spine uses its own [logging library][Spine.Logging], but also
* provides a backend implementation for [Log4j2]. This is why
* this dependency is needed.
*
* @see <a href="https://github.com/apache/logging-log4j2">Log4j2 releases at GitHub</a>
*/
@Suppress("unused", "ConstPropertyName")
object Log4j2 {
private const val version = "2.20.0"
const val core = "org.apache.logging.log4j:log4j-core:$version"
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ object ProtoData {
* The version of ProtoData dependencies.
*/
val version: String
private const val fallbackVersion = "0.20.7"
private const val fallbackVersion = "0.21.3"

/**
* The distinct version of ProtoData used by other build tools.
Expand All @@ -74,7 +74,7 @@ object ProtoData {
* transitional dependencies, this is the version used to build the project itself.
*/
val dogfoodingVersion: String
private const val fallbackDfVersion = "0.20.7"
private const val fallbackDfVersion = "0.21.3"

/**
* The artifact for the ProtoData Gradle plugin.
Expand Down
46 changes: 46 additions & 0 deletions buildSrc/src/main/kotlin/io/spine/internal/dependency/ProtoTap.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Copyright 2024, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Redistribution and use in source and/or binary forms, with or without
* modification, must retain the above copyright notice and the following
* disclaimer.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package io.spine.internal.dependency

/**
* Dependencies on ProtoTap plugins.
*
* See [`SpineEventEngine/ProtoTap`](https://github.com/SpineEventEngine/ProtoTap/).
*/
@Suppress(
"unused" /* Some subprojects do not use ProtoData directly. */,
"ConstPropertyName" /* We use custom convention for artifact properties. */,
"MemberVisibilityCanBePrivate" /* The properties are used directly by other subprojects. */,
)
object ProtoTap {
const val group = "io.spine.tools"
const val version = "0.8.3"
const val gradlePluginId = "io.spine.prototap"
const val api = "$group:prototap-api:$version"
const val gradlePlugin = "$group:prototap-gradle-plugin:$version"
const val protocPlugin = "$group:prototap-protoc-plugin:$version"
}
17 changes: 14 additions & 3 deletions buildSrc/src/main/kotlin/io/spine/internal/dependency/Protobuf.kt
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,23 @@ package io.spine.internal.dependency
object Protobuf {
private const val group = "com.google.protobuf"
const val version = "3.25.1"

/**
* The Java library with Protobuf data types.
*/
const val javaLib = "${group}:protobuf-java:${version}"

/**
* The Java library containing proto definitions of Google Protobuf types.
*/
@Suppress("unused")
const val protoSrcLib = javaLib

/**
* The Java library containing proto definitions of Google Protobuf.
* All Java and Kotlin libraries we depend on.
*/
const val protoSrcLib = "${group}:protobuf-java:${version}"
val libs = listOf(
protoSrcLib,
javaLib,
"${group}:protobuf-java-util:${version}",
"${group}:protobuf-kotlin:${version}"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ object Spine {
*
* @see <a href="https://github.com/SpineEventEngine/reflect">spine-reflect</a>
*/
const val reflect = "2.0.0-SNAPSHOT.183"
const val reflect = "2.0.0-SNAPSHOT.184"

/**
* The version of [Spine.Logging].
Expand Down Expand Up @@ -89,7 +89,7 @@ object Spine {
*
* @see <a href="https://github.com/SpineEventEngine/mc-java">spine-mc-java</a>
*/
const val mcJava = "2.0.0-SNAPSHOT.205"
const val mcJava = "2.0.0-SNAPSHOT.206"

/**
* The version of [Spine.baseTypes].
Expand Down Expand Up @@ -124,7 +124,7 @@ object Spine {
*
* @see <a href="https://github.com/SpineEventEngine/tool-base">spine-tool-base</a>
*/
const val toolBase = "2.0.0-SNAPSHOT.208"
const val toolBase = "2.0.0-SNAPSHOT.212"

/**
* The version of [Spine.javadocTools].
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright 2024, TeamDev. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Redistribution and use in source and/or binary forms, with or without
* modification, must retain the above copyright notice and the following
* disclaimer.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package io.spine.internal.dependency

// https://github.com/stefanbirkner/system-lambda
@Suppress("unused", "ConstPropertyName")
object SystemLambda {
const val version = "1.2.1"
const val group = "com.github.stefanbirkner"
const val lib = "$group:system-lambda:$version"
}

0 comments on commit 3d12433

Please sign in to comment.