Skip to content

Commit 8314a80

Browse files
Merge pull request #195 from SpineEventEngine/new-validation-etc
Bump internal and external dependencies
2 parents 706d389 + c5d4306 commit 8314a80

248 files changed

Lines changed: 7211 additions & 3497 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/gradle-wrapper-validation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
validation:
12-
name: Validation
12+
name: Gradle Wrapper Validation
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout latest code

.gitignore

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#
2-
# Copyright 2024, TeamDev. All rights reserved.
2+
# Copyright 2025, TeamDev. All rights reserved.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
66
# You may obtain a copy of the License at
77
#
8-
# http://www.apache.org/licenses/LICENSE-2.0
8+
# https://www.apache.org/licenses/LICENSE-2.0
99
#
1010
# Redistribution and use in source and/or binary forms, with or without
1111
# modification, must retain the above copyright notice and the following
@@ -31,11 +31,14 @@
3131
#
3232
# Therefore, instructions below are superset of instructions required for all the projects.
3333

34-
# jenv version file.
34+
# `jenv` local configuration.
3535
.java-version
3636

37-
# Kotlin internal directory.
38-
buildSrc/.kotlin
37+
# Internal tool directories.
38+
.fleet/
39+
40+
# Kotlin temp directories.
41+
**/.kotlin/
3942

4043
# IntelliJ IDEA modules and interim config files.
4144
*.iml
@@ -54,14 +57,20 @@ buildSrc/.kotlin
5457

5558
# Gradle interim configs
5659
**/.gradle/**
57-
!**/src/**/build/**
60+
61+
# Temp directory for Gradle TestKit runners
62+
**/.gradle-test-kit/**
5863

5964
# Generated source code
6065
**/generated/**
66+
**/*.pb.dart
67+
**/*.pbenum.dart
68+
**/*.pbserver.dart
69+
**/*.pbjson.dart
6170

6271
# Gradle build files
6372
**/build/**
64-
!**/src/**/build/
73+
!**/src/**/build/**
6574

6675
# Build files produced by the IDE
6776
**/out/**
@@ -81,9 +90,6 @@ gradle-app.setting
8190
# Spine internal directory for storing intermediate artifacts
8291
**/.spine/**
8392

84-
# Spine model compiler auto-generated resources
85-
/tools/gradle-plugins/model-compiler/src/main/resources/spine-protoc.gradle
86-
8793
# Login details to Maven repository.
8894
# Each workstation should have developer's login defined in this file.
8995
credentials.tar
@@ -94,7 +100,6 @@ gcs-auth-key.json
94100

95101
# Log files
96102
*.log
97-
tests/_out/**
98103

99104
# Package Files #
100105
*.war
@@ -109,4 +114,7 @@ hs_err_pid*
109114
.packages
110115
pubspec.lock
111116

112-
.gradle-test-kit/
117+
# Ignore the `tmp` directory used for building dependant repositories.
118+
/tmp
119+
120+
old-dot-gradle-test-kit/

.idea/codeStyles/Project.xml

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/dictionaries/common.xml

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle.kts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,11 @@ import io.spine.gradle.RunGradle
3636
import io.spine.gradle.publish.PublishingRepos
3737
import io.spine.gradle.publish.SpinePublishing
3838
import io.spine.gradle.publish.spinePublishing
39+
import io.spine.gradle.repo.standardToSpineSdk
3940
import io.spine.gradle.report.coverage.JacocoConfig
4041
import io.spine.gradle.report.license.LicenseReporter
4142
import io.spine.gradle.report.pom.PomGenerator
42-
import io.spine.gradle.standardToSpineSdk
4343
import java.time.Duration
44-
import org.jetbrains.dokka.gradle.DokkaMultiModuleTask
4544

4645
buildscript {
4746
standardSpineSdkRepositories()
@@ -58,11 +57,6 @@ buildscript {
5857

5958
resolutionStrategy {
6059
force(
61-
io.spine.dependency.lib.Grpc.api,
62-
io.spine.dependency.lib.KotlinX.Coroutines.bom,
63-
io.spine.dependency.lib.KotlinX.Coroutines.core,
64-
io.spine.dependency.lib.KotlinX.Coroutines.jdk8,
65-
6660
io.spine.dependency.local.Base.libForBuildScript,
6761
io.spine.dependency.local.Reflect.lib,
6862
toolBase.lib,
@@ -79,6 +73,7 @@ buildscript {
7973
}
8074
dependencies {
8175
classpath(mcJava.pluginLib)
76+
classpath(enforcedPlatform(io.spine.dependency.kotlinx.Coroutines.bom))
8277
}
8378
}
8479

@@ -208,7 +203,3 @@ tasks.register<RunGradle>("checkPerformance") {
208203
// task("clean", "build")
209204
task("tasks")
210205
}
211-
212-
val dokkaHtmlMultiModule by tasks.getting(DokkaMultiModuleTask::class) {
213-
configureStyle()
214-
}

buildSrc/build.gradle.kts

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ repositories {
5353
* Please keep this value in sync with [io.spine.dependency.lib.Jackson.version].
5454
* It is not a requirement but would be good in terms of consistency.
5555
*/
56-
val jacksonVersion = "2.15.3"
56+
val jacksonVersion = "2.18.3"
5757

5858
/**
5959
* The version of Google Artifact Registry used by `buildSrc`.
@@ -75,15 +75,15 @@ val grGitVersion = "4.1.1"
7575
* This version may change from the [version of Kotlin][io.spine.dependency.lib.Kotlin.version]
7676
* used by the project.
7777
*/
78-
val kotlinVersion = "2.1.20"
78+
val kotlinEmbeddedVersion = "2.1.20"
7979

8080
/**
8181
* The version of Guava used in `buildSrc`.
8282
*
8383
* Always use the same version as the one specified in [io.spine.dependency.lib.Guava].
8484
* Otherwise, when testing Gradle plugins, clashes may occur.
8585
*/
86-
val guavaVersion = "32.1.3-jre"
86+
val guavaVersion = "33.4.8-jre"
8787

8888
/**
8989
* The version of ErrorProne Gradle plugin.
@@ -93,7 +93,7 @@ val guavaVersion = "32.1.3-jre"
9393
* @see <a href="https://github.com/tbroyer/gradle-errorprone-plugin/releases">
9494
* Error Prone Gradle Plugin Releases</a>
9595
*/
96-
val errorPronePluginVersion = "4.1.0"
96+
val errorPronePluginVersion = "4.2.0"
9797

9898
/**
9999
* The version of Protobuf Gradle Plugin.
@@ -113,7 +113,7 @@ val protobufPluginVersion = "0.9.4"
113113
* @see <a href="https://github.com/Kotlin/dokka/releases">
114114
* Dokka Releases</a>
115115
*/
116-
val dokkaVersion = "1.9.20"
116+
val dokkaVersion = "2.0.0"
117117

118118
/**
119119
* The version of Detekt Gradle Plugin.
@@ -130,7 +130,7 @@ val kotestJvmPluginVersion = "0.4.10"
130130
/**
131131
* @see [io.spine.dependency.test.Kover]
132132
*/
133-
val koverVersion = "0.7.2"
133+
val koverVersion = "0.9.1"
134134

135135
/**
136136
* The version of the Shadow Plugin.
@@ -148,9 +148,9 @@ configurations.all {
148148
"com.google.protobuf:protobuf-gradle-plugin:$protobufPluginVersion",
149149

150150
// Force Kotlin lib versions avoiding using those bundled with Gradle.
151-
"org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion",
152-
"org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion",
153-
"org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"
151+
"org.jetbrains.kotlin:kotlin-stdlib:$kotlinEmbeddedVersion",
152+
"org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinEmbeddedVersion",
153+
"org.jetbrains.kotlin:kotlin-reflect:$kotlinEmbeddedVersion"
154154
)
155155
}
156156
}
@@ -167,6 +167,7 @@ kotlin {
167167

168168
dependencies {
169169
api("com.github.jk1:gradle-license-report:$licenseReportVersion")
170+
api(platform("org.jetbrains.kotlin:kotlin-bom:$kotlinEmbeddedVersion"))
170171
dependOnAuthCommon()
171172

172173
listOf(
@@ -175,17 +176,17 @@ dependencies {
175176
"com.github.jk1:gradle-license-report:$licenseReportVersion",
176177
"com.google.guava:guava:$guavaVersion",
177178
"com.google.protobuf:protobuf-gradle-plugin:$protobufPluginVersion",
178-
"gradle.plugin.com.github.johnrengelman:shadow:${shadowVersion}",
179+
"gradle.plugin.com.github.johnrengelman:shadow:$shadowVersion",
179180
"io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$detektVersion",
180181
"io.kotest:kotest-gradle-plugin:$kotestJvmPluginVersion",
181182
// https://github.com/srikanth-lingala/zip4j
182183
"net.lingala.zip4j:zip4j:2.10.0",
183-
"net.ltgt.gradle:gradle-errorprone-plugin:${errorPronePluginVersion}",
184-
"org.ajoberstar.grgit:grgit-core:${grGitVersion}",
185-
"org.jetbrains.dokka:dokka-base:${dokkaVersion}",
184+
"net.ltgt.gradle:gradle-errorprone-plugin:$errorPronePluginVersion",
185+
"org.ajoberstar.grgit:grgit-core:$grGitVersion",
186+
"org.jetbrains.dokka:dokka-base:$dokkaVersion",
186187
"org.jetbrains.dokka:dokka-gradle-plugin:${dokkaVersion}",
187-
"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion",
188-
"org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion",
188+
"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinEmbeddedVersion",
189+
"org.jetbrains.kotlin:kotlin-reflect:$kotlinEmbeddedVersion",
189190
"org.jetbrains.kotlinx:kover-gradle-plugin:$koverVersion"
190191
).forEach {
191192
implementation(it)

buildSrc/src/main/kotlin/BuildExtensions.kt

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,14 @@
2929
import io.spine.dependency.build.ErrorProne
3030
import io.spine.dependency.build.GradleDoctor
3131
import io.spine.dependency.build.Ksp
32+
import io.spine.dependency.build.PluginPublishPlugin
3233
import io.spine.dependency.lib.Protobuf
3334
import io.spine.dependency.local.McJava
3435
import io.spine.dependency.local.ProtoData
3536
import io.spine.dependency.local.ProtoTap
3637
import io.spine.dependency.test.Kotest
3738
import io.spine.dependency.test.Kover
38-
import io.spine.gradle.standardToSpineSdk
39+
import io.spine.gradle.repo.standardToSpineSdk
3940
import org.gradle.api.Project
4041
import org.gradle.api.Task
4142
import org.gradle.api.tasks.JavaExec
@@ -66,7 +67,7 @@ import org.gradle.plugin.use.PluginDependencySpec
6667
private const val ABOUT_DEPENDENCY_EXTENSIONS = ""
6768

6869
/**
69-
* Applies [standard][standardToSpineSdk] repositories to this `buildscript`.
70+
* Applies [standard][io.spine.gradle.repo.standardToSpineSdk] repositories to this `buildscript`.
7071
*/
7172
fun ScriptHandlerScope.standardSpineSdkRepositories() {
7273
repositories.standardToSpineSdk()
@@ -99,7 +100,7 @@ val ScriptHandlerScope.protoData: ProtoData
99100
* This plugin is published at Gradle Plugin Portal.
100101
* But when used in a pair with [mcJava], it cannot be applied directly to a project.
101102
* It is so, because [mcJava] uses [protoData] as its dependency.
102-
* And buildscript's classpath ends up with both of them.
103+
* And the buildscript's classpath ends up with both of them.
103104
*/
104105
val PluginDependenciesSpec.protoData: ProtoData
105106
get() = ProtoData
@@ -111,8 +112,8 @@ val PluginDependenciesSpec.protoData: ProtoData
111112
* declared in auto-generated `org.gradle.kotlin.dsl.PluginAccessors.kt` file.
112113
* It conflicts with our own declarations.
113114
*
114-
* Declaring of top-level shortcuts eliminates the need in applying plugins
115-
* using fully qualified name of dependency objects.
115+
* Declaring of top-level shortcuts eliminates the need to apply plugins
116+
* using a fully qualified name of dependency objects.
116117
*
117118
* It is still possible to apply a plugin with a custom version, if needed.
118119
* Just declare a version again on the returned [PluginDependencySpec].
@@ -150,6 +151,9 @@ val PluginDependenciesSpec.kover: PluginDependencySpec
150151
val PluginDependenciesSpec.ksp: PluginDependencySpec
151152
get() = id(Ksp.id).version(Ksp.version)
152153

154+
val PluginDependenciesSpec.`plugin-publish`: PluginDependencySpec
155+
get() = id(PluginPublishPlugin.id).version(PluginPublishPlugin.version)
156+
153157
/**
154158
* Configures the dependencies between third-party Gradle tasks
155159
* and those defined via ProtoData and Spine Model Compiler.
@@ -185,7 +189,10 @@ fun Project.configureTaskDependencies() {
185189
val generateProto = "generateProto"
186190
val createVersionFile = "createVersionFile"
187191
val compileKotlin = "compileKotlin"
188-
compileKotlin.dependOn(launchProtoData)
192+
compileKotlin.run {
193+
dependOn(generateProto)
194+
dependOn(launchProtoData)
195+
}
189196
val compileTestKotlin = "compileTestKotlin"
190197
compileTestKotlin.dependOn(launchTestProtoData)
191198
val sourcesJar = "sourcesJar"
@@ -223,7 +230,29 @@ fun Project.configureTaskDependencies() {
223230
* By convention, such modules are for integration tests and should be treated differently.
224231
*/
225232
val Project.productionModules: Iterable<Project>
226-
get() = rootProject.subprojects.filter { !it.name.contains("-tests") }
233+
get() = rootProject.subprojects.filterNot { subproject ->
234+
subproject.name.run {
235+
contains("-tests")
236+
|| contains("test-fixtures")
237+
|| contains("integration-tests")
238+
}
239+
}
240+
241+
/**
242+
* Obtains the names of the [productionModules].
243+
*
244+
* The extension could be useful for excluding modules from standard publishing:
245+
* ```kotlin
246+
* spinePublishing {
247+
* val customModule = "my-custom-module"
248+
* modules = productionModuleNames.toSet().minus(customModule)
249+
* modulesWithCustomPublishing = setOf(customModule)
250+
* //...
251+
* }
252+
* ```
253+
*/
254+
val Project.productionModuleNames: List<String>
255+
get() = productionModules.map { it.name }
227256

228257
/**
229258
* Sets the remote debug option for this [JavaExec] task.

buildSrc/src/main/kotlin/BuildSettings.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
3535
object BuildSettings {
3636
private const val JVM_VERSION = 17
3737
val javaVersion: JavaLanguageVersion = JavaLanguageVersion.of(JVM_VERSION)
38+
@Suppress("unused")
3839
val javaVersionCompat = JavaVersion.toVersion(JVM_VERSION)
3940
val jvmTarget = JvmTarget.JVM_17
4041
const val REMOTE_DEBUG_PORT = 5566

0 commit comments

Comments
 (0)