diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 427eb8e..7f174ff 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -13,23 +13,23 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
submodules: 'true'
- - uses: actions/setup-java@v3
+ - uses: actions/setup-java@v4
with:
- java-version: 11
+ java-version: 17
distribution: zulu
- name: Substitute Gradle settings file
shell: bash
run: ./substitute-settings.py
env:
- MC_JAVA_VERSION: "2.0.0-SNAPSHOT.151"
- CORE_VERSION: "2.0.0-SNAPSHOT.141"
- PROTO_DATA_VERSION: "0.8.5"
- VALIDATION_VERSION: "2.0.0-SNAPSHOT.81"
+ MC_JAVA_VERSION: "2.0.0-SNAPSHOT.266"
+ CORE_VERSION: "2.0.0-SNAPSHOT.201"
+ PROTO_DATA_VERSION: "0.92.11"
+ VALIDATION_VERSION: "2.0.0-SNAPSHOT.301"
- name: Build project
shell: bash
diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml
index 47e2938..6e6a95c 100644
--- a/.github/workflows/gradle-wrapper-validation.yml
+++ b/.github/workflows/gradle-wrapper-validation.yml
@@ -9,11 +9,11 @@ on:
jobs:
validation:
- name: Validation
+ name: Validate Gradle Wrapper
runs-on: ubuntu-latest
steps:
- name: Checkout latest code
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- - name: Validate Gradle Wrapper
- uses: gradle/wrapper-validation-action@v1
+ - name: Gradle Wrapper Validation
+ uses: gradle/actions/wrapper-validation@v4
diff --git a/.gitignore b/.gitignore
index 68bbc5c..0f798d6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,11 +1,11 @@
#
-# Copyright 2023, TeamDev. All rights reserved.
+# Copyright 2025, 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
+# https://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
@@ -31,6 +31,10 @@
#
# Therefore, instructions below are superset of instructions required for all the projects.
+.java-version
+
+buildSrc/.kotlin/
+
# IntelliJ IDEA modules and interim config files.
*.iml
.idea/*.xml
@@ -55,6 +59,7 @@
# Gradle build files
**/build/**
+!**/src/**/build/**
# Build files produced by the IDE
**/out/**
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
index 8dba535..809943c 100644
--- a/.idea/codeStyles/Project.xml
+++ b/.idea/codeStyles/Project.xml
@@ -84,9 +84,6 @@
-
-
-
@@ -103,4 +100,4 @@
-
\ No newline at end of file
+
diff --git a/.idea/copyright/TeamDev_Open_Source.xml b/.idea/copyright/TeamDev_Open_Source.xml
index 14d7385..cea7fed 100644
--- a/.idea/copyright/TeamDev_Open_Source.xml
+++ b/.idea/copyright/TeamDev_Open_Source.xml
@@ -1,6 +1,6 @@
-
+
diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml
index 69417f0..0b8f9a1 100644
--- a/.idea/copyright/profiles_settings.xml
+++ b/.idea/copyright/profiles_settings.xml
@@ -1,3 +1,7 @@
-
-
\ No newline at end of file
+
+
+
+
+
+
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
index 35bbdff..b091734 100644
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -146,13 +146,11 @@
-
-
@@ -194,7 +192,6 @@
-
@@ -578,7 +575,6 @@
-
@@ -623,6 +619,9 @@
+
+
+
@@ -690,7 +689,6 @@
-
@@ -711,7 +709,6 @@
-
@@ -750,13 +747,10 @@
-
-
-
@@ -790,7 +784,6 @@
-
@@ -811,7 +804,6 @@
-
diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml
index 838b643..dd947c3 100644
--- a/.idea/kotlinc.xml
+++ b/.idea/kotlinc.xml
@@ -4,10 +4,10 @@
-
-
+
+
-
+
-
\ No newline at end of file
+
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3d4c148..8665e87 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,13 +1,14 @@
-
+
+
@@ -39,7 +40,7 @@
-
+
\ No newline at end of file
diff --git a/.lift.toml b/.lift.toml
deleted file mode 100644
index 178be58..0000000
--- a/.lift.toml
+++ /dev/null
@@ -1 +0,0 @@
-ignoreRules=["SpreadOperator"]
diff --git a/README.md b/README.md
index 894fb99..31a0304 100644
--- a/README.md
+++ b/README.md
@@ -3,11 +3,11 @@
This repository contains a set of Protobuf model definitions.
Unlike many other [Spine examples](https://github.com/spine-examples), this repo does not contain
-Java or any other implementations. Instead, it focuses on the model definitions, providing
-a sizable amount of various Proto definitions.
+Java or any other implementations. Instead, it focuses on the model definitions,
+providing a sizable number of various Proto definitions.
-Using the definitions in this repo, we can test speed of our build tools, comparing it to
-the past performance.
+Using the definitions in this repo, we can test the speed of our build tools,
+comparing it to the past performance.
The repo contains 1152 message declarations and 32 enum declarations in 192 `.proto` files.
This includes command, event, rejection, entity, ID, and value object types.
@@ -21,8 +21,8 @@ To use this repo locally for one-time tests, follow these steps.
1. Add the repo as a Git submodule to your project.
2. Copy the `settings.gradle.kts.template` file as `settings.gradle.kts`.
Replace all the placeholder versions with the required versions. Or, alternatively,
- add a `dependencySubstitution` block and define which local projects should be used for which
- dependencies.
+ add a `dependencySubstitution` block and define which local projects should be used
+ for which dependencies.
3. Build the project with the `build` task.
## Using with Gradle
@@ -30,38 +30,42 @@ To use this repo locally for one-time tests, follow these steps.
To launch the build speed tests with Gradle, follow these steps.
1. Add the repo as a Git submodule to your project.
+
2. Create a Gradle task which would call the `substitute-settings.py` script, setting the versions
to the versions from the local environment:
-```kotlin
-val prepareBuildSpeedSettings by tasks.registering(Exec::class) {
- environment(
- "MC_JAVA_VERSION" to Spine.McJava.version,
- "CORE_VERSION" to Spine.ArtifactVersion.core,
- "PROTO_DATA_VERSION" to ProtoData.version,
- "VALIDATION_VERSION" to Validation.version
- )
- workingDir = File(rootDir, "BuildSpeed")
- commandLine("./substitute-settings.py")
-}
-```
+
+ ```kotlin
+ val prepareBuildSpeedSettings by tasks.registering(Exec::class) {
+ environment(
+ "MC_JAVA_VERSION" to Spine.McJava.version,
+ "CORE_VERSION" to Spine.ArtifactVersion.core,
+ "PROTO_DATA_VERSION" to ProtoData.version,
+ "VALIDATION_VERSION" to Validation.version
+ )
+ workingDir = File(rootDir, "BuildSpeed")
+ commandLine("./substitute-settings.py")
+ }
+ ```
This script creates/overrides the `settings.gradle.kts` file with the relevant
Spine dependency versions.
+
3. Create a task calls the `build` task on this project:
-```kotlin
-tasks.register("checkSpeed") {
- directory = "$rootDir/BuildSpeed"
-
- dependsOn(prepareBuildSpeedSettings, localPublish)
- shouldRunAfter(check)
-}
-```
-4. Launch the `checkSpeed` task. It's not recommended to include this task into the build
+
+ ```kotlin
+ tasks.register("checkSpeed") {
+ directory = "$rootDir/BuildSpeed"
+
+ dependsOn(prepareBuildSpeedSettings, localPublish)
+ shouldRunAfter(check)
+ }
+ ```
+4. Launch the `checkSpeed` task. It's not recommended to include this task in the build
by default due to the long execution time. Instead, run it manually when needed and/or launch
it on CI.
## Extra Gradle configuration
-If the speed tests require additional configuration, e.g. configuring the tested plugins,
+If the speed tests require additional configuration, e.g., configuring the tested plugins,
add a file called `build-speed.gradle.kts` to the root of the project. This script plugin
will be applied to the `BuildSpeed` project.
@@ -72,5 +76,5 @@ info about the past builds, the speed of the task execution, the versions of Spi
the username (for specifying the machine which ran the build).
The journal file should be kept in the Git repository. If this repo is included as a submodule into
-another repo and needs updating, the journal file should be preserved in its local form, so that
+another repo and needs updating, the journal file should be preserved in its local form so that
less relevant build history doesn't overwrite the local build history.
diff --git a/build.gradle.kts b/build.gradle.kts
index 290ffc6..d2639d2 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,10 +24,14 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import io.spine.internal.dependency.Spine
-import io.spine.internal.gradle.UpdateJournal
-import io.spine.internal.gradle.base.build
-import io.spine.internal.gradle.standardToSpineSdk
+import io.spine.dependency.local.McJava
+import io.spine.dependency.local.ProtoData
+import io.spine.dependency.local.CoreJava
+import io.spine.dependency.local.Validation
+import io.spine.gradle.UpdateJournal
+import io.spine.gradle.base.build
+import io.spine.gradle.standardToSpineSdk
+import java.util.function.Supplier
plugins {
java
@@ -40,33 +44,34 @@ buildscript {
standardSpineSdkRepositories()
dependencies {
- classpath(variantOf(spine.mcJava) { classifier("all") })
+ classpath(mcJava.pluginLib(mcJava.version))
}
configurations.all {
resolutionStrategy.force(
- spine.protoData.plugin,
- spine.protoData.compiler,
- spine.protoData.codegenJava,
- spine.validation.codegenJava,
+ protoData.pluginLib,
+ protoData.backend,
+ protoData.java,
+ validation.java,
+ validation.javaBundle,
)
}
}
repositories.standardToSpineSdk()
-apply(plugin = Spine.McJava.pluginId)
+apply(plugin = McJava.pluginId)
dependencies {
- implementation(spine.server)
+ implementation(CoreJava.server)
}
configurations.all {
resolutionStrategy.force(
- spine.protoData.compiler,
- spine.protoData.codegenJava,
- spine.validation.codegenJava,
- spine.validation.runtimeJava,
+ ProtoData.backend,
+ ProtoData.java,
+ Validation.java,
+ Validation.runtime,
)
}
@@ -102,13 +107,13 @@ afterEvaluate {
}
val recordExecTime by tasks.registering(UpdateJournal::class) {
- startTime = startTimeMillis
- versions.putAll(
+ startTime = Supplier { startTimeMillis!! }
+ versions.set(
mapOf(
- "core" to spine.versions.core,
- "ProtoData" to spine.versions.protoData,
- "Validation" to spine.versions.validation,
- "mc-java" to spine.versions.mcJava
+ "core" to CoreJava.version,
+ "ProtoData" to ProtoData.version,
+ "Validation" to Validation.version,
+ "mc-java" to McJava.version
)
)
}
diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts
index 8067a5f..cbcb32d 100644
--- a/buildSrc/build.gradle.kts
+++ b/buildSrc/build.gradle.kts
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,6 +24,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import org.jetbrains.kotlin.gradle.dsl.JvmTarget
+
/**
* This script uses two declarations of the constant [licenseReportVersion] because
* currently there is no way to define a constant _before_ a build script of `buildSrc`.
@@ -34,8 +36,9 @@ plugins {
java
groovy
`kotlin-dsl`
- val licenseReportVersion = "2.1"
- id("com.github.jk1.dependency-license-report").version(licenseReportVersion)
+
+ // https://github.com/jk1/Gradle-License-Report/releases
+ id("com.github.jk1.dependency-license-report").version("2.7")
}
repositories {
@@ -47,81 +50,101 @@ repositories {
/**
* The version of Jackson used by `buildSrc`.
*
- * Please keep this value in sync. with `io.spine.internal.dependency.Jackson.version`.
- * It's not a requirement, but would be good in terms of consistency.
+ * Please keep this value in sync with [io.spine.dependency.lib.Jackson.version].
+ * It is not a requirement but would be good in terms of consistency.
+ */
+val jacksonVersion = "2.15.3"
+
+/**
+ * The version of Google Artifact Registry used by `buildSrc`.
+ *
+ * The version `2.1.5` is the latest before `2.2.0`, which introduces breaking changes.
+ *
+ * @see
+ * Google Artifact Registry at Maven
*/
-val jacksonVersion = "2.13.4"
+val googleAuthToolVersion = "2.1.5"
+
+val licenseReportVersion = "2.7"
-val googleAuthToolVersion = "2.1.2"
-val licenseReportVersion = "2.1"
val grGitVersion = "4.1.1"
/**
- * The version of the Kotlin Gradle plugin.
+ * The version of the Kotlin Gradle plugin used by the build process.
*
- * Please check that this value matches one defined in
- * [io.spine.internal.dependency.Kotlin.version].
+ * This version may change from the [version of Kotlin][io.spine.dependency.lib.Kotlin.version]
+ * used by the project.
*/
-val kotlinVersion = "1.8.10"
+val kotlinVersion = "2.1.10"
/**
* The version of Guava used in `buildSrc`.
*
- * Always use the same version as the one specified in [io.spine.internal.dependency.Guava].
+ * Always use the same version as the one specified in [io.spine.dependency.lib.Guava].
* Otherwise, when testing Gradle plugins, clashes may occur.
*/
-val guavaVersion = "31.1-jre"
+val guavaVersion = "32.1.3-jre"
/**
* The version of ErrorProne Gradle plugin.
*
- * Please keep in sync. with [io.spine.internal.dependency.ErrorProne.GradlePlugin.version].
+ * Please keep in sync. with [io.spine.dependency.build.ErrorProne.GradlePlugin.version].
*
* @see
* Error Prone Gradle Plugin Releases
*/
-val errorPronePluginVersion = "3.0.1"
+val errorPronePluginVersion = "4.1.0"
/**
* The version of Protobuf Gradle Plugin.
*
- * Please keep in sync. with [io.spine.internal.dependency.Protobuf.GradlePlugin.version].
+ * Please keep in sync. with [io.spine.dependency.lib.Protobuf.GradlePlugin.version].
*
* @see
* Protobuf Gradle Plugins Releases
*/
-val protobufPluginVersion = "0.9.2"
+val protobufPluginVersion = "0.9.4"
/**
* The version of Dokka Gradle Plugins.
*
- * Please keep in sync with [io.spine.internal.dependency.Dokka.version].
+ * Please keep in sync with [io.spine.dependency.build.Dokka.version].
*
* @see
* Dokka Releases
*/
-val dokkaVersion = "1.8.10"
+val dokkaVersion = "1.9.20"
/**
* The version of Detekt Gradle Plugin.
*
* @see Detekt Releases
*/
-val detektVersion = "1.22.0"
+val detektVersion = "1.23.8"
/**
- * @see [io.spine.internal.dependency.Kotest]
+ * @see [io.spine.dependency.test.Kotest]
*/
val kotestJvmPluginVersion = "0.4.10"
/**
- * @see [io.spine.internal.dependency.Kover]
+ * @see [io.spine.dependency.test.Kover]
*/
-val koverVersion = "0.7.0-Beta"
+val koverVersion = "0.7.2"
+
+/**
+ * The version of the Shadow Plugin.
+ *
+ * `7.1.2` is the last version compatible with Gradle 7.x. Newer versions require Gradle v8.x.
+ *
+ * @see Shadow Plugin releases
+ */
+val shadowVersion = "7.1.2"
configurations.all {
resolutionStrategy {
force(
+ "com.google.guava:guava:${guavaVersion}",
"com.google.protobuf:protobuf-gradle-plugin:$protobufPluginVersion",
// Force Kotlin lib versions avoiding using those bundled with Gradle.
@@ -132,41 +155,85 @@ configurations.all {
}
}
-val jvmVersion = JavaLanguageVersion.of(11)
-
java {
- toolchain.languageVersion.set(jvmVersion)
+ toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
-tasks.withType {
- kotlinOptions {
- jvmTarget = jvmVersion.toString()
+kotlin {
+ compilerOptions {
+ jvmTarget.set(JvmTarget.JVM_17)
}
}
dependencies {
- implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
- implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jacksonVersion")
- implementation("com.google.cloud.artifactregistry:artifactregistry-auth-common:$googleAuthToolVersion") {
- exclude(group = "com.google.guava")
- }
- implementation("com.google.guava:guava:$guavaVersion")
api("com.github.jk1:gradle-license-report:$licenseReportVersion")
- implementation("org.ajoberstar.grgit:grgit-core:${grGitVersion}")
- implementation("net.ltgt.gradle:gradle-errorprone-plugin:${errorPronePluginVersion}")
-
- // Add explicit dependency to avoid warning on different Kotlin runtime versions.
- implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
- implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
+ dependOnAuthCommon()
+
+ listOf(
+ "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion",
+ "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jacksonVersion",
+ "com.github.jk1:gradle-license-report:$licenseReportVersion",
+ "com.google.guava:guava:$guavaVersion",
+ "com.google.protobuf:protobuf-gradle-plugin:$protobufPluginVersion",
+ "gradle.plugin.com.github.johnrengelman:shadow:${shadowVersion}",
+ "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$detektVersion",
+ "io.kotest:kotest-gradle-plugin:$kotestJvmPluginVersion",
+ // https://github.com/srikanth-lingala/zip4j
+ "net.lingala.zip4j:zip4j:2.10.0",
+ "net.ltgt.gradle:gradle-errorprone-plugin:${errorPronePluginVersion}",
+ "org.ajoberstar.grgit:grgit-core:${grGitVersion}",
+ "org.jetbrains.dokka:dokka-base:${dokkaVersion}",
+ "org.jetbrains.dokka:dokka-gradle-plugin:${dokkaVersion}",
+ "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion",
+ "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion",
+ "org.jetbrains.kotlinx:kover-gradle-plugin:$koverVersion"
+ ).forEach {
+ implementation(it)
+ }
+}
- implementation("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$detektVersion")
- implementation("com.google.protobuf:protobuf-gradle-plugin:$protobufPluginVersion")
- implementation("org.jetbrains.dokka:dokka-gradle-plugin:${dokkaVersion}")
- implementation("org.jetbrains.dokka:dokka-base:${dokkaVersion}")
+dependOnBuildSrcJar()
- // https://github.com/srikanth-lingala/zip4j
- implementation("net.lingala.zip4j:zip4j:2.10.0")
+/**
+ * Adds a dependency on a `buildSrc.jar`, iff:
+ * 1) the `src` folder is missing, and
+ * 2) `buildSrc.jar` is present in `buildSrc/` folder instead.
+ *
+ * This approach is used in the scope of integration testing.
+ */
+fun Project.dependOnBuildSrcJar() {
+ val srcFolder = this.rootDir.resolve("src")
+ val buildSrcJar = rootDir.resolve("buildSrc.jar")
+ if (!srcFolder.exists() && buildSrcJar.exists()) {
+ logger.info("Adding the pre-compiled 'buildSrc.jar' to 'implementation' dependencies.")
+ dependencies {
+ implementation(files("buildSrc.jar"))
+ }
+ }
+}
- implementation("io.kotest:kotest-gradle-plugin:$kotestJvmPluginVersion")
- implementation("org.jetbrains.kotlinx:kover-gradle-plugin:$koverVersion")
+/**
+ * Includes the `implementation` dependency on `artifactregistry-auth-common`,
+ * with the version defined in [googleAuthToolVersion].
+ *
+ * `artifactregistry-auth-common` has transitive dependency on Gson and Apache `commons-codec`.
+ * Gson from version `2.8.6` until `2.8.9` is vulnerable to Deserialization of Untrusted Data
+ * (https://devhub.checkmarx.com/cve-details/CVE-2022-25647/).
+ *
+ * Apache `commons-codec` before 1.13 is vulnerable to information exposure
+ * (https://devhub.checkmarx.com/cve-details/Cxeb68d52e-5509/).
+ *
+ * We use Gson `2.10.1` and we force it in `forceProductionDependencies()`.
+ * We use `commons-code` with version `1.16.0`, forcing it in `forceProductionDependencies()`.
+ *
+ * So, we should be safe with the current version `artifactregistry-auth-common` until
+ * we migrate to a later version.
+ */
+fun DependencyHandlerScope.dependOnAuthCommon() {
+ @Suppress("VulnerableLibrariesLocal", "RedundantSuppression")
+ implementation(
+ "com.google.cloud.artifactregistry:artifactregistry-auth-common:$googleAuthToolVersion"
+ ) {
+ exclude(group = "com.google.guava")
+ }
}
diff --git a/buildSrc/src/main/kotlin/BuildExtensions.kt b/buildSrc/src/main/kotlin/BuildExtensions.kt
index 9e51bca..1c1b774 100644
--- a/buildSrc/src/main/kotlin/BuildExtensions.kt
+++ b/buildSrc/src/main/kotlin/BuildExtensions.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -26,27 +26,24 @@
@file:Suppress("UnusedReceiverParameter", "unused", "TopLevelPropertyNaming", "ObjectPropertyName")
-import io.spine.internal.dependency.ErrorProne
-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.Protobuf
-import io.spine.internal.dependency.Spine
-import io.spine.internal.gradle.standardToSpineSdk
+import io.spine.dependency.build.ErrorProne
+import io.spine.dependency.build.GradleDoctor
+import io.spine.dependency.build.Ksp
+import io.spine.dependency.lib.Protobuf
+import io.spine.dependency.local.McJava
+import io.spine.dependency.local.Validation
+import io.spine.dependency.local.ProtoData
+import io.spine.dependency.local.ProtoTap
+import io.spine.dependency.test.Kotest
+import io.spine.dependency.test.Kover
+import io.spine.gradle.standardToSpineSdk
import org.gradle.api.Project
import org.gradle.api.Task
+import org.gradle.api.tasks.JavaExec
import org.gradle.kotlin.dsl.ScriptHandlerScope
import org.gradle.plugin.use.PluginDependenciesSpec
import org.gradle.plugin.use.PluginDependencySpec
-/**
- * Applies [standard][standardToSpineSdk] repositories to this `buildscript`.
- */
-fun ScriptHandlerScope.standardSpineSdkRepositories() {
- repositories.standardToSpineSdk()
-}
-
/**
* Provides shortcuts to reference our dependency objects.
*
@@ -61,29 +58,58 @@ fun ScriptHandlerScope.standardSpineSdkRepositories() {
* get() = id(GradleDoctor.pluginId).version(GradleDoctor.version)
* ```
*
- * But for some plugins, it's impossible to apply them directly to a project.
+ * But for some plugins, it is impossible to apply them directly to a project.
* For example, when a plugin is not published to Gradle Portal, it can only be
- * applied with buildscript's classpath. Thus, it's needed to leave some freedom
+ * applied with the buildscript's classpath. Thus, it is necessary to leave some freedom
* upon how to apply them. In such cases, just a shortcut to a dependency object
- * can be declared, without applying of the plugin in-place.
+ * can be declared without applying the plugin in-place.
*/
private const val ABOUT_DEPENDENCY_EXTENSIONS = ""
/**
- * Shortcut to [Spine.McJava] dependency object.
+ * Applies [standard][standardToSpineSdk] repositories to this `buildscript`.
+ */
+fun ScriptHandlerScope.standardSpineSdkRepositories() {
+ repositories.standardToSpineSdk()
+}
+
+/**
+ * Shortcut to [McJava] dependency object for using under `buildScript`.
*
* This plugin is not published to Gradle Portal and cannot be applied directly to a project.
* Firstly, it should be put to buildscript's classpath and then applied by ID only.
*/
-val PluginDependenciesSpec.mcJava: Spine.McJava
- get() = Spine.McJava
+val ScriptHandlerScope.mcJava: McJava
+ get() = McJava
+
+/**
+ * Shortcut to [Validation] dependency object for using under `buildScript`.
+ */
+val ScriptHandlerScope.validation: Validation
+ get() = Validation
+
+/**
+ * Shortcut to [McJava] dependency object.
+ *
+ * This plugin is not published to Gradle Portal and cannot be applied directly to a project.
+ * Firstly, it should be put to buildscript's classpath and then applied by ID only.
+ */
+val PluginDependenciesSpec.mcJava: McJava
+ get() = McJava
+
+/**
+ * Shortcut to [ProtoData] dependency object for using under `buildscript`.
+ */
+val ScriptHandlerScope.protoData: ProtoData
+ get() = ProtoData
/**
* 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.
- * And buildscript's classpath ends up with both of them.
+ * This plugin is published at Gradle Plugin 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 the buildscript's classpath ends up with both of them.
*/
val PluginDependenciesSpec.protoData: ProtoData
get() = ProtoData
@@ -95,8 +121,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].
@@ -117,6 +143,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)
@@ -128,13 +157,16 @@ val PluginDependenciesSpec.kotest: PluginDependencySpec
val PluginDependenciesSpec.kover: PluginDependencySpec
get() = id(Kover.id).version(Kover.version)
+val PluginDependenciesSpec.ksp: PluginDependencySpec
+ get() = id(Ksp.id).version(Ksp.version)
+
/**
* 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() {
@@ -162,17 +194,82 @@ fun Project.configureTaskDependencies() {
val launchTestProtoData = "launchTestProtoData"
val generateProto = "generateProto"
val createVersionFile = "createVersionFile"
- "compileKotlin".dependOn(launchProtoData)
- "compileTestKotlin".dependOn(launchTestProtoData)
+ val compileKotlin = "compileKotlin"
+ compileKotlin.dependOn(launchProtoData)
+ val compileTestKotlin = "compileTestKotlin"
+ compileTestKotlin.dependOn(launchTestProtoData)
val sourcesJar = "sourcesJar"
- sourcesJar.dependOn(generateProto)
- sourcesJar.dependOn(launchProtoData)
- sourcesJar.dependOn(createVersionFile)
- sourcesJar.dependOn("prepareProtocConfigVersions")
+ val kspKotlin = "kspKotlin"
+ sourcesJar.run {
+ dependOn(generateProto)
+ dependOn(launchProtoData)
+ dependOn(kspKotlin)
+ dependOn(createVersionFile)
+ dependOn("prepareProtocConfigVersions")
+ }
val dokkaHtml = "dokkaHtml"
- dokkaHtml.dependOn(generateProto)
- dokkaHtml.dependOn(launchProtoData)
- "dokkaJavadoc".dependOn(launchProtoData)
+ dokkaHtml.run {
+ dependOn(generateProto)
+ dependOn(launchProtoData)
+ dependOn(kspKotlin)
+ }
+ val dokkaJavadoc = "dokkaJavadoc"
+ dokkaJavadoc.run {
+ dependOn(launchProtoData)
+ dependOn(kspKotlin)
+ }
"publishPluginJar".dependOn(createVersionFile)
+ compileKotlin.dependOn(kspKotlin)
+ compileTestKotlin.dependOn("kspTestKotlin")
+ "compileTestFixturesKotlin".dependOn("kspTestFixturesKotlin")
+ "dokkaKotlinJar".dependOn(dokkaJavadoc)
+ "javadocJar".dependOn(dokkaHtml)
+ }
+}
+
+/**
+ * Obtains all modules names of which do not have `"-tests"` as the suffix.
+ *
+ * By convention, such modules are for integration tests and should be treated differently.
+ */
+val Project.productionModules: Iterable
+ get() = rootProject.subprojects.filter { !it.name.contains("-tests") }
+
+
+/**
+ * Sets the remote debug option for this task.
+ *
+ * The port number is [5566][BuildSettings.REMOTE_DEBUG_PORT].
+ *
+ * @param enabled If `true` the task will be suspended.
+ */
+fun Task.remoteDebug(enabled: Boolean = true) { this as JavaExec
+ debugOptions {
+ this@debugOptions.enabled.set(enabled)
+ port.set(BuildSettings.REMOTE_DEBUG_PORT)
+ server.set(true)
+ suspend.set(true)
}
}
+
+/**
+ * Sets remote debug options for the `launchProtoData` task.
+ *
+ * @param enabled if `true` the task will be suspended.
+ *
+ * @see remoteDebug
+ */
+fun Project.protoDataRemoteDebug(enabled: Boolean = true) {
+ tasks.findByName("launchProtoData")?.remoteDebug(enabled)
+}
+
+/**
+ * Sets remote debug options for the `launchTestProtoData` task.
+ *
+ * @param enabled if `true` the task will be suspended.
+ *
+ * @see remoteDebug
+ */
+fun Project.testProtoDataRemoteDebug(enabled: Boolean = true) {
+ tasks.findByName("launchTestProtoData")?.remoteDebug(enabled)
+}
diff --git a/buildSrc/src/main/kotlin/BuildSettings.kt b/buildSrc/src/main/kotlin/BuildSettings.kt
index 1adbb92..562eb83 100644
--- a/buildSrc/src/main/kotlin/BuildSettings.kt
+++ b/buildSrc/src/main/kotlin/BuildSettings.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,13 +24,18 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import org.gradle.api.JavaVersion
import org.gradle.jvm.toolchain.JavaLanguageVersion
+import org.jetbrains.kotlin.gradle.dsl.JvmTarget
/**
- * This object provides high-level constants, like version of JVM, to be used
+ * This object provides high-level constants, like the version of JVM, to be used
* throughout the project.
*/
object BuildSettings {
- private const val JVM_VERSION = 11
+ private const val JVM_VERSION = 17
val javaVersion: JavaLanguageVersion = JavaLanguageVersion.of(JVM_VERSION)
+ val javaVersionCompat = JavaVersion.toVersion(JVM_VERSION)
+ val jvmTarget = JvmTarget.JVM_17
+ const val REMOTE_DEBUG_PORT = 5566
}
diff --git a/buildSrc/src/main/kotlin/DependencyResolution.kt b/buildSrc/src/main/kotlin/DependencyResolution.kt
index 9e19e0b..adf5eae 100644
--- a/buildSrc/src/main/kotlin/DependencyResolution.kt
+++ b/buildSrc/src/main/kotlin/DependencyResolution.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,35 +24,45 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import io.spine.internal.dependency.AnimalSniffer
-import io.spine.internal.dependency.AutoCommon
-import io.spine.internal.dependency.AutoService
-import io.spine.internal.dependency.AutoValue
-import io.spine.internal.dependency.CheckerFramework
-import io.spine.internal.dependency.CommonsCli
-import io.spine.internal.dependency.CommonsLogging
-import io.spine.internal.dependency.Dokka
-import io.spine.internal.dependency.ErrorProne
-import io.spine.internal.dependency.FindBugs
-import io.spine.internal.dependency.Flogger
-import io.spine.internal.dependency.Gson
-import io.spine.internal.dependency.Guava
-import io.spine.internal.dependency.J2ObjC
-import io.spine.internal.dependency.JUnit
-import io.spine.internal.dependency.Jackson
-import io.spine.internal.dependency.Kotest
-import io.spine.internal.dependency.Kotlin
-import io.spine.internal.dependency.Okio
-import io.spine.internal.dependency.Plexus
-import io.spine.internal.dependency.Protobuf
-import io.spine.internal.dependency.Truth
+import io.spine.dependency.build.AnimalSniffer
+import io.spine.dependency.build.CheckerFramework
+import io.spine.dependency.build.Dokka
+import io.spine.dependency.build.ErrorProne
+import io.spine.dependency.build.FindBugs
+import io.spine.dependency.lib.Asm
+import io.spine.dependency.lib.AutoCommon
+import io.spine.dependency.lib.AutoService
+import io.spine.dependency.lib.AutoValue
+import io.spine.dependency.lib.CommonsCli
+import io.spine.dependency.lib.CommonsCodec
+import io.spine.dependency.lib.CommonsLogging
+import io.spine.dependency.lib.Gson
+import io.spine.dependency.lib.Guava
+import io.spine.dependency.lib.J2ObjC
+import io.spine.dependency.lib.Jackson
+import io.spine.dependency.lib.JavaDiffUtils
+import io.spine.dependency.lib.Kotlin
+import io.spine.dependency.lib.Okio
+import io.spine.dependency.lib.Plexus
+import io.spine.dependency.lib.Protobuf
+import io.spine.dependency.lib.Slf4J
+import io.spine.dependency.local.Base
+import io.spine.dependency.local.Spine
+import io.spine.dependency.test.Hamcrest
+import io.spine.dependency.test.JUnit
+import io.spine.dependency.test.Kotest
+import io.spine.dependency.test.OpenTest4J
+import io.spine.dependency.test.Truth
import org.gradle.api.NamedDomainObjectContainer
+import org.gradle.api.Project
import org.gradle.api.artifacts.Configuration
import org.gradle.api.artifacts.ConfigurationContainer
+import org.gradle.api.artifacts.ModuleDependency
import org.gradle.api.artifacts.ResolutionStrategy
+import org.gradle.kotlin.dsl.exclude
/**
- * 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) {
@@ -75,7 +85,7 @@ fun NamedDomainObjectContainer.forceVersions() {
}
private fun ResolutionStrategy.forceProductionDependencies() {
- @Suppress("DEPRECATION") // Force SLF4J version.
+ @Suppress("DEPRECATION") // Force versions of SLF4J and Kotlin libs.
force(
AnimalSniffer.lib,
AutoCommon.lib,
@@ -84,17 +94,17 @@ private fun ResolutionStrategy.forceProductionDependencies() {
Dokka.BasePlugin.lib,
ErrorProne.annotations,
ErrorProne.core,
- Guava.lib,
FindBugs.annotations,
- Flogger.lib,
- Flogger.Runtime.systemBackend,
+ Gson.lib,
+ Guava.lib,
Kotlin.reflect,
Kotlin.stdLib,
Kotlin.stdLibCommon,
+ Kotlin.stdLibJdk7,
Kotlin.stdLibJdk8,
- Protobuf.libs,
Protobuf.GradlePlugin.lib,
- io.spine.internal.dependency.Slf4J.lib
+ Protobuf.libs,
+ Slf4J.lib
)
}
@@ -116,22 +126,33 @@ private fun ResolutionStrategy.forceTestDependencies() {
*/
private fun ResolutionStrategy.forceTransitiveDependencies() {
force(
+ Asm.lib,
+ Asm.tree,
+ Asm.analysis,
+ Asm.util,
+ Asm.commons,
AutoValue.annotations,
- Gson.lib,
- J2ObjC.annotations,
- Plexus.utils,
- Okio.lib,
CommonsCli.lib,
+ CommonsCodec.lib,
CommonsLogging.lib,
+ Gson.lib,
+ Hamcrest.core,
+ J2ObjC.annotations,
JUnit.Platform.engine,
JUnit.Platform.suiteApi,
- Jackson.databind,
+ JUnit.runner,
+ Jackson.annotations,
+ Jackson.bom,
Jackson.core,
+ Jackson.databind,
Jackson.dataformatXml,
Jackson.dataformatYaml,
Jackson.moduleKotlin,
- Jackson.bom,
- Jackson.annotations
+ JavaDiffUtils.lib,
+ Kotlin.jetbrainsAnnotations,
+ Okio.lib,
+ OpenTest4J.lib,
+ Plexus.utils,
)
}
@@ -150,3 +171,38 @@ fun NamedDomainObjectContainer.excludeProtobufLite() {
excludeProtoLite("runtimeOnly")
excludeProtoLite("testRuntimeOnly")
}
+
+/**
+ * Excludes `spine-base` from the dependencies.
+ */
+@Suppress("unused")
+fun ModuleDependency.excludeSpineBase() {
+ exclude(group = Spine.group, module = "spine-base")
+}
+
+/**
+ * Forces the version of [Spine.base] in the given project.
+ */
+@Suppress("unused")
+fun Project.forceSpineBase() {
+ configurations.all {
+ resolutionStrategy {
+ force(Base.lib)
+ }
+ }
+}
+
+/**
+ * Forces configurations containing `"proto"` in their names (disregarding the case) to
+ * use [Spine.baseForBuildScript].
+ */
+@Suppress("unused")
+fun Project.forceBaseInProtoTasks() {
+ configurations.configureEach {
+ if (name.lowercase().contains("proto")) {
+ resolutionStrategy {
+ force(Base.libForBuildScript)
+ }
+ }
+ }
+}
diff --git a/buildSrc/src/main/kotlin/DokkaExts.kt b/buildSrc/src/main/kotlin/DokkaExts.kt
index 9756dc3..ff5de3f 100644
--- a/buildSrc/src/main/kotlin/DokkaExts.kt
+++ b/buildSrc/src/main/kotlin/DokkaExts.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,8 +24,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import io.spine.internal.dependency.Dokka
-import io.spine.internal.gradle.publish.getOrCreate
+import io.spine.dependency.build.Dokka
+import io.spine.gradle.publish.getOrCreate
import java.io.File
import java.time.LocalDate
import org.gradle.api.Project
@@ -35,11 +35,12 @@ import org.gradle.api.file.FileCollection
import org.gradle.api.tasks.TaskContainer
import org.gradle.api.tasks.TaskProvider
import org.gradle.api.tasks.bundling.Jar
-import org.gradle.configurationcache.extensions.capitalized
import org.gradle.kotlin.dsl.DependencyHandlerScope
import org.jetbrains.dokka.DokkaConfiguration
import org.jetbrains.dokka.base.DokkaBase
import org.jetbrains.dokka.base.DokkaBaseConfiguration
+import org.jetbrains.dokka.gradle.AbstractDokkaLeafTask
+import org.jetbrains.dokka.gradle.AbstractDokkaTask
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.dokka.gradle.GradleDokkaSourceSetBuilder
@@ -56,7 +57,7 @@ fun DependencyHandlerScope.useDokkaForKotlinAsJava() {
/**
* To exclude pieces of code annotated with `@Internal` from the documentation
- * a custom plugin is added to the Dokka's classpath.
+ * a custom plugin is added to the Dokka classpath.
*
* @see
* Custom Dokka Plugins
@@ -68,15 +69,40 @@ fun DependencyHandlerScope.useDokkaWithSpineExtensions() {
private fun DependencyHandler.dokkaPlugin(dependencyNotation: Any): Dependency? =
add("dokkaPlugin", dependencyNotation)
-private fun Project.dokkaOutput(language: String): File =
- buildDir.resolve("docs/dokka${language.capitalized()}")
+private fun Project.dokkaOutput(language: String): File {
+ val lng = language.titleCaseFirstChar()
+ return layout.buildDirectory.dir("docs/dokka$lng").get().asFile
+}
-private fun Project.dokkaConfigFile(file: String): File {
+fun Project.dokkaConfigFile(file: String): File {
val dokkaConfDir = project.rootDir.resolve("buildSrc/src/main/resources/dokka")
return dokkaConfDir.resolve(file)
}
-private fun DokkaTask.configureFor(language: String) {
+/**
+ * Configures the presentation style, logo, and footer message.
+ *
+ * Dokka Base plugin allows setting a few properties to customize the output:
+ * - `customStyleSheets` property to which CSS files are passed overriding
+ * styles generated by Dokka;
+ * - `customAssets` property to provide resources. The image with the name
+ * "logo-icon.svg" is passed to override the default logo used by Dokka;
+ * - `separateInheritedMembers` when set to `true`, creates a separate tab in
+ * type-documentation for inherited members.
+ *
+ * @see
+ * Dokka modifying frontend assets
+ */
+fun AbstractDokkaTask.configureStyle() {
+ pluginConfiguration {
+ customStyleSheets = listOf(project.dokkaConfigFile("styles/custom-styles.css"))
+ customAssets = listOf(project.dokkaConfigFile("assets/logo-icon.svg"))
+ separateInheritedMembers = true
+ footerMessage = "Copyright ${LocalDate.now().year}, TeamDev"
+ }
+}
+
+private fun AbstractDokkaLeafTask.configureFor(language: String) {
dokkaSourceSets.configureEach {
/**
* Configures links to the external Java documentation.
@@ -85,6 +111,8 @@ private fun DokkaTask.configureFor(language: String) {
skipEmptyPackages.set(true)
+ includeNonPublic.set(true)
+
documentedVisibilities.set(
setOf(
DokkaConfiguration.Visibility.PUBLIC,
@@ -95,38 +123,20 @@ private fun DokkaTask.configureFor(language: String) {
outputDirectory.set(project.dokkaOutput(language))
- /**
- * Dokka Base plugin allows to set a few properties to customize the output:
- *
- * - `customStyleSheets` property to which CSS files are passed overriding
- * styles generated by Dokka;
- * - `customAssets` property to provide resources. The image with the name
- * "logo-icon.svg" is passed to override the default logo used by Dokka;
- * - `separateInheritedMembers` when set to `true`, creates a separate tab in
- * type-documentation for inherited members.
- *
- * @see
- * Dokka modifying frontend assets
- */
- pluginConfiguration {
- customStyleSheets = listOf(project.dokkaConfigFile("styles/custom-styles.css"))
- customAssets = listOf(project.dokkaConfigFile("assets/logo-icon.svg"))
- separateInheritedMembers = true
- footerMessage = "Copyright ${LocalDate.now().year}, TeamDev"
- }
+ configureStyle()
}
/**
* Configures this [DokkaTask] to accept only Kotlin files.
*/
-fun DokkaTask.configureForKotlin() {
+fun AbstractDokkaLeafTask.configureForKotlin() {
configureFor("kotlin")
}
/**
* Configures this [DokkaTask] to accept only Java files.
*/
-fun DokkaTask.configureForJava() {
+fun AbstractDokkaLeafTask.configureForJava() {
configureFor("java")
}
@@ -143,6 +153,7 @@ fun TaskContainer.dokkaHtmlTask(): DokkaTask? = this.findByName("dokkaHtml") as
* Dokka can properly generate documentation for either Kotlin or Java depending on
* the configuration, but not both.
*/
+@Suppress("unused")
internal fun GradleDokkaSourceSetBuilder.onlyJavaSources(): FileCollection {
return sourceRoots.filter(File::isJavaSourceDirectory)
}
@@ -167,6 +178,17 @@ fun Project.dokkaKotlinJar(): TaskProvider = tasks.getOrCreate("dokkaKotlin
}
}
+/**
+ * Tells if this task belongs to the execution graph which contains publishing tasks.
+ *
+ * The task `"publishToMavenLocal"` is excluded from the check because it is a part of
+ * the local testing workflow.
+ */
+fun AbstractDokkaTask.isInPublishingGraph(): Boolean =
+ project.gradle.taskGraph.allTasks.any {
+ it.name == "publish"
+ }
+
/**
* Locates or creates `dokkaJavaJar` task in this [Project].
*
@@ -182,3 +204,21 @@ fun Project.dokkaJavaJar(): TaskProvider = tasks.getOrCreate("dokkaJavaJar"
this@getOrCreate.dependsOn(dokkaTask)
}
}
+
+/**
+ * Disables Dokka and Javadoc tasks in this `Project`.
+ *
+ * This function could be useful to improve build speed when building subprojects containing
+ * test environments or integration test projects.
+ */
+@Suppress("unused")
+fun Project.disableDocumentationTasks() {
+ gradle.taskGraph.whenReady {
+ tasks.forEach { task ->
+ val lowercaseName = task.name.lowercase()
+ if (lowercaseName.contains("dokka") || lowercaseName.contains("javadoc")) {
+ task.enabled = false
+ }
+ }
+ }
+}
diff --git a/buildSrc/src/main/kotlin/Strings.kt b/buildSrc/src/main/kotlin/Strings.kt
new file mode 100644
index 0000000..19e0c21
--- /dev/null
+++ b/buildSrc/src/main/kotlin/Strings.kt
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.
+ */
+
+/**
+ * This file provides extensions to `String` and `CharSequence` that wrap
+ * analogues from standard Kotlin runtime.
+ *
+ * It helps in switching between versions of Gradle which have different versions of
+ * the Kotlin runtime. Please see the bodies of the extension functions for details on
+ * switching the implementations depending on the Kotlin version at hand.
+ *
+ * Once we migrate to newer Gradle, these wrappers should be inlined with
+ * the subsequent removal of this source file.
+ */
+@Suppress("unused")
+private const val ABOUT = ""
+
+/**
+ * Makes the first character come in the title case.
+ */
+fun String.titleCaseFirstChar(): String = replaceFirstChar { it.titlecase() }
+
+/**
+ * Converts this string to lowercase.
+ */
+@Deprecated(message = "Please use `lowercase()` instead.", replaceWith = ReplaceWith("lowercase"))
+fun String.lowercased(): String = lowercase()
diff --git a/buildSrc/src/main/kotlin/compile-protobuf.gradle.kts b/buildSrc/src/main/kotlin/compile-protobuf.gradle.kts
index baffe25..57a6b96 100644
--- a/buildSrc/src/main/kotlin/compile-protobuf.gradle.kts
+++ b/buildSrc/src/main/kotlin/compile-protobuf.gradle.kts
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,8 +24,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import io.spine.internal.dependency.Protobuf
-import io.spine.internal.gradle.protobuf.setup
+import io.spine.dependency.lib.Protobuf
+import io.spine.gradle.protobuf.setup
plugins {
id("java-library")
diff --git a/buildSrc/src/main/kotlin/config-tester.gradle.kts b/buildSrc/src/main/kotlin/config-tester.gradle.kts
index 14a236c..21d31e3 100644
--- a/buildSrc/src/main/kotlin/config-tester.gradle.kts
+++ b/buildSrc/src/main/kotlin/config-tester.gradle.kts
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,9 +24,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import io.spine.internal.gradle.ConfigTester
-import io.spine.internal.gradle.SpineRepos
-import io.spine.internal.gradle.cleanFolder
+import io.spine.gradle.ConfigTester
+import io.spine.gradle.SpineRepos
+import io.spine.gradle.cleanFolder
import java.nio.file.Path
import java.nio.file.Paths
diff --git a/buildSrc/src/main/kotlin/detekt-code-analysis.gradle.kts b/buildSrc/src/main/kotlin/detekt-code-analysis.gradle.kts
index b17262e..7b0ffd1 100644
--- a/buildSrc/src/main/kotlin/detekt-code-analysis.gradle.kts
+++ b/buildSrc/src/main/kotlin/detekt-code-analysis.gradle.kts
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -60,6 +60,7 @@ import io.gitlab.arturbosch.detekt.Detekt
* }
* ```
*/
+@Suppress("unused")
private val about = ""
plugins {
@@ -68,7 +69,7 @@ plugins {
detekt {
buildUponDefaultConfig = true
- config = files("${rootDir}/config/quality/detekt-config.yml")
+ config.from(files("${rootDir}/config/quality/detekt-config.yml"))
}
tasks {
diff --git a/buildSrc/src/main/kotlin/dokka-for-java.gradle.kts b/buildSrc/src/main/kotlin/dokka-for-java.gradle.kts
index 0e5087a..ee22622 100644
--- a/buildSrc/src/main/kotlin/dokka-for-java.gradle.kts
+++ b/buildSrc/src/main/kotlin/dokka-for-java.gradle.kts
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import org.jetbrains.dokka.gradle.DokkaTask
+import org.jetbrains.dokka.gradle.AbstractDokkaLeafTask
plugins {
id("org.jetbrains.dokka") // Cannot use `Dokka` dependency object here yet.
@@ -35,6 +35,9 @@ dependencies {
useDokkaWithSpineExtensions()
}
-tasks.withType().configureEach {
+tasks.withType().configureEach {
configureForJava()
+ onlyIf {
+ (it as AbstractDokkaLeafTask).isInPublishingGraph()
+ }
}
diff --git a/buildSrc/src/main/kotlin/dokka-for-kotlin.gradle.kts b/buildSrc/src/main/kotlin/dokka-for-kotlin.gradle.kts
index 0b12a0d..e50b10a 100644
--- a/buildSrc/src/main/kotlin/dokka-for-kotlin.gradle.kts
+++ b/buildSrc/src/main/kotlin/dokka-for-kotlin.gradle.kts
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import org.jetbrains.dokka.gradle.DokkaTask
+import org.jetbrains.dokka.gradle.AbstractDokkaLeafTask
plugins {
id("org.jetbrains.dokka") // Cannot use `Dokka` dependency object here yet.
@@ -34,6 +34,9 @@ dependencies {
useDokkaWithSpineExtensions()
}
-tasks.withType().configureEach {
+tasks.withType().configureEach {
configureForKotlin()
+ onlyIf {
+ (it as AbstractDokkaLeafTask).isInPublishingGraph()
+ }
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/AnimalSniffer.kt b/buildSrc/src/main/kotlin/io/spine/dependency/build/AnimalSniffer.kt
similarity index 88%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/AnimalSniffer.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/build/AnimalSniffer.kt
index 7e62651..8258896 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/AnimalSniffer.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/build/AnimalSniffer.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,10 +24,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.build
// https://www.mojohaus.org/animal-sniffer/animal-sniffer-maven-plugin/
+@Suppress("unused", "ConstPropertyName")
object AnimalSniffer {
private const val version = "1.21"
- const val lib = "org.codehaus.mojo:animal-sniffer-annotations:${version}"
+ const val lib = "org.codehaus.mojo:animal-sniffer-annotations:$version"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/build/CheckStyle.kt b/buildSrc/src/main/kotlin/io/spine/dependency/build/CheckStyle.kt
new file mode 100644
index 0000000..e1e3b28
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/build/CheckStyle.kt
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.build
+
+/**
+ * Dependencies on Checkstyle Java linter.
+ *
+ * @see Checkstyle
+ * @see [io.spine.gradle.checkstyle.CheckStyleConfig]
+ */
+@Suppress("unused", "ConstPropertyName")
+object CheckStyle {
+ /**
+ * The version to be used in the project.
+ *
+ * `10.12.1` is the last version in `10.12.0`, which does not introduce
+ * capability conflict over `google-collections` with Guava.
+ *
+ * @see Checkstyle
+ */
+ const val version = "10.12.1"
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/CheckerFramework.kt b/buildSrc/src/main/kotlin/io/spine/dependency/build/CheckerFramework.kt
similarity index 80%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/CheckerFramework.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/build/CheckerFramework.kt
index 37279f1..5d2140a 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/CheckerFramework.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/build/CheckerFramework.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,15 +24,16 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.build
// https://checkerframework.org/
+@Suppress("unused", "ConstPropertyName")
object CheckerFramework {
- private const val version = "3.27.0"
- const val annotations = "org.checkerframework:checker-qual:${version}"
+ private const val version = "3.40.0"
+ const val annotations = "org.checkerframework:checker-qual:$version"
@Suppress("unused")
val dataflow = listOf(
- "org.checkerframework:dataflow:${version}",
- "org.checkerframework:javacutil:${version}"
+ "org.checkerframework:dataflow:$version",
+ "org.checkerframework:javacutil:$version"
)
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Dokka.kt b/buildSrc/src/main/kotlin/io/spine/dependency/build/Dokka.kt
similarity index 73%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/Dokka.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/build/Dokka.kt
index 708d2d1..41757db 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Dokka.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/build/Dokka.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,10 +24,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.build
// https://github.com/Kotlin/dokka
-@Suppress("unused")
+@Suppress("unused", "ConstPropertyName")
object Dokka {
private const val group = "org.jetbrains.dokka"
@@ -35,37 +35,37 @@ object Dokka {
* When changing the version, also change the version used in the
* `buildSrc/build.gradle.kts`.
*/
- const val version = "1.8.10"
+ const val version = "1.9.20"
object GradlePlugin {
const val id = "org.jetbrains.dokka"
/**
* The version of this plugin is already specified in `buildSrc/build.gradle.kts`
- * file. Thus, when applying the plugin in project's build files, only the [id]
+ * file. Thus, when applying the plugin to project's build files, only the [id]
* should be used.
*/
- const val lib = "${group}:dokka-gradle-plugin:${version}"
+ const val lib = "$group:dokka-gradle-plugin:$version"
}
object BasePlugin {
- const val lib = "${group}:dokka-base:${version}"
+ const val lib = "$group:dokka-base:$version"
}
- const val analysis = "org.jetbrains.dokka:dokka-analysis:${version}"
+ const val analysis = "org.jetbrains.dokka:dokka-analysis:$version"
object CorePlugin {
- const val lib = "${group}:dokka-core:${version}"
+ const val lib = "$group:dokka-core:$version"
}
/**
- * To generate the documentation as seen from Java perspective use this plugin.
+ * To generate the documentation as seen from the Java perspective, please use this plugin.
*
* @see
* Dokka output formats
*/
object KotlinAsJavaPlugin {
- const val lib = "${group}:kotlin-as-java-plugin:${version}"
+ const val lib = "$group:kotlin-as-java-plugin:$version"
}
/**
@@ -78,7 +78,7 @@ object Dokka {
object SpineExtensions {
private const val group = "io.spine.tools"
- const val version = "2.0.0-SNAPSHOT.4"
- const val lib = "${group}:spine-dokka-extensions:${version}"
+ const val version = "2.0.0-SNAPSHOT.6"
+ const val lib = "$group:spine-dokka-extensions:$version"
}
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/ErrorProne.kt b/buildSrc/src/main/kotlin/io/spine/dependency/build/ErrorProne.kt
similarity index 66%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/ErrorProne.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/build/ErrorProne.kt
index 3c4d133..5b47c1b 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/ErrorProne.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/build/ErrorProne.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,36 +24,39 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.build
// https://errorprone.info/
-@Suppress("unused")
+@Suppress("unused", "ConstPropertyName")
object ErrorProne {
// https://github.com/google/error-prone
- private const val version = "2.18.0"
+ private const val version = "2.36.0"
+
+ const val group = "com.google.errorprone"
+
// https://github.com/tbroyer/gradle-errorprone-plugin/blob/v0.8/build.gradle.kts
private const val javacPluginVersion = "9+181-r4173-1"
val annotations = listOf(
- "com.google.errorprone:error_prone_annotations:${version}",
- "com.google.errorprone:error_prone_type_annotations:${version}"
+ "$group:error_prone_annotations:$version",
+ "$group:error_prone_type_annotations:$version"
)
- const val core = "com.google.errorprone:error_prone_core:${version}"
- const val checkApi = "com.google.errorprone:error_prone_check_api:${version}"
- const val testHelpers = "com.google.errorprone:error_prone_test_helpers:${version}"
- const val javacPlugin = "com.google.errorprone:javac:${javacPluginVersion}"
+ const val core = "$group:error_prone_core:$version"
+ const val checkApi = "$group:error_prone_check_api:$version"
+ const val testHelpers = "$group:error_prone_test_helpers:$version"
+ const val javacPlugin = "$group:javac:$javacPluginVersion"
// https://github.com/tbroyer/gradle-errorprone-plugin/releases
object GradlePlugin {
const val id = "net.ltgt.errorprone"
/**
* The version of this plugin is already specified in `buildSrc/build.gradle.kts` file.
- * Thus, when applying the plugin in projects build files, only the [id] should be used.
+ * Thus, when applying the plugin to project build files, only the [id] should be used.
*
- * When the plugin is used as a library (e.g. in tools), its version and the library
+ * When the plugin is used as a library (e.g., in tools), its version and the library
* artifacts are of importance.
*/
- const val version = "3.1.0"
- const val lib = "net.ltgt.gradle:gradle-errorprone-plugin:${version}"
+ const val version = "4.1.0"
+ const val lib = "net.ltgt.gradle:gradle-errorprone-plugin:$version"
}
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/FindBugs.kt b/buildSrc/src/main/kotlin/io/spine/dependency/build/FindBugs.kt
similarity index 63%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/FindBugs.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/build/FindBugs.kt
index 50e55e3..98003b9 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/FindBugs.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/build/FindBugs.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,16 +24,18 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.build
/**
- * The FindBugs project is dead since 2017. It has a successor called SpotBugs, but we don't use it.
- * We use ErrorProne for static analysis instead. The only reason for having this dependency is
- * the annotations for null-checking introduced by JSR-305. These annotations are troublesome,
- * but no alternatives are known for some of them so far. Please see
- * [this issue](https://github.com/SpineEventEngine/base/issues/108) for more details.
+ * The FindBugs project has been dead since 2017. It has a successor called SpotBugs,
+ * but we don't use it. We use ErrorProne for static analysis instead.
+ * The only reason for having this dependency is the annotations for null-checking
+ * introduced by JSR-305. These annotations are troublesome,
+ * but no alternatives are known for some of them so far.
+ * Please see [this issue](https://github.com/SpineEventEngine/base/issues/108) for more details.
*/
+@Suppress("unused", "ConstPropertyName")
object FindBugs {
private const val version = "3.0.2"
- const val annotations = "com.google.code.findbugs:jsr305:${version}"
+ const val annotations = "com.google.code.findbugs:jsr305:$version"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/GradleDoctor.kt b/buildSrc/src/main/kotlin/io/spine/dependency/build/GradleDoctor.kt
similarity index 87%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/GradleDoctor.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/build/GradleDoctor.kt
index 1339e29..89cfb34 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/GradleDoctor.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/build/GradleDoctor.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,14 +24,15 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.build
/**
* Helps optimize Gradle Builds by ensuring recommendations at build time.
*
* See [plugin site](https://runningcode.github.io/gradle-doctor) for features and usage.
*/
+@Suppress("unused", "ConstPropertyName")
object GradleDoctor {
- const val version = "0.8.1"
+ const val version = "0.10.0"
const val pluginId = "com.osacky.doctor"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/build/Ksp.kt b/buildSrc/src/main/kotlin/io/spine/dependency/build/Ksp.kt
new file mode 100644
index 0000000..4534c52
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/build/Ksp.kt
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.build
+
+/**
+ * Kotlin Symbol Processing API.
+ *
+ * @see KSP GitHub repository
+ */
+@Suppress("ConstPropertyName", "unused")
+object Ksp {
+ const val version = "2.1.10-1.0.31"
+ const val id = "com.google.devtools.ksp"
+ const val group = "com.google.devtools.ksp"
+ const val symbolProcessingApi = "$group:symbol-processing-api:$version"
+ const val symbolProcessing = "$group:symbol-processing:$version"
+ const val symbolProcessingAaEmb = "$group:symbol-processing-aa-embeddable:$version"
+ const val symbolProcessingCommonDeps = "$group:symbol-processing-common-deps:$version"
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/build/LicenseReport.kt b/buildSrc/src/main/kotlin/io/spine/dependency/build/LicenseReport.kt
new file mode 100644
index 0000000..a4eb754
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/build/LicenseReport.kt
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.build
+
+// https://github.com/jk1/Gradle-License-Report
+@Suppress("unused")
+object LicenseReport {
+ private const val version = "1.16"
+ const val lib = "com.github.jk1:gradle-license-report:$version"
+
+ object GradlePlugin {
+ const val version = LicenseReport.version
+ const val id = "com.github.jk1.dependency-license-report"
+ const val lib = LicenseReport.lib
+ }
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/OsDetector.kt b/buildSrc/src/main/kotlin/io/spine/dependency/build/OsDetector.kt
similarity index 86%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/OsDetector.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/build/OsDetector.kt
index 44253c5..5b479bf 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/OsDetector.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/build/OsDetector.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,12 +24,13 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.build
+@Suppress("unused", "ConstPropertyName")
object OsDetector {
// https://github.com/google/osdetector-gradle-plugin
- const val version = "1.7.0"
+ const val version = "1.7.3"
const val id = "com.google.osdetector"
- const val lib = "com.google.gradle:osdetector-gradle-plugin:${version}"
+ const val lib = "com.google.gradle:osdetector-gradle-plugin:$version"
const val classpath = lib
}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/build/Pmd.kt b/buildSrc/src/main/kotlin/io/spine/dependency/build/Pmd.kt
new file mode 100644
index 0000000..e4f7fdd
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/build/Pmd.kt
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.
+ */
+
+@file:Suppress("MaxLineLength")
+
+package io.spine.dependency.build
+
+// https://github.com/pmd/pmd/releases
+@Suppress("unused", "ConstPropertyName")
+object Pmd {
+ /**
+ * This is the last version in the 6.x series.
+ *
+ * There's a major update to 7.x series.
+ *
+ * @see Aedile at GitHub
*/
@Suppress("unused")
-object JavaJwt {
- private const val version = "3.19.1"
- const val lib = "com.auth0:java-jwt:${version}"
+object Aedile {
+ private const val version = "1.3.1"
+ const val lib = "com.sksamuel.aedile:aedile-core:$version"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/ApacheHttp.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/ApacheHttp.kt
similarity index 88%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/ApacheHttp.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/lib/ApacheHttp.kt
index 9a4ba1a..f3eff5e 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/ApacheHttp.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/ApacheHttp.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,9 +24,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.lib
-@Suppress("unused")
+@Suppress("unused", "ConstPropertyName")
object ApacheHttp {
// https://hc.apache.org/downloads.cgi
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/AppEngine.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/AppEngine.kt
similarity index 84%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/AppEngine.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/lib/AppEngine.kt
index 35731e8..b4e7336 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/AppEngine.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/AppEngine.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,16 +24,16 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.lib
// https://cloud.google.com/java/docs/reference
-@Suppress("unused")
+@Suppress("unused", "ConstPropertyName")
object AppEngine {
private const val version = "1.9.82"
- const val sdk = "com.google.appengine:appengine-api-1.0-sdk:${version}"
+ const val sdk = "com.google.appengine:appengine-api-1.0-sdk:$version"
object GradlePlugin {
private const val version = "2.2.0"
- const val lib = "com.google.cloud.tools:appengine-gradle-plugin:${version}"
+ const val lib = "com.google.cloud.tools:appengine-gradle-plugin:$version"
}
}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/lib/Asm.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Asm.kt
new file mode 100644
index 0000000..0a388c9
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Asm.kt
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.lib
+
+// https://asm.ow2.io/
+@Suppress("unused", "ConstPropertyName")
+object Asm {
+ private const val version = "9.6"
+ const val group = "org.ow2.asm"
+ const val lib = "$group:asm:$version"
+
+ // We use the following artifacts only to force the versions
+ // of the dependencies which are transitive for us.
+ //
+ const val tree = "$group:asm-tree:$version"
+ const val analysis = "$group:asm-analysis:$version"
+ const val util = "$group:asm-util:$version"
+ const val commons = "$group:asm-commons:$version"
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Auto.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Auto.kt
similarity index 71%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/Auto.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/lib/Auto.kt
index 7cf85fe..6c222b9 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Auto.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Auto.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,24 +24,32 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+@file:Suppress("unused", "ConstPropertyName")
+
+package io.spine.dependency.lib
// https://github.com/google/auto
object AutoCommon {
- private const val version = "1.2.1"
- const val lib = "com.google.auto:auto-common:${version}"
+ private const val version = "1.2.2"
+ const val lib = "com.google.auto:auto-common:$version"
}
// https://github.com/google/auto
object AutoService {
- private const val version = "1.0.1"
- const val annotations = "com.google.auto.service:auto-service-annotations:${version}"
+ private const val version = "1.1.1"
+ const val annotations = "com.google.auto.service:auto-service-annotations:$version"
@Suppress("unused")
- const val processor = "com.google.auto.service:auto-service:${version}"
+ const val processor = "com.google.auto.service:auto-service:$version"
}
// https://github.com/google/auto
object AutoValue {
- private const val version = "1.10.1"
- const val annotations = "com.google.auto.value:auto-value-annotations:${version}"
+ private const val version = "1.10.2"
+ const val annotations = "com.google.auto.value:auto-value-annotations:$version"
+}
+
+// https://github.com/ZacSweers/auto-service-ksp
+object AutoServiceKsp {
+ private const val version = "1.2.0"
+ const val processor = "dev.zacsweers.autoservice:auto-service-ksp:$version"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/BouncyCastle.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/BouncyCastle.kt
similarity index 88%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/BouncyCastle.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/lib/BouncyCastle.kt
index 3ec9748..5289d0c 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/BouncyCastle.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/BouncyCastle.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,10 +24,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.lib
// https://www.bouncycastle.org/java.html
-@Suppress("unused")
+@Suppress("unused", "ConstPropertyName")
object BouncyCastle {
const val libPkcsJdk15 = "org.bouncycastle:bcpkix-jdk15on:1.68"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/lib/Caffeine.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Caffeine.kt
new file mode 100644
index 0000000..9b0c7c1
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Caffeine.kt
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.lib
+
+/**
+ * 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 Caffeine at GitHub
+ */
+@Suppress("unused")
+object Caffeine {
+ private const val version = "3.0.5"
+ const val lib = "com.github.ben-manes.caffeine:caffeine:$version"
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/CheckStyle.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Clikt.kt
similarity index 80%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/CheckStyle.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/lib/Clikt.kt
index f3010bf..3da42ce 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/CheckStyle.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Clikt.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,11 +24,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.lib
-// https://checkstyle.sourceforge.io/
-// See `io.spine.internal.gradle.checkstyle.CheckStyleConfig`.
+// https://ajalt.github.io/clikt/
@Suppress("unused")
-object CheckStyle {
- const val version = "10.3.4"
+object Clikt {
+ private const val version = "3.5.2"
+ const val lib = "com.github.ajalt.clikt:clikt:$version"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/CommonsCli.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/CommonsCli.kt
similarity index 83%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/CommonsCli.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/lib/CommonsCli.kt
index db24b78..6063278 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/CommonsCli.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/CommonsCli.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,15 +24,16 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.lib
/**
* Commons CLI is a transitive dependency which we don't use directly.
- * We `force` it in [DependencyResolution.forceConfiguration].
+ * We `force` it in [forceVersions].
*
* [Commons CLI](https://commons.apache.org/proper/commons-cli/)
*/
+@Suppress("unused", "ConstPropertyName")
object CommonsCli {
private const val version = "1.5.0"
- const val lib = "commons-cli:commons-cli:${version}"
+ const val lib = "commons-cli:commons-cli:$version"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/CommonsCodec.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/CommonsCodec.kt
similarity index 86%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/CommonsCodec.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/lib/CommonsCodec.kt
index d1d3915..270b704 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/CommonsCodec.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/CommonsCodec.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,11 +24,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.lib
// https://commons.apache.org/proper/commons-codec/changes-report.html
-@Suppress("unused")
+@Suppress("unused", "ConstPropertyName")
object CommonsCodec {
- private const val version = "1.15"
+ private const val version = "1.16.0"
const val lib = "commons-codec:commons-codec:$version"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/CommonsLogging.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/CommonsLogging.kt
similarity index 80%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/CommonsLogging.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/lib/CommonsLogging.kt
index d7781cf..9f1139c 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/CommonsLogging.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/CommonsLogging.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,14 +24,15 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.lib
/**
* [Commons Logging](https://commons.apache.org/proper/commons-logging/) is a transitive
- * dependency which we don't use directly. This object is used for forcing the version.
+ * dependency, which we don't use directly. This object is used for forcing the version.
*/
+@Suppress("unused", "ConstPropertyName")
object CommonsLogging {
// https://commons.apache.org/proper/commons-logging/
private const val version = "1.2"
- const val lib = "commons-logging:commons-logging:${version}"
+ const val lib = "commons-logging:commons-logging:$version"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/ProtoData.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Coroutines.kt
similarity index 66%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/ProtoData.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/lib/Coroutines.kt
index c8adcb6..cb3c281 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/ProtoData.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Coroutines.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,21 +24,18 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.lib
/**
- * Dependencies on ProtoData modules.
- *
- * See [`SpineEventEngine/ProtoData`](https://github.com/SpineEventEngine/ProtoData/).
+ * Kotlin Coroutines.
+ *
+ * @see GitHub projecet
*/
@Suppress("unused")
-object ProtoData {
- const val version = "0.8.0"
- const val group = "io.spine.protodata"
- const val compiler = "$group:protodata-compiler:$version"
-
- const val codegenJava = "io.spine.protodata:protodata-codegen-java:$version"
-
- const val pluginId = "io.spine.protodata"
- const val pluginLib = "${Spine.group}:protodata:$version"
+object Coroutines {
+ const val version = "1.6.4"
+ const val jdk8 = "org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:$version"
+ const val core = "org.jetbrains.kotlinx:kotlinx-coroutines-core:$version"
+ const val bom = "org.jetbrains.kotlinx:kotlinx-coroutines-bom:$version"
+ const val coreJvm = "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:$version"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Firebase.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Firebase.kt
similarity index 83%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/Firebase.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/lib/Firebase.kt
index 8203a12..1d798ee 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Firebase.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Firebase.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,11 +24,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.lib
// https://firebase.google.com/docs/admin/setup#java
-@Suppress("unused")
+@Suppress("unused", "ConstPropertyName")
object Firebase {
private const val adminVersion = "8.1.0"
- const val admin = "com.google.firebase:firebase-admin:${adminVersion}"
+ const val admin = "com.google.firebase:firebase-admin:$adminVersion"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Flogger.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Flogger.kt
similarity index 80%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/Flogger.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/lib/Flogger.kt
index 102794f..769c905 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Flogger.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Flogger.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,17 +24,19 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.lib
// https://github.com/google/flogger
+@Deprecated("Please use Spine Logging library instead.")
+@Suppress("unused", "ConstPropertyName")
object Flogger {
internal const val version = "0.7.4"
- const val lib = "com.google.flogger:flogger:${version}"
- @Suppress("unused")
+ const val lib = "com.google.flogger:flogger:$version"
+
object Runtime {
- const val systemBackend = "com.google.flogger:flogger-system-backend:${version}"
- const val log4j2Backend = "com.google.flogger:flogger-log4j2-backend:${version}"
- const val slf4JBackend = "com.google.flogger:flogger-slf4j-backend:${version}"
- const val grpcContext = "com.google.flogger:flogger-grpc-context:${version}"
+ const val systemBackend = "com.google.flogger:flogger-system-backend:$version"
+ const val log4j2Backend = "com.google.flogger:flogger-log4j2-backend:$version"
+ const val slf4JBackend = "com.google.flogger:flogger-slf4j-backend:$version"
+ const val grpcContext = "com.google.flogger:flogger-grpc-context:$version"
}
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/GoogleApis.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/GoogleApis.kt
similarity index 91%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/GoogleApis.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/lib/GoogleApis.kt
index 86a2475..7fd3340 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/GoogleApis.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/GoogleApis.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,12 +24,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.lib
/**
* Provides dependencies on [GoogleApis projects](https://github.com/googleapis/).
*/
-@Suppress("unused")
+@Suppress("unused", "ConstPropertyName")
object GoogleApis {
// https://github.com/googleapis/google-api-java-client
@@ -53,7 +53,7 @@ object GoogleApis {
// https://github.com/googleapis/google-auth-library-java
object AuthLibrary {
const val version = "1.3.0"
- const val credentials = "com.google.auth:google-auth-library-credentials:${version}"
- const val oAuth2Http = "com.google.auth:google-auth-library-oauth2-http:${version}"
+ const val credentials = "com.google.auth:google-auth-library-credentials:$version"
+ const val oAuth2Http = "com.google.auth:google-auth-library-oauth2-http:$version"
}
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/GoogleCloud.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/GoogleCloud.kt
similarity index 90%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/GoogleCloud.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/lib/GoogleCloud.kt
index 4d9a3f9..b755168 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/GoogleCloud.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/GoogleCloud.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,9 +24,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.lib
-@Suppress("unused")
+@Suppress("unused", "ConstPropertyName")
object GoogleCloud {
// https://github.com/googleapis/java-core
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Grpc.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Grpc.kt
similarity index 56%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/Grpc.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/lib/Grpc.kt
index e5ce951..011b4d2 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Grpc.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Grpc.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,26 +24,28 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.lib
// https://github.com/grpc/grpc-java
-@Suppress("unused")
+@Suppress("unused", "ConstPropertyName")
object Grpc {
@Suppress("MemberVisibilityCanBePrivate")
- const val version = "1.53.0"
- const val api = "io.grpc:grpc-api:${version}"
- const val auth = "io.grpc:grpc-auth:${version}"
- const val core = "io.grpc:grpc-core:${version}"
- const val context = "io.grpc:grpc-context:${version}"
- const val stub = "io.grpc:grpc-stub:${version}"
- const val okHttp = "io.grpc:grpc-okhttp:${version}"
- const val protobuf = "io.grpc:grpc-protobuf:${version}"
- const val protobufLite = "io.grpc:grpc-protobuf-lite:${version}"
- const val netty = "io.grpc:grpc-netty:${version}"
- const val nettyShaded = "io.grpc:grpc-netty-shaded:${version}"
+ const val version = "1.59.0"
+ const val group = "io.grpc"
+ const val api = "$group:grpc-api:$version"
+ const val auth = "$group:grpc-auth:$version"
+ const val core = "$group:grpc-core:$version"
+ const val context = "$group:grpc-context:$version"
+ const val inProcess = "$group:grpc-inprocess:$version"
+ const val stub = "$group:grpc-stub:$version"
+ const val okHttp = "$group:grpc-okhttp:$version"
+ const val protobuf = "$group:grpc-protobuf:$version"
+ const val protobufLite = "$group:grpc-protobuf-lite:$version"
+ const val netty = "$group:grpc-netty:$version"
+ const val nettyShaded = "$group:grpc-netty-shaded:$version"
object ProtocPlugin {
const val id = "grpc"
- const val artifact = "io.grpc:protoc-gen-grpc-java:${version}"
+ const val artifact = "$group:protoc-gen-grpc-java:$version"
}
}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/lib/GrpcKotlin.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/GrpcKotlin.kt
new file mode 100644
index 0000000..e695f6f
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/GrpcKotlin.kt
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.lib
+
+/**
+ * gRPC-Kotlin/JVM.
+ *
+ * @see GitHub project
+ */
+@Suppress("unused")
+object GrpcKotlin {
+ const val version = "1.3.0"
+ const val stub = "io.grpc:grpc-kotlin-stub:$version"
+
+ object ProtocPlugin {
+ const val id = "grpckt"
+ const val artifact = "io.grpc:protoc-gen-grpc-kotlin:$version:jdk8@jar"
+ }
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Gson.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Gson.kt
similarity index 79%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/Gson.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/lib/Gson.kt
index 568c5b2..229c434 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Gson.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Gson.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,15 +24,16 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.lib
/**
- * Gson is a transitive dependency which we don't use directly.
+ * Gson is a transitive dependency, which we don't use directly.
* We `force` it in [DependencyResolution.forceConfiguration()].
*
* [Gson](https://github.com/google/gson)
*/
+@Suppress("unused", "ConstPropertyName")
object Gson {
- private const val version = "2.9.0"
- const val lib = "com.google.code.gson:gson:${version}"
+ private const val version = "2.10.1"
+ const val lib = "com.google.code.gson:gson:$version"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Guava.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Guava.kt
similarity index 77%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/Guava.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/lib/Guava.kt
index 42e2410..5ea5fcc 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Guava.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Guava.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.lib
/**
* The dependencies for Guava.
@@ -32,10 +32,13 @@ package io.spine.internal.dependency
* When changing the version, also change the version used in the `build.gradle.kts`. We need
* to synchronize the version used in `buildSrc` and in Spine modules. Otherwise, when testing
* Gradle plugins, errors may occur due to version clashes.
+ *
+ * @see Guava at GitHub.
*/
-// https://github.com/google/guava
+@Suppress("unused", "ConstPropertyName")
object Guava {
- private const val version = "31.1-jre"
- const val lib = "com.google.guava:guava:${version}"
- const val testLib = "com.google.guava:guava-testlib:${version}"
+ private const val version = "32.1.3-jre"
+ const val group = "com.google.guava"
+ const val lib = "$group:guava:$version"
+ const val testLib = "$group:guava-testlib:$version"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/HttpClient.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/HttpClient.kt
similarity index 85%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/HttpClient.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/lib/HttpClient.kt
index af1a034..526f05f 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/HttpClient.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/HttpClient.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,19 +24,19 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.lib
/**
* Google implementations of [HTTP client](https://github.com/googleapis/google-http-java-client).
*/
-@Suppress("unused")
+@Suppress("unused", "ConstPropertyName")
object HttpClient {
// https://github.com/googleapis/google-http-java-client
- const val version = "1.41.5"
- const val google = "com.google.http-client:google-http-client:${version}"
- const val jackson2 = "com.google.http-client:google-http-client-jackson2:${version}"
- const val gson = "com.google.http-client:google-http-client-gson:${version}"
- const val apache2 = "com.google.http-client:google-http-client-apache-v2:${version}"
+ const val version = "1.43.3"
+ const val google = "com.google.http-client:google-http-client:$version"
+ const val jackson2 = "com.google.http-client:google-http-client-jackson2:$version"
+ const val gson = "com.google.http-client:google-http-client-gson:$version"
+ const val apache2 = "com.google.http-client:google-http-client-apache-v2:$version"
const val apache = "com.google.http-client:google-http-client-apache:2.1.2"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/lib/IntelliJ.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/IntelliJ.kt
new file mode 100644
index 0000000..7f9232b
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/IntelliJ.kt
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.
+ */
+
+@file:Suppress("ConstPropertyName")
+
+package io.spine.dependency.lib
+
+/**
+ * The components of the IntelliJ Platform.
+ *
+ * Make sure to add the `intellijReleases` and `jetBrainsCacheRedirector`
+ * repositories to your project. See `kotlin/Repositories.kt` for details.
+ */
+@Suppress("unused")
+object IntelliJ {
+
+ /**
+ * The version of the IntelliJ platform.
+ *
+ * This is the version used by Kotlin compiler `1.9.21`.
+ * Advance this version with caution because it may break the setup of
+ * IntelliJ platform standalone execution.
+ */
+ const val version = "213.7172.53"
+
+ object Platform {
+ private const val group = "com.jetbrains.intellij.platform"
+ const val core = "$group:core:$version"
+ const val util = "$group:util:$version"
+ const val coreImpl = "$group:core-impl:$version"
+ const val codeStyle = "$group:code-style:$version"
+ const val codeStyleImpl = "$group:code-style-impl:$version"
+ const val projectModel = "$group:project-model:$version"
+ const val projectModelImpl = "$group:project-model-impl:$version"
+ const val lang = "$group:lang:$version"
+ const val langImpl = "$group:lang-impl:$version"
+ const val ideImpl = "$group:ide-impl:$version"
+ const val ideCoreImpl = "$group:ide-core-impl:$version"
+ const val analysisImpl = "$group:analysis-impl:$version"
+ const val indexingImpl = "$group:indexing-impl:$version"
+ }
+
+ object Jsp {
+ private const val group = "com.jetbrains.intellij.jsp"
+ @Suppress("MemberNameEqualsClassName")
+ const val jsp = "$group:jsp:$version"
+ }
+
+ object Xml {
+ private const val group = "com.jetbrains.intellij.xml"
+ const val xmlPsiImpl = "$group:xml-psi-impl:$version"
+ }
+
+ object JavaPsi {
+ private const val group = "com.jetbrains.intellij.java"
+ const val api = "$group:java-psi:$version"
+ const val impl = "$group:java-psi-impl:$version"
+ }
+
+ object Java {
+ private const val group = "com.jetbrains.intellij.java"
+ @Suppress("MemberNameEqualsClassName")
+ const val java = "$group:java:$version"
+ const val impl = "$group:java-impl:$version"
+ }
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/J2ObjC.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/J2ObjC.kt
similarity index 66%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/J2ObjC.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/lib/J2ObjC.kt
index 0dd2df5..3098466 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/J2ObjC.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/J2ObjC.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,18 +24,28 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.lib
/**
- * [J2ObjC](https://developers.google.com/j2objc) is a transitive dependency
+ * [J2ObjC](https://developers.google.com/j2objc) is a transitive dependency,
* which we don't use directly. This object is used for forcing the version.
*/
+@Suppress("unused", "ConstPropertyName")
object J2ObjC {
- // https://github.com/google/j2objc/releases
- // `1.3.` is the latest version available from Maven Central.
- // https://search.maven.org/artifact/com.google.j2objc/j2objc-annotations
- private const val version = "1.3"
- const val annotations = "com.google.j2objc:j2objc-annotations:${version}"
+ /**
+ * See [J2ObjC releases](https://github.com/google/j2objc/releases).
+ *
+ * `1.3` was the latest version available from Maven Central.
+ * Now `2.8` is the latest version available.
+ * As [HttpClient]
+ * [migrated](https://github.com/googleapis/google-http-java-client/releases/tag/v1.43.3) to v2,
+ * we set the latest v2 version as well.
+ *
+ * @see
+ * J2ObjC on Maven Central
+ */
+ private const val version = "2.8"
+ const val annotations = "com.google.j2objc:j2objc-annotations:$version"
@Deprecated("Please use `annotations` instead.", ReplaceWith("annotations"))
const val lib = annotations
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Jackson.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Jackson.kt
similarity index 69%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/Jackson.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/lib/Jackson.kt
index f458f46..4b78c8f 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Jackson.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Jackson.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,32 +24,40 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.lib
-@Suppress("unused")
+// https://github.com/FasterXML/jackson/wiki/Jackson-Releases
+@Suppress("unused", "ConstPropertyName")
object Jackson {
- const val version = "2.13.4"
- private const val databindVersion = "2.13.4.2"
+ const val version = "2.15.3"
+ private const val databindVersion = "2.15.3"
private const val coreGroup = "com.fasterxml.jackson.core"
private const val dataformatGroup = "com.fasterxml.jackson.dataformat"
private const val moduleGroup = "com.fasterxml.jackson.module"
// https://github.com/FasterXML/jackson-core
- const val core = "$coreGroup:jackson-core:${version}"
+ const val core = "$coreGroup:jackson-core:$version"
// https://github.com/FasterXML/jackson-databind
- const val databind = "$coreGroup:jackson-databind:${databindVersion}"
+ const val databind = "$coreGroup:jackson-databind:$databindVersion"
// https://github.com/FasterXML/jackson-annotations
- const val annotations = "$coreGroup:jackson-annotations:${version}"
+ const val annotations = "$coreGroup:jackson-annotations:$version"
// https://github.com/FasterXML/jackson-dataformat-xml/releases
- const val dataformatXml = "$dataformatGroup:jackson-dataformat-xml:${version}"
+ const val dataformatXml = "$dataformatGroup:jackson-dataformat-xml:$version"
// https://github.com/FasterXML/jackson-dataformats-text/releases
- const val dataformatYaml = "$dataformatGroup:jackson-dataformat-yaml:${version}"
+ const val dataformatYaml = "$dataformatGroup:jackson-dataformat-yaml:$version"
// https://github.com/FasterXML/jackson-module-kotlin/releases
- const val moduleKotlin = "$moduleGroup:jackson-module-kotlin:${version}"
+ const val moduleKotlin = "$moduleGroup:jackson-module-kotlin:$version"
// https://github.com/FasterXML/jackson-bom
- const val bom = "com.fasterxml.jackson:jackson-bom:${version}"
+ const val bom = "com.fasterxml.jackson:jackson-bom:$version"
+
+ // https://github.com/FasterXML/jackson-jr
+ object Junior {
+ const val version = Jackson.version
+ const val group = "com.fasterxml.jackson.jr"
+ const val objects = "$group:jackson-jr-objects:$version"
+ }
}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/lib/JavaDiffUtils.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/JavaDiffUtils.kt
new file mode 100644
index 0000000..7cc2e59
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/JavaDiffUtils.kt
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.lib
+
+/**
+ * The dependency on the `java-diff-utils` library, which is transitive for us at the time
+ * of writing.
+ *
+ * It might become our dependency as a part of
+ * the [Spine Text](https://github.com/SpineEventEngine/text) library.
+ */
+@Suppress("unused", "ConstPropertyName")
+object JavaDiffUtils {
+
+ // https://github.com/java-diff-utils/java-diff-utils/releases
+ private const val version = "4.12"
+ const val lib = "io.github.java-diff-utils:java-diff-utils:$version"
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/lib/JavaJwt.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/JavaJwt.kt
new file mode 100644
index 0000000..4d9b1df
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/JavaJwt.kt
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.lib
+
+/**
+ * A Java implementation of JSON Web Token (JWT) - RFC 7519.
+ *
+ * [Java JWT](https://github.com/auth0/java-jwt)
+ */
+@Suppress("unused", "ConstPropertyName")
+object JavaJwt {
+
+ /**
+ * The last version in the v3.x.x series.
+ *
+ * There's a v4.x.x series (e.g., https://github.com/auth0/java-jwt/releases/tag/4.4.0), but
+ * it introduces breaking changes. Consider upgrading to it when we're ready to migrate.
+ */
+ private const val version = "3.19.4"
+
+ const val lib = "com.auth0:java-jwt:$version"
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/JavaPoet.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/JavaPoet.kt
similarity index 79%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/JavaPoet.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/lib/JavaPoet.kt
index 07bb28f..b99e503 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/JavaPoet.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/JavaPoet.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,11 +24,14 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.lib
// https://github.com/square/javapoet
-@Suppress("unused")
+@Suppress("unused", "ConstPropertyName")
object JavaPoet {
private const val version = "1.13.0"
- const val lib = "com.squareup:javapoet:${version}"
+ const val group = "com.squareup"
+ const val artifact = "javapoet"
+ const val module = "$group:$artifact"
+ const val lib = "$module:$version"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/JavaX.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/JavaX.kt
similarity index 77%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/JavaX.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/lib/JavaX.kt
index f403138..7ea8cdf 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/JavaX.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/JavaX.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,13 +24,14 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.lib
-@Suppress("unused")
+@Suppress("unused", "ConstPropertyName")
object JavaX {
- // This artifact which used to be a part of J2EE moved under Eclipse EE4J project.
+ // This artifact, which used to be a part of J2EE, moved under the Eclipse EE4J project.
// https://github.com/eclipse-ee4j/common-annotations-api
- const val annotations = "javax.annotation:javax.annotation-api:1.3.2"
+ const val annotationGroup = "javax.annotation"
+ const val annotations = "$annotationGroup:javax.annotation-api:1.3.2"
const val servletApi = "javax.servlet:javax.servlet-api:3.1.0"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Klaxon.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Klaxon.kt
similarity index 83%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/Klaxon.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/lib/Klaxon.kt
index 58fc9a3..69089c6 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Klaxon.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Klaxon.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,14 +24,15 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.lib
/**
- * A JSON parser in Kotlin
+ * A JSON parser in Kotlin.
*
* [Klaxon](https://github.com/cbeust/klaxon)
*/
+@Suppress("unused", "ConstPropertyName")
object Klaxon {
private const val version = "5.6"
- const val lib = "com.beust:klaxon:${version}"
+ const val lib = "com.beust:klaxon:$version"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/lib/Kotlin.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Kotlin.kt
new file mode 100644
index 0000000..dc34b50
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Kotlin.kt
@@ -0,0 +1,90 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.lib
+
+// https://github.com/JetBrains/kotlin
+// https://github.com/Kotlin
+@Suppress("unused", "ConstPropertyName")
+object Kotlin {
+
+ /**
+ * This is the version of Kotlin we use for writing code which does not
+ * depend on Gradle and the version of embedded Kotlin.
+ */
+ @Suppress("MemberVisibilityCanBePrivate") // used directly from the outside.
+ const val runtimeVersion = "2.1.10"
+
+ /**
+ * This is the version of
+ * [Kotlin embedded into Gradle](https://docs.gradle.org/current/userguide/compatibility.html#kotlin).
+ */
+ const val embeddedVersion = "2.0.21"
+
+ /**
+ * The version of the JetBrains annotations library, which is a transitive
+ * dependency for us via Kotlin libraries.
+ *
+ * @see Java Annotations
+ */
+ private const val annotationsVersion = "24.0.1"
+
+ private const val group = "org.jetbrains.kotlin"
+
+ const val scriptRuntime = "$group:kotlin-script-runtime:$runtimeVersion"
+ const val stdLib = "$group:kotlin-stdlib:$runtimeVersion"
+ const val stdLibCommon = "$group:kotlin-stdlib-common:$runtimeVersion"
+
+ const val toolingCore = "$group:kotlin-tooling-core:$runtimeVersion"
+
+ @Deprecated("Please use `stdLib` instead.")
+ const val stdLibJdk7 = "$group:kotlin-stdlib-jdk7:$runtimeVersion"
+
+ @Deprecated("Please use `stdLib` instead.")
+ const val stdLibJdk8 = "$group:kotlin-stdlib-jdk8:$runtimeVersion"
+
+ const val reflect = "$group:kotlin-reflect:$runtimeVersion"
+ const val testJUnit5 = "$group:kotlin-test-junit5:$runtimeVersion"
+
+ @Deprecated(message = "Please use `GradlePlugin.api` instead.", ReplaceWith("GradlePlugin.api"))
+ const val gradlePluginApi = "$group:kotlin-gradle-plugin-api:$runtimeVersion"
+
+ @Deprecated(message = "Please use `GradlePlugin.lib` instead.", ReplaceWith("GradlePlugin.lib"))
+ const val gradlePluginLib = "$group:kotlin-gradle-plugin:$runtimeVersion"
+
+ const val jetbrainsAnnotations = "org.jetbrains:annotations:$annotationsVersion"
+
+ object Compiler {
+ const val embeddable = "$group:kotlin-compiler-embeddable:$runtimeVersion"
+ }
+
+ object GradlePlugin {
+ const val version = Kotlin.runtimeVersion
+ const val api = "$group:kotlin-gradle-plugin-api:$version"
+ const val lib = "$group:kotlin-gradle-plugin:$version"
+ const val model = "$group:kotlin-gradle-model:$version"
+ }
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/lib/KotlinPoet.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/KotlinPoet.kt
new file mode 100644
index 0000000..346c5d8
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/KotlinPoet.kt
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.lib
+
+// https://github.com/square/kotlinpoet
+@Suppress("unused", "ConstPropertyName")
+object KotlinPoet {
+ private const val version = "2.0.0"
+ const val lib = "com.squareup:kotlinpoet:$version"
+ const val ksp = "com.squareup:kotlinpoet-ksp:$version"
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/KotlinSemver.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/KotlinSemver.kt
similarity index 85%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/KotlinSemver.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/lib/KotlinSemver.kt
index ddf8d73..1525360 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/KotlinSemver.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/KotlinSemver.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,11 +24,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.lib
// https://github.com/z4kn4fein/kotlin-semver
-@Suppress("unused")
+@Suppress("unused", "ConstPropertyName")
object KotlinSemver {
- private const val version = "1.2.1"
+ private const val version = "1.4.2"
const val lib = "io.github.z4kn4fein:semver:$version"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/lib/KotlinX.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/KotlinX.kt
new file mode 100644
index 0000000..a58dee3
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/KotlinX.kt
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.lib
+
+@Suppress("unused", "ConstPropertyName")
+object KotlinX {
+
+ const val group = "org.jetbrains.kotlinx"
+
+ object Coroutines {
+
+ // https://github.com/Kotlin/kotlinx.coroutines
+ const val version = "1.10.1"
+ const val bom = "$group:kotlinx-coroutines-bom:$version"
+ const val core = "$group:kotlinx-coroutines-core:$version"
+ const val coreJvm = "$group:kotlinx-coroutines-core-jvm:$version"
+ const val jdk8 = "$group:kotlinx-coroutines-jdk8:$version"
+ const val test = "$group:kotlinx-coroutines-test:$version"
+ }
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/lib/Log4j2.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Log4j2.kt
new file mode 100644
index 0000000..d4f2bd2
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Log4j2.kt
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.lib
+
+/**
+ * An open-source logging framework.
+ *
+ * Spine uses its own [logging library][io.spine.dependency.local.Logging], but also
+ * provides a backend implementation for [Log4j2]. This is why
+ * this dependency is needed.
+ *
+ * @see Log4j2 releases at GitHub
+ */
+@Suppress("unused", "ConstPropertyName")
+object Log4j2 {
+ private const val version = "2.20.0"
+ const val core = "org.apache.logging.log4j:log4j-core:$version"
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Netty.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Netty.kt
similarity index 67%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/Netty.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/lib/Netty.kt
index 6af6070..c317bb3 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Netty.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Netty.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,15 +24,15 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.lib
-@Suppress("unused")
+@Suppress("unused", "ConstPropertyName")
object Netty {
- // https://github.com/netty/netty/releases
- private const val version = "4.1.72.Final"
- const val common = "io.netty:netty-common:${version}"
- const val buffer = "io.netty:netty-buffer:${version}"
- const val transport = "io.netty:netty-transport:${version}"
- const val handler = "io.netty:netty-handler:${version}"
- const val codecHttp = "io.netty:netty-codec-http:${version}"
+ // https://github.com/netty/netty/tags
+ private const val version = "4.1.100.Final"
+ const val common = "io.netty:netty-common:$version"
+ const val buffer = "io.netty:netty-buffer:$version"
+ const val transport = "io.netty:netty-transport:$version"
+ const val handler = "io.netty:netty-handler:$version"
+ const val codecHttp = "io.netty:netty-codec-http:$version"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/lib/Okio.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Okio.kt
new file mode 100644
index 0000000..3107d76
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Okio.kt
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.lib
+
+/**
+ * Okio is a transitive dependency, which we don't use directly.
+ *
+ * https://github.com/square/okio/tags
+ */
+@Suppress("unused", "ConstPropertyName")
+object Okio {
+ private const val version = "3.6.0"
+ const val lib = "com.squareup.okio:okio:$version"
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/lib/Plexus.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Plexus.kt
new file mode 100644
index 0000000..e393906
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Plexus.kt
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.
+ */
+
+@file:Suppress("MaxLineLength")
+
+package io.spine.dependency.lib
+
+/**
+ * Plexus Utils is a transitive dependency, which we don't use directly.
+ *
+ * [Plexus Utils](https://github.com/codehaus-plexus/plexus-utils)
+ */
+@Suppress("unused", "ConstPropertyName")
+object Plexus {
+
+ /**
+ * This is the last version in the 3.x series.
+ *
+ * There's a major update to 4.x.
+ *
+ * @see plexus-utils-4.0.0
+ */
+ private const val version = "4.0.0"
+ const val utils = "org.codehaus.plexus:plexus-utils:$version"
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Protobuf.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Protobuf.kt
similarity index 61%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/Protobuf.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/lib/Protobuf.kt
index 353317c..98ce188 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Protobuf.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Protobuf.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,30 +24,48 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.lib
// https://github.com/protocolbuffers/protobuf
-@Suppress("MemberVisibilityCanBePrivate") // used directly from outside
+@Suppress(
+ "MemberVisibilityCanBePrivate" /* used directly from the outside */,
+ "ConstPropertyName" /* https://bit.ly/kotlin-prop-names */
+)
object Protobuf {
- private const val group = "com.google.protobuf"
- const val version = "3.22.2"
+ 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
+
+ /**
+ * All Java and Kotlin libraries we depend on.
+ */
val libs = listOf(
- "${group}:protobuf-java:${version}",
- "${group}:protobuf-java-util:${version}",
- "${group}:protobuf-kotlin:${version}"
+ javaLib,
+ "$group:protobuf-java-util:$version",
+ "$group:protobuf-kotlin:$version"
)
- const val compiler = "${group}:protoc:${version}"
+ const val compiler = "$group:protoc:$version"
// https://github.com/google/protobuf-gradle-plugin/releases
object GradlePlugin {
/**
* The version of this plugin is already specified in `buildSrc/build.gradle.kts` file.
- * Thus, when applying the plugin in projects build files, only the [id] should be used.
+ * Thus, when applying the plugin to projects build files, only the [id] should be used.
*
* When changing the version, also change the version used in the `build.gradle.kts`.
*/
- const val version = "0.9.2"
+ const val version = "0.9.4"
const val id = "com.google.protobuf"
- const val lib = "${group}:protobuf-gradle-plugin:${version}"
+ const val lib = "$group:protobuf-gradle-plugin:$version"
}
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Roaster.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Roaster.kt
similarity index 65%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/Roaster.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/lib/Roaster.kt
index 33e4595..e55420e 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Roaster.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Roaster.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,21 +24,22 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.lib
// https://github.com/forge/roaster
-@Suppress("unused")
+@Suppress("unused", "ConstPropertyName")
object Roaster {
/**
- * Do not advance this version further because it would break compatibility with Java 8
- * projects. Starting from the following version Roaster has a shaded version of Eclipse JFace
- * built with Java 11.
+ * This is the last version build with Java 11.
*
- * Please see [this issue][https://github.com/SpineEventEngine/config/issues/220] for details.
+ * Starting from the version
+ * [2.29.0.Final](https://github.com/forge/roaster/releases/tag/2.29.0.Final),
+ * Roaster requires Java 17.
*/
- private const val version = "2.24.0.Final"
+ private const val version = "2.28.0.Final"
- const val api = "org.jboss.forge.roaster:roaster-api:${version}"
- const val jdt = "org.jboss.forge.roaster:roaster-jdt:${version}"
+ const val group = "org.jboss.forge.roaster"
+ const val api = "$group:roaster-api:$version"
+ const val jdt = "$group:roaster-jdt:$version"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Slf4J.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Slf4J.kt
similarity index 74%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/Slf4J.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/lib/Slf4J.kt
index 67e461c..bd5b9df 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Slf4J.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Slf4J.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.lib
/**
* Spine used to log with SLF4J. Now we use Flogger. Whenever a choice comes up, we recommend to
@@ -33,14 +33,15 @@ package io.spine.internal.dependency
* The primary purpose of having this dependency object is working in combination with
* [Flogger.Runtime.slf4JBackend].
*
- * Some third-party libraries may clash with different versions of the library. Thus, we specify
- * this version and force it via [io.spine.internal.gradle.forceVersions].
+ * Some third-party libraries may clash with different versions of the library.
+ * Thus, we specify this version and force it via [forceVersions].
+ * Please see `DependencyResolution.kt` for details.
*/
-@Suppress("unused")
+@Suppress("unused", "ConstPropertyName")
object Slf4J {
private const val version = "2.0.7"
- const val lib = "org.slf4j:slf4j-api:${version}"
- const val jdk14 = "org.slf4j:slf4j-jdk14:${version}"
- const val reload4j = "org.slf4j:slf4j-reload4j:${version}"
- const val simple = "org.slf4j:slf4j-simple:${version}"
+ const val lib = "org.slf4j:slf4j-api:$version"
+ const val jdk14 = "org.slf4j:slf4j-jdk14:$version"
+ const val reload4j = "org.slf4j:slf4j-reload4j:$version"
+ const val simple = "org.slf4j:slf4j-simple:$version"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/ArtifactVersion.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/ArtifactVersion.kt
new file mode 100644
index 0000000..77497b2
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/ArtifactVersion.kt
@@ -0,0 +1,137 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.local
+
+/**
+ * Versions for published Spine SDK artifacts.
+ */
+@Suppress("ConstPropertyName")
+object ArtifactVersion {
+
+ /**
+ * The version of [Spine.base].
+ *
+ * @see spine-base
+ */
+ @Deprecated(message = "Please use `Base.version`.", ReplaceWith("Base.version"))
+ const val base = Base.version
+
+ @Suppress("unused")
+ @Deprecated(
+ message = "Please use `Base.versionForBuildScript`.",
+ ReplaceWith("Base.versionForBuildScript")
+ )
+ const val baseForBuildScript = Base.versionForBuildScript
+
+ /**
+ * The version of [Spine.reflect].
+ *
+ * @see spine-reflect
+ */
+ @Deprecated(message = "Please use `Reflect.version`.", ReplaceWith("Reflect.version"))
+ const val reflect = Reflect.version
+
+ /**
+ * The version of [Logging].
+ */
+ @Deprecated(message = "Please use `Logging.version`.", ReplaceWith("Logging.version"))
+ const val logging = Logging.version
+
+ /**
+ * The version of [Spine.testlib].
+ *
+ * @see spine-testlib
+ */
+ @Deprecated(message = "Please use `TestLib.version`.", ReplaceWith("TestLib.version"))
+ const val testlib = TestLib.version
+
+ /**
+ * The version of `core-java`.
+ */
+ @Deprecated(message = "Please use `CoreJava.version`.", ReplaceWith("CoreJava.version"))
+ const val core = CoreJava.version
+
+ /**
+ * The version of [Spine.modelCompiler].
+ *
+ * @see spine-model-compiler
+ */
+ @Suppress("unused")
+ @Deprecated(
+ message = "Please use `ModelCompiler.version` instead.",
+ ReplaceWith("ModelCompiler.version")
+ )
+ const val mc = ModelCompiler.version
+
+ /**
+ * The version of [Spine.baseTypes].
+ *
+ * @see spine-base-types
+ */
+ @Deprecated(message = "Please use `BaseTypes.version`.", ReplaceWith("BaseTypes.version"))
+ const val baseTypes = BaseTypes.version
+
+ /**
+ * The version of [Spine.time].
+ *
+ * @see spine-time
+ */
+ @Deprecated(message = "Please use `Time.version`.", ReplaceWith("Time.version"))
+ const val time = Time.version
+
+ /**
+ * The version of [Spine.change].
+ *
+ * @see spine-change
+ */
+ @Deprecated(message = "Please use `Change.version`.", ReplaceWith("Change.version"))
+ const val change = Change.version
+
+ /**
+ * The version of [Spine.text].
+ *
+ * @see spine-text
+ */
+ @Deprecated(message = "Please use `Text.version`.", ReplaceWith("Text.version"))
+ const val text = Text.version
+
+ /**
+ * The version of [Spine.toolBase].
+ *
+ * @see spine-tool-base
+ */
+ @Suppress("unused")
+ @Deprecated(message = "Please use `ToolBase.version`.", ReplaceWith("ToolBase.version"))
+ const val toolBase = ToolBase.version
+
+ /**
+ * The version of [Spine.javadocFilter].
+ *
+ * @see spine-javadoc-tools
+ */
+ const val javadocTools = "2.0.0-SNAPSHOT.75"
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/Base.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/Base.kt
new file mode 100644
index 0000000..bcc3530
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/Base.kt
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.local
+
+/**
+ * Spine Base module.
+ *
+ * @see spine-base
+ */
+@Suppress("ConstPropertyName")
+object Base {
+ const val version = "2.0.0-SNAPSHOT.301"
+ const val versionForBuildScript = "2.0.0-SNAPSHOT.300"
+ const val group = Spine.group
+ const val artifact = "spine-base"
+ const val lib = "$group:$artifact:$version"
+ const val libForBuildScript = "$group:$artifact:$versionForBuildScript"
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/BaseTypes.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/BaseTypes.kt
new file mode 100644
index 0000000..988cab3
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/BaseTypes.kt
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.local
+
+/**
+ * Spine Base module.
+ *
+ * @see spine-base-types
+ */
+@Suppress("ConstPropertyName")
+object BaseTypes {
+ const val version = "2.0.0-SNAPSHOT.126"
+ const val group = Spine.group
+ const val artifact = "spine-base-types"
+ const val lib = "$group:$artifact:$version"
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Plexus.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/Change.kt
similarity index 71%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/Plexus.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/local/Change.kt
index 52d08ea..a5728f7 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Plexus.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/Change.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,15 +24,17 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.local
/**
- * Plexus Utils is a transitive dependency which we don't use directly.
- * We `force` it in [DependencyResolution.forceConfiguration].
+ * Spine Reflect library.
*
- * [Plexus Utils](https://codehaus-plexus.github.io/plexus-utils/)
+ * @see spine-change
*/
-object Plexus {
- private const val version = "3.4.0"
- const val utils = "org.codehaus.plexus:plexus-utils:${version}"
+@Suppress("ConstPropertyName")
+object Change {
+ const val version = "2.0.0-SNAPSHOT.118"
+ const val group = Spine.group
+ const val artifact = "spine-change"
+ const val lib = "$group:$artifact:$version"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJava.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJava.kt
new file mode 100644
index 0000000..01dad32
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJava.kt
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.local
+
+/**
+ * Dependencies on `core-java` modules.
+ *
+ * See [`SpineEventEngine/core-java`](https://github.com/SpineEventEngine/core-java/).
+ */
+@Suppress("ConstPropertyName", "unused")
+object CoreJava {
+ const val group = Spine.group
+ const val version = "2.0.0-SNAPSHOT.201"
+
+ const val coreArtifact = "spine-core"
+ const val clientArtifact = "spine-client"
+ const val serverArtifact = "spine-server"
+
+ const val core = "$group:$coreArtifact:$version"
+ const val client = "$group:$clientArtifact:$version"
+ const val server = "$group:$serverArtifact:$version"
+
+ const val testUtilServer = "${Spine.toolsGroup}:spine-testutil-server:$version"
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/Logging.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/Logging.kt
new file mode 100644
index 0000000..b1a00ab
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/Logging.kt
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.local
+
+/**
+ * Dependencies on the artifacts of the Spine Logging library.
+ *
+ * @see spine-logging
+ */
+@Suppress("ConstPropertyName", "unused")
+object Logging {
+ const val version = "2.0.0-SNAPSHOT.242"
+ const val group = Spine.group
+
+ const val loggingArtifact = "spine-logging"
+
+ const val lib = "$group:$loggingArtifact:$version"
+ const val libJvm = "$group:spine-logging-jvm:$version"
+
+ const val log4j2Backend = "$group:spine-logging-log4j2-backend:$version"
+ const val stdContext = "$group:spine-logging-std-context:$version"
+ const val grpcContext = "$group:spine-logging-grpc-context:$version"
+ const val smokeTest = "$group:spine-logging-smoke-test:$version"
+
+ const val testLib = "${Spine.toolsGroup}:spine-logging-testlib:$version"
+
+ // Transitive dependencies.
+ // Make `public` and use them to force a version in a particular repository, if needed.
+ internal const val julBackend = "$group:spine-logging-jul-backend:$version"
+ const val middleware = "$group:spine-logging-middleware:$version"
+ internal const val platformGenerator = "$group:spine-logging-platform-generator:$version"
+ internal const val jvmDefaultPlatform = "$group:spine-logging-jvm-default-platform:$version"
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/McJava.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/McJava.kt
new file mode 100644
index 0000000..1bb19a1
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/McJava.kt
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.local
+
+/**
+ * Dependencies on Spine Model Compiler for Java.
+ *
+ * See [mc-java](https://github.com/SpineEventEngine/mc-java).
+ */
+@Suppress(
+ "MemberVisibilityCanBePrivate" /* `pluginLib()` is used by subprojects. */,
+ "ConstPropertyName",
+ "unused"
+)
+object McJava {
+ const val group = Spine.toolsGroup
+
+ /**
+ * The version used to in the build classpath.
+ */
+ const val dogfoodingVersion = "2.0.0-SNAPSHOT.266"
+
+ /**
+ * The version to be used for integration tests.
+ */
+ const val version = "2.0.0-SNAPSHOT.266"
+
+ /**
+ * The ID of the Gradle plugin.
+ */
+ const val pluginId = "io.spine.mc-java"
+
+ /**
+ * The library with the [dogfoodingVersion].
+ */
+ val pluginLib = pluginLib(dogfoodingVersion)
+
+ /**
+ * The library with the given [version].
+ */
+ fun pluginLib(version: String): String = "$group:spine-mc-java-plugins:$version:all"
+
+ /** The artifact reference for forcing in configurations. */
+ const val pluginsArtifact: String = "$group:spine-mc-java-plugins:$version"
+
+ /**
+ * The `mc-java-base` artifact with the [version].
+ */
+ val base = base(version)
+
+ /**
+ * The `mc-java-base` artifact with the given [version].
+ */
+ fun base(version: String): String = "$group:spine-mc-java-base:$version"
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/ModelCompiler.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/ModelCompiler.kt
new file mode 100644
index 0000000..5f9e541
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/ModelCompiler.kt
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.local
+
+/**
+ * Spine Model Compiler Gradle API.
+ *
+ * @see spine-model-compiler
+ */
+@Suppress("ConstPropertyName")
+object ModelCompiler {
+ const val version = "2.0.0-SNAPSHOT.133"
+ const val group = Spine.toolsGroup
+ const val artifact = "spine-model-compiler"
+ const val lib = "$group:$artifact:$version"
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/ProtoData.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/ProtoData.kt
new file mode 100644
index 0000000..d55e630
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/ProtoData.kt
@@ -0,0 +1,179 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.local
+
+/**
+ * Dependencies on ProtoData modules.
+ *
+ * To use a locally published ProtoData version instead of the version from a public plugin
+ * registry, set the `PROTODATA_VERSION` and/or the `PROTODATA_DF_VERSION` environment variables
+ * and stop the Gradle daemons so that Gradle observes the env change:
+ * ```
+ * export PROTODATA_VERSION=0.43.0-local
+ * export PROTODATA_DF_VERSION=0.41.0
+ *
+ * ./gradle --stop
+ * ./gradle build # Conduct the intended checks.
+ * ```
+ *
+ * Then, to reset the console to run the usual versions again, remove the values of
+ * the environment variables and stop the daemon:
+ * ```
+ * export PROTODATA_VERSION=""
+ * export PROTODATA_DF_VERSION=""
+ *
+ * ./gradle --stop
+ * ```
+ *
+ * See [`SpineEventEngine/ProtoData`](https://github.com/SpineEventEngine/ProtoData/).
+ */
+@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. */,
+ "KDocUnresolvedReference" /* Referencing private properties in constructor KDoc. */
+)
+object ProtoData {
+ const val pluginGroup = Spine.group
+ const val group = "io.spine.protodata"
+ const val pluginId = "io.spine.protodata"
+
+ /**
+ * Identifies ProtoData as a `classpath` dependency under `buildScript` block.
+ *
+ * The dependency is obtained from https://plugins.gradle.org/m2/.
+ */
+ const val module = "io.spine:protodata"
+
+ /**
+ * The version of ProtoData dependencies.
+ */
+ val version: String
+ private const val fallbackVersion = "0.92.11"
+
+ /**
+ * The distinct version of ProtoData used by other build tools.
+ *
+ * When ProtoData is used both for building the project and as a part of the Project's
+ * transitional dependencies, this is the version used to build the project itself.
+ */
+ val dogfoodingVersion: String
+ private const val fallbackDfVersion = "0.92.11"
+
+ /**
+ * The artifact for the ProtoData Gradle plugin.
+ */
+ val pluginLib: String
+
+ /**
+ * The artifact to be used during experiments when publishing locally.
+ *
+ * @see ProtoData
+ */
+ private fun pluginLib(version: String): String =
+ "$group:gradle-plugin:$version"
+
+ fun api(version: String): String =
+ "$group:protodata-api:$version"
+
+ val api
+ get() = api(version)
+
+ val backend
+ get() = "$group:protodata-backend:$version"
+
+ val params
+ get() = "$group:protodata-params:$version"
+
+ val protocPlugin
+ get() = "$group:protodata-protoc:$version"
+
+ val gradleApi
+ get() = "$group:protodata-gradle-api:$version"
+
+ val cliApi
+ get() = "$group:protodata-cli-api:$version"
+
+ val javaModule = "$group:protodata-java"
+
+ fun java(version: String): String =
+ "$javaModule:$version"
+
+ val java
+ get() = java(version)
+
+ val fatCli
+ get() = "$group:protodata-fat-cli:$version"
+
+ val testlib
+ get() = "$group:protodata-testlib:$version"
+
+ /**
+ * An env variable storing a custom [version].
+ */
+ private const val VERSION_ENV = "PROTODATA_VERSION"
+
+ /**
+ * An env variable storing a custom [dogfoodingVersion].
+ */
+ private const val DF_VERSION_ENV = "PROTODATA_DF_VERSION"
+
+ /**
+ * Sets up the versions and artifacts for the build to use.
+ *
+ * If either [VERSION_ENV] or [DF_VERSION_ENV] is set, those versions are used instead of
+ * the hardcoded ones. Also, in this mode, the [pluginLib] coordinates are changed so that
+ * it points at a locally published artifact. Otherwise, it points at an artifact that would be
+ * published to a public plugin registry.
+ */
+ init {
+ val experimentVersion = System.getenv(VERSION_ENV)
+ val experimentDfVersion = System.getenv(DF_VERSION_ENV)
+ if (experimentVersion?.isNotBlank() == true || experimentDfVersion?.isNotBlank() == true) {
+ version = experimentVersion ?: fallbackVersion
+ dogfoodingVersion = experimentDfVersion ?: fallbackDfVersion
+
+ pluginLib = pluginLib(version)
+ println("""
+
+ ❗ Running an experiment with ProtoData. ❗
+ -----------------------------------------
+ Regular version = v$version
+ Dogfooding version = v$dogfoodingVersion
+
+ ProtoData Gradle plugin can now be loaded from Maven Local.
+
+ To reset the versions, erase the `$$VERSION_ENV` and `$$DF_VERSION_ENV` environment variables.
+
+ """.trimIndent())
+ } else {
+ version = fallbackVersion
+ dogfoodingVersion = fallbackDfVersion
+ pluginLib = "$pluginGroup:protodata:$version"
+ }
+ }
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/ProtoTap.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/ProtoTap.kt
new file mode 100644
index 0000000..c811e58
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/ProtoTap.kt
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.local
+
+/**
+ * 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.9.1"
+ 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"
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/Reflect.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/Reflect.kt
new file mode 100644
index 0000000..fbf37f1
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/Reflect.kt
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.local
+
+/**
+ * Spine Reflect library.
+ *
+ * @see spine-reflect
+ */
+@Suppress("ConstPropertyName")
+object Reflect {
+ const val version = "2.0.0-SNAPSHOT.191"
+ const val group = Spine.group
+ const val artifact = "spine-reflect"
+ const val lib = "$group:$artifact:$version"
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/Spine.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/Spine.kt
new file mode 100644
index 0000000..d7b6d0c
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/Spine.kt
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.local
+
+/**
+ * Dependencies on smaller Spine modules.
+ */
+@Suppress("unused", "ConstPropertyName")
+object Spine {
+
+ const val group = "io.spine"
+ const val toolsGroup = "io.spine.tools"
+
+ @Deprecated(message = "Please use `Base.lib`.", ReplaceWith("Base.lib"))
+ const val base = Base.lib
+
+ @Deprecated(
+ message = "Please use `Base.libForBuildScript`.",
+ ReplaceWith("Base.libForBuildScript")
+ )
+ const val baseForBuildScript = Base.libForBuildScript
+
+ @Deprecated(message = "Please use `Reflect.lib`.", ReplaceWith("Reflect.lib"))
+ const val reflect = Reflect.lib
+
+ @Deprecated(message = "Please use `BaseTypes.lib`.", ReplaceWith("BaseTypes.lib"))
+ const val baseTypes = BaseTypes.lib
+
+ @Deprecated(message = "Please use `Time.lib`.", ReplaceWith("Time.lib"))
+ const val time = Time.lib
+
+ @Deprecated(message = "Please use `Change.lib`.", ReplaceWith("Change.lib"))
+ const val change = Change.lib
+
+ @Deprecated(message = "Please use `Text.lib`.", ReplaceWith("Text.lib"))
+ const val text = Text.lib
+
+ @Deprecated(message = "Please use `TestLib.lib`.", ReplaceWith("TestLib.lib"))
+ const val testlib = TestLib.lib
+
+ @Deprecated(message = "Please use `Time.testLib`.", ReplaceWith("Time.testLib"))
+ const val testUtilTime = Time.testLib
+
+ @Deprecated(message = "Please use `ToolBase.psiJava` instead`.")
+ const val psiJava = "$toolsGroup:spine-psi-java:${ToolBase.version}"
+
+ @Deprecated(
+ message = "Please use `ToolBase.psiJava` instead`.",
+ ReplaceWith("ToolBase.psiJava")
+ )
+ const val psiJavaBundle = "$toolsGroup:spine-psi-java-bundle:${ToolBase.version}"
+
+ @Deprecated(message = "Please use `ToolBase.lib` instead`.", ReplaceWith("ToolBase.lib"))
+ const val toolBase = "$toolsGroup:spine-tool-base:${ToolBase.version}"
+
+ @Deprecated(
+ message = "Please use `ToolBase.pluginBase` instead`.",
+ ReplaceWith("ToolBase.pluginBase")
+ )
+ const val pluginBase = "$toolsGroup:spine-plugin-base:${ToolBase.version}"
+
+ @Deprecated(
+ message = "Please use `ToolBase.pluginTestlib` instead`.",
+ ReplaceWith("ToolBase.pluginTestlib")
+ )
+ const val pluginTestlib = ToolBase.pluginTestlib
+
+ @Deprecated(
+ message = "Please use `ModelCompiler.lib` instead.",
+ ReplaceWith("ModelCompiler.lib")
+ )
+ const val modelCompiler = ModelCompiler.lib
+
+ @Deprecated(
+ message = "Please use top level `McJava` object instead.",
+ ReplaceWith("McJava", "io.spine.dependency.local.McJava")
+ )
+ val McJava = io.spine.dependency.local.McJava
+
+ const val javadocFilter = "$toolsGroup:spine-javadoc-filter:${ArtifactVersion.javadocTools}"
+
+ @Deprecated(
+ message = "Please use top level `CoreJava.client` object instead.",
+ ReplaceWith("CoreJava.client", "io.spine.dependency.local.CoreJava")
+ )
+ const val client = CoreJava.client
+
+ @Deprecated(
+ message = "Please use top level `CoreJava.server` object instead.",
+ ReplaceWith("CoreJava.server", "io.spine.dependency.local.CoreJava")
+ )
+ const val server = CoreJava.server
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/TestLib.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/TestLib.kt
new file mode 100644
index 0000000..e7e6534
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/TestLib.kt
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.local
+
+/**
+ * Spine TestLib library.
+ *
+ * @see spine-testlib
+ */
+@Suppress("ConstPropertyName")
+object TestLib {
+ const val version = "2.0.0-SNAPSHOT.185"
+ const val group = Spine.toolsGroup
+ const val artifact = "spine-testlib"
+ const val lib = "$group:$artifact:$version"
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/Text.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/Text.kt
new file mode 100644
index 0000000..216ec13
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/Text.kt
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.local
+
+/**
+ * Spine Reflect library.
+ *
+ * @see spine-text
+ */
+@Suppress("ConstPropertyName")
+object Text {
+ const val version = "2.0.0-SNAPSHOT.6"
+ const val group = Spine.group
+ const val artifact = "spine-text"
+ const val lib = "$group:$artifact:$version"
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/Time.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/Time.kt
new file mode 100644
index 0000000..56518ec
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/Time.kt
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.local
+
+/**
+ * Spine Time library.
+ *
+ * @see spine-time
+ */
+@Suppress("ConstPropertyName")
+object Time {
+ const val version = "2.0.0-SNAPSHOT.136"
+ const val group = Spine.group
+ const val artifact = "spine-time"
+ const val lib = "$group:$artifact:$version"
+
+ const val testLib = "${Spine.toolsGroup}:spine-time-testlib:$version"
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/ToolBase.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/ToolBase.kt
new file mode 100644
index 0000000..1227a32
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/ToolBase.kt
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.local
+
+/**
+ * Artifacts of the `tool-base` module.
+ *
+ * @see spine-tool-base
+ */
+@Suppress("ConstPropertyName", "unused")
+object ToolBase {
+ const val group = Spine.toolsGroup
+ const val version = "2.0.0-SNAPSHOT.300"
+
+ const val lib = "$group:spine-tool-base:$version"
+ const val pluginBase = "$group:spine-plugin-base:$version"
+ const val pluginTestlib = "$group:spine-plugin-testlib:$version"
+
+ const val intellijPlatformJava = "$group:intellij-platform-java:$version"
+
+ const val psiJava = "$group:spine-psi-java:$version"
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Validation.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/Validation.kt
similarity index 60%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/Validation.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/local/Validation.kt
index 11bc5d4..ce2ed04 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Validation.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/Validation.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,18 +24,34 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.local
/**
* Dependencies on Spine Validation SDK.
*
* See [`SpineEventEngine/validation`](https://github.com/SpineEventEngine/validation/).
*/
+@Suppress("ConstPropertyName", "unused")
object Validation {
- const val version = "2.0.0-SNAPSHOT.81"
+ /**
+ * The version of the Validation library artifacts.
+ */
+ const val version = "2.0.0-SNAPSHOT.301"
+
const val group = "io.spine.validation"
- const val runtime = "$group:spine-validation-java-runtime:$version"
- const val java = "$group:spine-validation-java:$version"
- const val model = "$group:spine-validation-model:$version"
- const val config = "$group:spine-validation-configuration:$version"
+ private const val prefix = "spine-validation"
+
+ const val runtimeModule = "$group:$prefix-java-runtime"
+ const val runtime = "$runtimeModule:$version"
+ const val java = "$group:$prefix-java:$version"
+
+ const val javaBundleModule = "$group:$prefix-java-bundle"
+
+ /** Obtains the artifact for the `java-bundle` artifact of the given version. */
+ fun javaBundle(version: String) = "$javaBundleModule:$version"
+
+ val javaBundle = javaBundle(version)
+
+ const val model = "$group:$prefix-model:$version"
+ const val config = "$group:$prefix-configuration:$version"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/AssertK.kt b/buildSrc/src/main/kotlin/io/spine/dependency/test/AssertK.kt
similarity index 83%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/AssertK.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/test/AssertK.kt
index eb52178..b9a554b 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/AssertK.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/test/AssertK.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,15 +24,16 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.test
/**
* Assertion library for tests in Kotlin
*
* [AssertK](https://github.com/willowtreeapps/assertk)
*/
-@Suppress("unused")
+@Deprecated("Please use Kotest assertions instead.")
+@Suppress("unused", "ConstPropertyName")
object AssertK {
- private const val version = "0.25"
- const val libJvm = "com.willowtreeapps.assertk:assertk-jvm:${version}"
+ private const val version = "0.26.1"
+ const val libJvm = "com.willowtreeapps.assertk:assertk-jvm:$version"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/test/Hamcrest.kt b/buildSrc/src/main/kotlin/io/spine/dependency/test/Hamcrest.kt
new file mode 100644
index 0000000..c2dcfe2
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/test/Hamcrest.kt
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.test
+
+/**
+ * The dependency on the Hamcrest, which is transitive for us.
+ *
+ * If you need assertions in Java, please use Google [Truth] instead.
+ * For Kotlin, please use [Kotest].
+ */
+@Suppress("unused", "ConstPropertyName")
+object Hamcrest {
+ // https://github.com/hamcrest/JavaHamcrest/releases
+ private const val version = "2.2"
+ const val core = "org.hamcrest:hamcrest-core:$version"
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/JUnit.kt b/buildSrc/src/main/kotlin/io/spine/dependency/test/JUnit.kt
similarity index 60%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/JUnit.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/test/JUnit.kt
index 27690b3..c410b42 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/JUnit.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/test/JUnit.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,42 +24,37 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.test
// https://junit.org/junit5/
-@Suppress("unused")
+@Suppress("unused", "ConstPropertyName")
object JUnit {
- const val version = "5.9.3"
- private const val legacyVersion = "4.13.1"
+ const val version = "5.10.0"
+ private const val legacyVersion = "4.13.1"
// https://github.com/apiguardian-team/apiguardian
private const val apiGuardianVersion = "1.1.2"
+
// https://github.com/junit-pioneer/junit-pioneer
- private const val pioneerVersion = "2.0.1"
+ private const val pioneerVersion = "2.0.1"
- const val legacy = "junit:junit:${legacyVersion}"
+ const val legacy = "junit:junit:$legacyVersion"
val api = listOf(
- "org.apiguardian:apiguardian-api:${apiGuardianVersion}",
- "org.junit.jupiter:junit-jupiter-api:${version}",
- "org.junit.jupiter:junit-jupiter-params:${version}"
+ "org.apiguardian:apiguardian-api:$apiGuardianVersion",
+ "org.junit.jupiter:junit-jupiter-api:$version",
+ "org.junit.jupiter:junit-jupiter-params:$version"
)
- const val bom = "org.junit:junit-bom:${version}"
-
- const val runner = "org.junit.jupiter:junit-jupiter-engine:${version}"
- const val params = "org.junit.jupiter:junit-jupiter-params:${version}"
-
- const val pioneer = "org.junit-pioneer:junit-pioneer:${pioneerVersion}"
+ const val bom = "org.junit:junit-bom:$version"
- @Deprecated("Please use `Platform.commons`.")
- const val platformCommons = "${Platform.group}:junit-platform-commons:${Platform.version}"
+ const val runner = "org.junit.jupiter:junit-jupiter-engine:$version"
+ const val params = "org.junit.jupiter:junit-jupiter-params:$version"
- @Deprecated("Please use `Platform.launcher`.")
- const val platformLauncher = "${Platform.group}:junit-platform-launcher:${Platform.version}"
+ const val pioneer = "org.junit-pioneer:junit-pioneer:$pioneerVersion"
object Platform {
// https://junit.org/junit5/
- const val version = "1.9.3"
+ const val version = "1.10.0"
internal const val group = "org.junit.platform"
const val commons = "$group:junit-platform-commons:$version"
const val launcher = "$group:junit-platform-launcher:$version"
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/test/Jacoco.kt b/buildSrc/src/main/kotlin/io/spine/dependency/test/Jacoco.kt
new file mode 100644
index 0000000..b883928
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/test/Jacoco.kt
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.test
+
+/**
+ * Code coverage library for Java.
+ *
+ * @see Releases
+ */
+@Suppress("ConstPropertyName")
+object Jacoco {
+ const val version = "0.8.12"
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Kotest.kt b/buildSrc/src/main/kotlin/io/spine/dependency/test/Kotest.kt
similarity index 90%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/Kotest.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/test/Kotest.kt
index 4ad80c4..8de10ff 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Kotest.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/test/Kotest.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -26,15 +26,16 @@
@file:Suppress("unused")
-package io.spine.internal.dependency
+package io.spine.dependency.test
/**
* Testing framework for Kotlin.
*
* @see Kotest site
*/
+@Suppress("unused", "ConstPropertyName")
object Kotest {
- const val version = "5.6.1"
+ const val version = "5.9.1"
const val group = "io.kotest"
const val assertions = "$group:kotest-assertions-core:$version"
const val runnerJUnit5 = "$group:kotest-runner-junit5:$version"
@@ -45,7 +46,7 @@ object Kotest {
// https://plugins.gradle.org/plugin/io.kotest.multiplatform
object MultiplatformGradlePlugin {
- const val version = "5.6.1"
+ const val version = Kotest.version
const val id = "io.kotest.multiplatform"
const val classpath = "$group:kotest-framework-multiplatform-plugin-gradle:$version"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/test/KotlinCompileTesting.kt b/buildSrc/src/main/kotlin/io/spine/dependency/test/KotlinCompileTesting.kt
new file mode 100644
index 0000000..0e9110b
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/test/KotlinCompileTesting.kt
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.test
+
+/**
+ * A library for in-process compilation of Kotlin and Java code compilation.
+ *
+ * @see GitHub repo
+ */
+@Suppress("unused", "ConstPropertyName")
+object KotlinCompileTesting {
+ private const val version = "0.7.0"
+ private const val group = "dev.zacsweers.kctfork"
+ const val libCore = "$group:core:$version"
+ const val libKsp = "$group:ksp:$version"
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Kover.kt b/buildSrc/src/main/kotlin/io/spine/dependency/test/Kover.kt
similarity index 86%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/Kover.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/test/Kover.kt
index 4d487c6..759e21a 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Kover.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/test/Kover.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,11 +24,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.test
// https://github.com/Kotlin/kotlinx-kover
+@Suppress("unused", "ConstPropertyName")
object Kover {
- const val version = "0.7.0-Beta"
+ const val version = "0.7.6"
const val id = "org.jetbrains.kotlinx.kover"
const val classpath = "org.jetbrains.kotlinx:kover-gradle-plugin:$version"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Okio.kt b/buildSrc/src/main/kotlin/io/spine/dependency/test/OpenTest4J.kt
similarity index 73%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/Okio.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/test/OpenTest4J.kt
index f02122d..1e22fb3 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Okio.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/test/OpenTest4J.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,14 +24,15 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.test
/**
- * Okio is a transitive dependency which we don't use directly.
- * We `force` it in [DependencyResolution.forceConfiguration].
+ * The dependency on the OpenTest4j library, which is transitive for us.
*/
-object Okio {
- // This is the last version before next major.
- private const val version = "1.17.5"
- const val lib = "com.squareup.okio:okio:${version}"
+@Suppress("unused", "ConstPropertyName")
+object OpenTest4J {
+
+ // https://github.com/ota4j-team/opentest4j/releases
+ private const val version = "1.3.0"
+ const val lib = "org.opentest4j:opentest4j:$version"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/test/SystemLambda.kt b/buildSrc/src/main/kotlin/io/spine/dependency/test/SystemLambda.kt
new file mode 100644
index 0000000..5f0eef8
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/test/SystemLambda.kt
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.dependency.test
+
+// 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"
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/TestKitTruth.kt b/buildSrc/src/main/kotlin/io/spine/dependency/test/TestKitTruth.kt
similarity index 70%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/TestKitTruth.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/test/TestKitTruth.kt
index 30649dc..bfec211 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/TestKitTruth.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/test/TestKitTruth.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,19 +24,18 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+@file:Suppress("MaxLineLength")
+
+package io.spine.dependency.test
/**
* Gradle TestKit extension for Google Truth.
*
- * Source code:
- * https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin/tree/main/testkit-truth
- *
- * Usage description:
- * https://dev.to/autonomousapps/gradle-all-the-way-down-testing-your-gradle-plugin-with-gradle-testkit-2hmc
+ * @see TestKit source code
+ * @see Usage description
*/
-@Suppress("unused")
+@Suppress("unused", "ConstPropertyName")
object TestKitTruth {
- private const val version = "1.1"
+ private const val version = "1.20.0"
const val lib = "com.autonomousapps:testkit-truth:$version"
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Truth.kt b/buildSrc/src/main/kotlin/io/spine/dependency/test/Truth.kt
similarity index 75%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/Truth.kt
rename to buildSrc/src/main/kotlin/io/spine/dependency/test/Truth.kt
index 2303d5a..f9af032 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Truth.kt
+++ b/buildSrc/src/main/kotlin/io/spine/dependency/test/Truth.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,14 +24,15 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.dependency.test
// https://github.com/google/truth
+@Suppress("unused", "ConstPropertyName")
object Truth {
- private const val version = "1.1.3"
+ private const val version = "1.1.5"
val libs = listOf(
- "com.google.truth:truth:${version}",
- "com.google.truth.extensions:truth-java8-extension:${version}",
- "com.google.truth.extensions:truth-proto-extension:${version}"
+ "com.google.truth:truth:$version",
+ "com.google.truth.extensions:truth-java8-extension:$version",
+ "com.google.truth.extensions:truth-proto-extension:$version"
)
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/markup/MarkdownDocument.kt b/buildSrc/src/main/kotlin/io/spine/docs/MarkdownDocument.kt
similarity index 96%
rename from buildSrc/src/main/kotlin/io/spine/internal/markup/MarkdownDocument.kt
rename to buildSrc/src/main/kotlin/io/spine/docs/MarkdownDocument.kt
index af9154f..23937bd 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/markup/MarkdownDocument.kt
+++ b/buildSrc/src/main/kotlin/io/spine/docs/MarkdownDocument.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.markup
+package io.spine.docs
import java.io.File
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/Build.kt b/buildSrc/src/main/kotlin/io/spine/gradle/Build.kt
similarity index 90%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/Build.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/Build.kt
index f1c0331..327031e 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/Build.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/Build.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle
+package io.spine.gradle
@Suppress("unused")
object Build {
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/Clean.kt b/buildSrc/src/main/kotlin/io/spine/gradle/Clean.kt
similarity index 92%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/Clean.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/Clean.kt
index 1f9b1cc..380e835 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/Clean.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/Clean.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle
+package io.spine.gradle
import java.io.File
import java.nio.file.Files
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/ConfigTester.kt b/buildSrc/src/main/kotlin/io/spine/gradle/ConfigTester.kt
similarity index 98%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/ConfigTester.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/ConfigTester.kt
index 65e00ad..3de99c4 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/ConfigTester.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/ConfigTester.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -26,7 +26,7 @@
@file:Suppress("unused") /* Some constants may be used throughout the Spine repos. */
-package io.spine.internal.gradle
+package io.spine.gradle
import java.io.File
import java.net.URI
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/ProjectExtensions.kt b/buildSrc/src/main/kotlin/io/spine/gradle/ProjectExtensions.kt
similarity index 90%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/ProjectExtensions.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/ProjectExtensions.kt
index 2ef4bd8..3b43246 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/ProjectExtensions.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/ProjectExtensions.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,9 +24,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle
+package io.spine.gradle
-import io.spine.internal.gradle.publish.SpinePublishing
+import io.spine.gradle.publish.SpinePublishing
+import java.io.File
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.Task
@@ -91,3 +92,9 @@ val Project.artifactId: String
val artifactId = spinePublishing?.artifactId(this)
return artifactId ?: name
}
+
+/**
+ * Returns project's build directory as [File].
+ */
+val Project.buildDirectory: File
+ get() = layout.buildDirectory.get().asFile
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/RepoSlug.kt b/buildSrc/src/main/kotlin/io/spine/gradle/RepoSlug.kt
similarity index 94%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/RepoSlug.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/RepoSlug.kt
index b713a3b..71fbac3 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/RepoSlug.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/RepoSlug.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle
+package io.spine.gradle
import org.gradle.api.GradleException
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/Repositories.kt b/buildSrc/src/main/kotlin/io/spine/gradle/Repositories.kt
similarity index 94%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/Repositories.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/Repositories.kt
index 8c5015e..8ec449e 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/Repositories.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/Repositories.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -26,11 +26,11 @@
@file:Suppress("TooManyFunctions") // Deprecated functions will be kept for a while.
-package io.spine.internal.gradle
+package io.spine.gradle
-import io.spine.internal.gradle.publish.CloudRepo
-import io.spine.internal.gradle.publish.PublishingRepos
-import io.spine.internal.gradle.publish.PublishingRepos.gitHub
+import io.spine.gradle.publish.CloudRepo
+import io.spine.gradle.publish.PublishingRepos
+import io.spine.gradle.publish.PublishingRepos.gitHub
import java.io.File
import java.net.URI
import java.util.*
@@ -38,6 +38,7 @@ import org.gradle.api.Project
import org.gradle.api.artifacts.dsl.RepositoryHandler
import org.gradle.api.artifacts.repositories.MavenArtifactRepository
import org.gradle.kotlin.dsl.ScriptHandlerScope
+import org.gradle.kotlin.dsl.maven
/**
* Applies [standard][doApplyStandard] repositories to this [ScriptHandlerScope]
@@ -214,6 +215,12 @@ fun RepositoryHandler.spineArtifacts(): MavenArtifactRepository = maven {
}
}
+val RepositoryHandler.intellijReleases: MavenArtifactRepository
+ get() = maven("https://www.jetbrains.com/intellij-repository/releases")
+
+val RepositoryHandler.jetBrainsCacheRedirector: MavenArtifactRepository
+ get() = maven("https://cache-redirector.jetbrains.com/intellij-dependencies")
+
/**
* Applies repositories commonly used by Spine Event Engine projects.
*/
@@ -236,6 +243,9 @@ fun RepositoryHandler.standardToSpineSdk() {
}
}
+ intellijReleases
+ jetBrainsCacheRedirector
+
maven {
url = URI(Repos.sonatypeSnapshots)
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/RunBuild.kt b/buildSrc/src/main/kotlin/io/spine/gradle/RunBuild.kt
similarity index 90%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/RunBuild.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/RunBuild.kt
index a39ffed..60a7207 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/RunBuild.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/RunBuild.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle
+package io.spine.gradle
/**
* Runs the `build` task via Gradle Wrapper.
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/RunGradle.kt b/buildSrc/src/main/kotlin/io/spine/gradle/RunGradle.kt
similarity index 98%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/RunGradle.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/RunGradle.kt
index 926b237..c1b883a 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/RunGradle.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/RunGradle.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle
+package io.spine.gradle
import java.io.File
import java.io.FileOutputStream
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/Runtime.kt b/buildSrc/src/main/kotlin/io/spine/gradle/Runtime.kt
similarity index 73%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/Runtime.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/Runtime.kt
index 51aa52a..c5b5f54 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/Runtime.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/Runtime.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,19 +24,19 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle
+package io.spine.gradle
-import com.google.common.base.Joiner
-import io.spine.internal.dependency.Flogger
import java.io.File
import java.io.InputStream
import java.io.StringWriter
+import java.lang.ProcessBuilder.Redirect.PIPE
import java.util.*
-object Runtime {
- @Suppress("unused")
- val flogger = Flogger.Runtime
-}
+/**
+ * Utilities for working with processes from Gradle code.
+ */
+@Suppress("unused")
+private const val ABOUT = ""
/**
* Executor of CLI commands.
@@ -60,23 +60,26 @@ class Cli(private val workingFolder: File) {
val outWriter = StringWriter()
val errWriter = StringWriter()
- val process = ProcessBuilder(*command)
- .directory(workingFolder)
- .redirectOutput(ProcessBuilder.Redirect.PIPE)
- .redirectError(ProcessBuilder.Redirect.PIPE)
- .start()
+ val process = ProcessBuilder(*command).apply {
+ directory(workingFolder)
+ redirectOutput(PIPE)
+ redirectError(PIPE)
+ }.start()
- process.inputStream!!.pourTo(outWriter)
- process.errorStream!!.pourTo(errWriter)
- val exitCode = process.waitFor()
+ val exitCode = process.run {
+ inputStream!!.pourTo(outWriter)
+ errorStream!!.pourTo(errWriter)
+ waitFor()
+ }
if (exitCode == 0) {
return outWriter.toString()
} else {
- val cmdAsString = Joiner.on(" ").join(command.iterator())
- val errorMsg = "Command `$cmdAsString` finished with exit code $exitCode:" +
- " ${System.lineSeparator()}$errWriter" +
- " ${System.lineSeparator()}$outWriter."
+ val commandLine = command.joinToString(" ")
+ val nl = System.lineSeparator()
+ val errorMsg = "Command `$commandLine` finished with exit code $exitCode:" +
+ "$nl$errWriter" +
+ "$nl$outWriter."
throw IllegalStateException(errorMsg)
}
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/StringExtensions.kt b/buildSrc/src/main/kotlin/io/spine/gradle/StringExtensions.kt
similarity index 91%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/StringExtensions.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/StringExtensions.kt
index 9d5253b..a185892 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/StringExtensions.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/StringExtensions.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle
+package io.spine.gradle
/**
* Returns `true` if the version of a project contains `snapshot` (in any case),
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/TaskName.kt b/buildSrc/src/main/kotlin/io/spine/gradle/TaskName.kt
similarity index 93%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/TaskName.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/TaskName.kt
index 24b587f..7c7abd1 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/TaskName.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/TaskName.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle
+package io.spine.gradle
import kotlin.reflect.KClass
import org.gradle.api.Task
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/UpdateJournal.kt b/buildSrc/src/main/kotlin/io/spine/gradle/UpdateJournal.kt
similarity index 90%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/UpdateJournal.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/UpdateJournal.kt
index 30d5df4..f34de9e 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/UpdateJournal.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/UpdateJournal.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,10 +24,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle
+package io.spine.gradle
import java.io.File
import java.time.Instant
+import java.util.function.Supplier
import org.gradle.api.DefaultTask
import org.gradle.api.provider.MapProperty
import org.gradle.api.provider.Provider
@@ -46,10 +47,10 @@ import org.gradle.api.tasks.TaskAction
abstract class UpdateJournal : DefaultTask() {
@get:Internal
- var startTime: Long? = null
+ var startTime: Supplier? = null
@get:Internal
- abstract val versions: MapProperty>
+ abstract val versions: MapProperty
init {
outputs.upToDateWhen { false }
@@ -93,11 +94,11 @@ abstract class UpdateJournal : DefaultTask() {
private fun printVersions() = versions
.get()
.entries
- .joinToString(";") { (k, v) -> "$k:${v.get()}" }
+ .joinToString(";") { (k, v) -> "$k:$v" }
private fun calculateDuration(): String {
val endTime = System.currentTimeMillis()
- val duration = endTime - startTime!!
+ val duration = endTime - startTime!!.get()
val totalSeconds = duration / 1000
val minutes = totalSeconds / 60
val seconds = totalSeconds % 60
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/VersionWriter.kt b/buildSrc/src/main/kotlin/io/spine/gradle/VersionWriter.kt
similarity index 97%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/VersionWriter.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/VersionWriter.kt
index 3dc7ef2..d3d4323 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/VersionWriter.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/VersionWriter.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle
+package io.spine.gradle
import java.util.*
import org.gradle.api.DefaultTask
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/base/Tasks.kt b/buildSrc/src/main/kotlin/io/spine/gradle/base/Tasks.kt
similarity index 91%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/base/Tasks.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/base/Tasks.kt
index 6fb9fbb..c77b795 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/base/Tasks.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/base/Tasks.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.base
+package io.spine.gradle.base
import org.gradle.api.Task
import org.gradle.api.tasks.Delete
@@ -77,8 +77,8 @@ val TaskContainer.assemble: TaskProvider
*
* Intended to build everything, including running all tests, producing the production artifacts
* and generating documentation. One will probably rarely attach concrete tasks directly
- * to `build` as [assemble][io.spine.internal.gradle.base.assemble] and
- * [check][io.spine.internal.gradle.base.check] are typically more appropriate.
+ * to `build` as [assemble][io.spine.gradle.base.assemble] and
+ * [check][io.spine.gradle.base.check] are typically more appropriate.
*
* @see
* Tasks | The Base Plugin
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/checkstyle/CheckStyleConfig.kt b/buildSrc/src/main/kotlin/io/spine/gradle/checkstyle/CheckStyleConfig.kt
similarity index 92%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/checkstyle/CheckStyleConfig.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/checkstyle/CheckStyleConfig.kt
index 42d1f62..ab67ffe 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/checkstyle/CheckStyleConfig.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/checkstyle/CheckStyleConfig.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,9 +24,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.checkstyle
+package io.spine.gradle.checkstyle
-import io.spine.internal.dependency.CheckStyle
+import io.spine.dependency.build.CheckStyle
import org.gradle.api.Project
import org.gradle.api.plugins.quality.Checkstyle
import org.gradle.api.plugins.quality.CheckstyleExtension
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/DartContext.kt b/buildSrc/src/main/kotlin/io/spine/gradle/dart/DartContext.kt
similarity index 92%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/DartContext.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/dart/DartContext.kt
index ed2eff7..c32c10f 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/DartContext.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/dart/DartContext.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.dart
+package io.spine.gradle.dart
import org.gradle.api.Project
import org.gradle.api.tasks.Exec
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/DartEnvironment.kt b/buildSrc/src/main/kotlin/io/spine/gradle/dart/DartEnvironment.kt
similarity index 97%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/DartEnvironment.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/dart/DartEnvironment.kt
index 160e1ff..4e4ae83 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/DartEnvironment.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/dart/DartEnvironment.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.dart
+package io.spine.gradle.dart
import java.io.File
import org.apache.tools.ant.taskdefs.condition.Os
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/DartExtension.kt b/buildSrc/src/main/kotlin/io/spine/gradle/dart/DartExtension.kt
similarity index 96%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/DartExtension.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/dart/DartExtension.kt
index d4bd4d8..57a2bcf 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/DartExtension.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/dart/DartExtension.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,10 +24,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.dart
+package io.spine.gradle.dart
-import io.spine.internal.gradle.dart.task.DartTasks
-import io.spine.internal.gradle.dart.plugin.DartPlugins
+import io.spine.gradle.dart.plugin.DartPlugins
+import io.spine.gradle.dart.task.DartTasks
import org.gradle.api.Project
import org.gradle.kotlin.dsl.create
import org.gradle.kotlin.dsl.findByType
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/plugin/DartPlugins.kt b/buildSrc/src/main/kotlin/io/spine/gradle/dart/plugin/DartPlugins.kt
similarity index 89%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/plugin/DartPlugins.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/dart/plugin/DartPlugins.kt
index 43d8bb0..9d76a77 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/plugin/DartPlugins.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/dart/plugin/DartPlugins.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,10 +24,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.dart.plugin
+package io.spine.gradle.dart.plugin
-import io.spine.internal.gradle.dart.DartContext
-import io.spine.internal.gradle.dart.DartEnvironment
+import io.spine.gradle.dart.DartContext
+import io.spine.gradle.dart.DartEnvironment
import org.gradle.api.Project
import org.gradle.api.plugins.ExtensionContainer
import org.gradle.api.plugins.PluginContainer
@@ -63,8 +63,8 @@ import org.gradle.api.tasks.TaskContainer
* And here's how to apply it in `build.gradle.kts`:
*
* ```
- * import io.spine.internal.gradle.dart.dart
- * import io.spine.internal.gradle.dart.plugins.fooBar
+ * import io.spine.gradle.dart.dart
+ * import io.spine.gradle.dart.plugins.fooBar
*
* // ...
*
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/plugin/Protobuf.kt b/buildSrc/src/main/kotlin/io/spine/gradle/dart/plugin/Protobuf.kt
similarity index 90%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/plugin/Protobuf.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/dart/plugin/Protobuf.kt
index 65f6fb2..bfd503f 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/plugin/Protobuf.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/dart/plugin/Protobuf.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,12 +24,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.dart.plugin
+package io.spine.gradle.dart.plugin
-import com.google.protobuf.gradle.id
import com.google.protobuf.gradle.ProtobufExtension
+import com.google.protobuf.gradle.id
import com.google.protobuf.gradle.remove
-import io.spine.internal.dependency.Protobuf
+import io.spine.dependency.lib.Protobuf
/**
* Applies `protobuf` plugin and configures `GenerateProtoTask` to work with a Dart module.
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/task/Build.kt b/buildSrc/src/main/kotlin/io/spine/gradle/dart/task/Build.kt
similarity index 89%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/task/Build.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/dart/task/Build.kt
index 55ec5ca..163747e 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/task/Build.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/dart/task/Build.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,14 +24,14 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.dart.task
+package io.spine.gradle.dart.task
-import io.spine.internal.gradle.TaskName
-import io.spine.internal.gradle.base.assemble
-import io.spine.internal.gradle.base.check
-import io.spine.internal.gradle.base.clean
-import io.spine.internal.gradle.named
-import io.spine.internal.gradle.register
+import io.spine.gradle.TaskName
+import io.spine.gradle.base.assemble
+import io.spine.gradle.base.check
+import io.spine.gradle.base.clean
+import io.spine.gradle.named
+import io.spine.gradle.register
import org.gradle.api.tasks.Delete
import org.gradle.api.tasks.Exec
import org.gradle.api.tasks.TaskContainer
@@ -49,8 +49,8 @@ import org.gradle.api.tasks.TaskProvider
* An example of how to apply it in `build.gradle.kts`:
*
* ```
- * import io.spine.internal.gradle.dart.dart
- * import io.spine.internal.gradle.dart.task.build
+ * import io.spine.gradle.dart.dart
+ * import io.spine.gradle.dart.task.build
*
* // ...
*
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/task/DartTasks.kt b/buildSrc/src/main/kotlin/io/spine/gradle/dart/task/DartTasks.kt
similarity index 85%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/task/DartTasks.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/dart/task/DartTasks.kt
index 50574de..bc5e1e9 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/task/DartTasks.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/dart/task/DartTasks.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,10 +24,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.dart.task
+package io.spine.gradle.dart.task
-import io.spine.internal.gradle.dart.DartContext
-import io.spine.internal.gradle.dart.DartEnvironment
+import io.spine.gradle.dart.DartContext
+import io.spine.gradle.dart.DartEnvironment
import org.gradle.api.Project
import org.gradle.api.tasks.TaskContainer
@@ -43,7 +43,7 @@ import org.gradle.api.tasks.TaskContainer
* Supposing, one needs to create a new task that would participate in building. Let the task name
* be `testDart`. To do that, several steps should be completed:
*
- * 1. Define the task name and type using [TaskName][io.spine.internal.gradle.TaskName].
+ * 1. Define the task name and type using [TaskName][io.spine.gradle.TaskName].
* 2. Create a public typed reference for the task upon [TaskContainer]. It would facilitate
* referencing to the new task, so that external tasks could depend on it. This reference
* should be documented.
@@ -53,9 +53,9 @@ import org.gradle.api.tasks.TaskContainer
* Here's an example of `testDart()` extension:
*
* ```
- * import io.spine.internal.gradle.named
- * import io.spine.internal.gradle.register
- * import io.spine.internal.gradle.TaskName
+ * import io.spine.gradle.named
+ * import io.spine.gradle.register
+ * import io.spine.gradle.TaskName
* import org.gradle.api.Task
* import org.gradle.api.tasks.TaskContainer
* import org.gradle.api.tasks.Exec
@@ -85,8 +85,8 @@ import org.gradle.api.tasks.TaskContainer
* And here's how to apply it in `build.gradle.kts`:
*
* ```
- * import io.spine.internal.gradle.dart.dart
- * import io.spine.internal.gradle.dart.task.testDart
+ * import io.spine.gradle.dart.dart
+ * import io.spine.gradle.dart.task.testDart
*
* // ...
*
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/task/IntegrationTest.kt b/buildSrc/src/main/kotlin/io/spine/gradle/dart/task/IntegrationTest.kt
similarity index 86%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/task/IntegrationTest.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/dart/task/IntegrationTest.kt
index b2729c3..19f1f14 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/task/IntegrationTest.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/dart/task/IntegrationTest.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,11 +24,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.dart.task
+package io.spine.gradle.dart.task
-import io.spine.internal.gradle.TaskName
-import io.spine.internal.gradle.named
-import io.spine.internal.gradle.register
+import io.spine.gradle.TaskName
+import io.spine.gradle.named
+import io.spine.gradle.register
import org.gradle.api.tasks.Exec
import org.gradle.api.tasks.TaskContainer
import org.gradle.api.tasks.TaskProvider
@@ -57,9 +57,9 @@ val TaskContainer.integrationTest: TaskProvider
* Here's an example of how to apply it in `build.gradle.kts`:
*
* ```
- * import io.spine.internal.gradle.dart.dart
- * import io.spine.internal.gradle.task.build
- * import io.spine.internal.gradle.task.integrationTest
+ * import io.spine.gradle.dart.dart
+ * import io.spine.gradle.task.build
+ * import io.spine.gradle.task.integrationTest
*
* // ...
*
@@ -71,6 +71,7 @@ val TaskContainer.integrationTest: TaskProvider
* }
* ```
*/
+@Suppress("unused")
fun DartTasks.integrationTest() =
register(integrationTestName) {
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/task/Publish.kt b/buildSrc/src/main/kotlin/io/spine/gradle/dart/task/Publish.kt
similarity index 89%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/task/Publish.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/dart/task/Publish.kt
index 08b7b00..2f8df6b 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/task/Publish.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/dart/task/Publish.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,13 +24,13 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.dart.task
+package io.spine.gradle.dart.task
-import io.spine.internal.gradle.TaskName
-import io.spine.internal.gradle.base.assemble
-import io.spine.internal.gradle.publish.publish
-import io.spine.internal.gradle.named
-import io.spine.internal.gradle.register
+import io.spine.gradle.TaskName
+import io.spine.gradle.base.assemble
+import io.spine.gradle.named
+import io.spine.gradle.publish.publish
+import io.spine.gradle.register
import org.gradle.api.tasks.Copy
import org.gradle.api.tasks.Exec
import org.gradle.api.tasks.TaskContainer
@@ -51,9 +51,9 @@ import org.gradle.api.tasks.TaskProvider
* Usage example:
*
* ```
- * import io.spine.internal.gradle.dart.dart
- * import io.spine.internal.gradle.dart.task.build
- * import io.spine.internal.gradle.dart.task.publish
+ * import io.spine.gradle.dart.dart
+ * import io.spine.gradle.dart.task.build
+ * import io.spine.gradle.dart.task.publish
*
* // ...
*
@@ -83,7 +83,7 @@ private val stagePubPublicationName = TaskName.of("stagePubPublication", Copy::c
* Locates `stagePubPublication` in this [TaskContainer].
*
* The task prepares the Dart package for Pub publication in the
- * [publication directory][io.spine.internal.gradle.dart.DartEnvironment.publicationDir].
+ * [publication directory][io.spine.gradle.dart.DartEnvironment.publicationDir].
*/
val TaskContainer.stagePubPublication: TaskProvider
get() = named(stagePubPublicationName)
diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/dokka/DokkaExtensions.kt b/buildSrc/src/main/kotlin/io/spine/gradle/dokka/DokkaExtensions.kt
new file mode 100644
index 0000000..727a079
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/dokka/DokkaExtensions.kt
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.gradle.dokka
+
+import java.io.File
+import org.gradle.api.file.FileCollection
+import org.jetbrains.dokka.gradle.GradleDokkaSourceSetBuilder
+
+/**
+ * Returns only Java source roots out of all present in the source set.
+ *
+ * It is a helper method for generating documentation by Dokka only for Java code.
+ * It is helpful when both Java and Kotlin source files are present in a source set.
+ * Dokka can properly generate documentation for either Kotlin or Java depending on
+ * the configuration, but not both.
+ */
+@Suppress("unused")
+internal fun GradleDokkaSourceSetBuilder.onlyJavaSources(): FileCollection {
+ return sourceRoots.filter(File::isJavaSourceDirectory)
+}
+
+private fun File.isJavaSourceDirectory(): Boolean {
+ return isDirectory && name == "java"
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/dokka/TaskContainerExtensions.kt b/buildSrc/src/main/kotlin/io/spine/gradle/dokka/TaskContainerExtensions.kt
new file mode 100644
index 0000000..02deead
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/dokka/TaskContainerExtensions.kt
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.gradle.dokka
+
+import org.gradle.api.tasks.TaskContainer
+import org.jetbrains.dokka.gradle.DokkaTask
+
+/**
+ * Finds the `dokkaHtml` Gradle task.
+ */
+@Suppress("unused")
+fun TaskContainer.dokkaHtmlTask() = this.getByName("dokkaHtml") as DokkaTask
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/fs/LazyTempPath.kt b/buildSrc/src/main/kotlin/io/spine/gradle/fs/LazyTempPath.kt
similarity index 96%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/fs/LazyTempPath.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/fs/LazyTempPath.kt
index 325d8e9..f6e1777 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/fs/LazyTempPath.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/fs/LazyTempPath.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.fs
+package io.spine.gradle.fs
import java.io.File
import java.net.URI
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/git/Branch.kt b/buildSrc/src/main/kotlin/io/spine/gradle/git/Branch.kt
similarity index 91%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/git/Branch.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/git/Branch.kt
index 63bae4e..a10a65f 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/git/Branch.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/git/Branch.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.git
+package io.spine.gradle.git
/**
* Branch names.
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/git/Repository.kt b/buildSrc/src/main/kotlin/io/spine/gradle/git/Repository.kt
similarity index 85%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/git/Repository.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/git/Repository.kt
index 0b29d37..55ce67f 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/git/Repository.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/git/Repository.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,10 +24,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.git
+package io.spine.gradle.git
-import io.spine.internal.gradle.Cli
-import io.spine.internal.gradle.fs.LazyTempPath
+import io.spine.gradle.Cli
+import io.spine.gradle.fs.LazyTempPath
/**
* Interacts with a real Git repository.
@@ -44,43 +44,31 @@ import io.spine.internal.gradle.fs.LazyTempPath
* release of resources please use the provided functionality inside a `use` block or
* call the `close` method manually.
*/
-class Repository : AutoCloseable {
- /**
- * The GitHub SSH URL to the underlying repository.
- */
- val sshUrl: String
+class Repository private constructor(
/**
- * Path to the temporal folder for a clone of the underlying repository.
+ * The GitHub SSH URL to the underlying repository.
*/
- val location = LazyTempPath("repoTemp")
+ private val sshUrl: String,
/**
* Current user configuration.
*
- * This configuration determines what ends up in author and commiter fields of a commit.
+ * This configuration determines what ends up in author and committer fields of a commit.
*/
- var user: UserInfo
- get() = field
- private set(value) {
- field = value
- }
+ private var user: UserInfo,
/**
* Currently checked out branch.
*/
- var currentBranch: String
- get() = field
- private set(value) {
- field = value
- }
+ private var currentBranch: String
+) : AutoCloseable {
- private constructor(sshUrl: String, user: UserInfo, branch: String) {
- this.sshUrl = sshUrl
- this.user = user
- this.currentBranch = branch
- }
+ /**
+ * Path to the temporal folder for a clone of the underlying repository.
+ */
+ val location = LazyTempPath("repoTemp")
/**
* Clones the repository with [the SSH url][sshUrl] into the [temporal folder][location].
@@ -101,7 +89,7 @@ class Repository : AutoCloseable {
fun checkout(branch: String) {
repoExecute("git", "checkout", branch)
- this.currentBranch = branch
+ currentBranch = branch
}
/**
@@ -109,7 +97,7 @@ class Repository : AutoCloseable {
*
* Overwrites `user.name` and `user.email` settings locally in [location] with
* values from [user]. These settings determine what ends up in author and
- * commiter fields of a commit.
+ * committer fields of a commit.
*/
fun configureUser(user: UserInfo) {
repoExecute("git", "config", "user.name", user.name)
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/git/UserInfo.kt b/buildSrc/src/main/kotlin/io/spine/gradle/git/UserInfo.kt
similarity index 92%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/git/UserInfo.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/git/UserInfo.kt
index 898eb5b..bc9f08d 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/git/UserInfo.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/git/UserInfo.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.git
+package io.spine.gradle.git
/**
* Contains information about a Git user.
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/AuthorEmail.kt b/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/AuthorEmail.kt
similarity index 93%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/AuthorEmail.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/github/pages/AuthorEmail.kt
index 0f48f00..f0d839f 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/AuthorEmail.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/AuthorEmail.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.github.pages
+package io.spine.gradle.github.pages
/**
* An author of updates to GitHub pages.
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/RepositoryExtensions.kt b/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/RepositoryExtensions.kt
similarity index 87%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/RepositoryExtensions.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/github/pages/RepositoryExtensions.kt
index 4dacb62..94ab6ac 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/RepositoryExtensions.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/RepositoryExtensions.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,12 +24,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.github.pages
+package io.spine.gradle.github.pages
-import io.spine.internal.gradle.RepoSlug
-import io.spine.internal.gradle.git.Branch
-import io.spine.internal.gradle.git.Repository
-import io.spine.internal.gradle.git.UserInfo
+import io.spine.gradle.RepoSlug
+import io.spine.gradle.git.Branch
+import io.spine.gradle.git.Repository
+import io.spine.gradle.git.UserInfo
/**
* Clones the current project repository with the branch dedicated to publishing
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/SshKey.kt b/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/SshKey.kt
similarity index 95%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/SshKey.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/github/pages/SshKey.kt
index 7b1746a..186c474 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/SshKey.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/SshKey.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,9 +24,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.github.pages
+package io.spine.gradle.github.pages
-import io.spine.internal.gradle.Cli
+import io.spine.gradle.Cli
import java.io.File
import org.gradle.api.GradleException
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/TaskName.kt b/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/TaskName.kt
similarity index 92%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/TaskName.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/github/pages/TaskName.kt
index 98e4772..f5e3bfc 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/TaskName.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/TaskName.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.github.pages
+package io.spine.gradle.github.pages
object TaskName {
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/Update.kt b/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/Update.kt
similarity index 83%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/Update.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/github/pages/Update.kt
index 58a2514..0f9a0f5 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/Update.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/Update.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,8 +24,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.github.pages
+package io.spine.gradle.github.pages
+import io.spine.gradle.git.Repository
import java.io.File
import java.nio.file.Path
import org.gradle.api.Project
@@ -33,7 +34,6 @@ import org.gradle.api.Task
import org.gradle.api.file.ConfigurableFileCollection
import org.gradle.api.file.FileCollection
import org.gradle.api.logging.Logger
-import io.spine.internal.gradle.git.Repository
/**
* Performs the update of GitHub pages.
@@ -90,25 +90,33 @@ private abstract class UpdateDocumentation(
File("${repository.location}/${docsDestinationFolder}/${project.name}")
}
+ private fun logDebug(message: () -> String) {
+ if (logger.isDebugEnabled) {
+ logger.debug(message())
+ }
+ }
+
fun run() {
val module = project.name
- logger.debug("Update of the $toolName documentation for module `$module` started.")
+ logDebug {"Update of the $toolName documentation for module `$module` started." }
val documentation = replaceMostRecentDocs()
copyIntoVersionDir(documentation)
val version = project.version
- val updateMessage = "Update $toolName documentation for module `$module` as for " +
- "version $version"
+ val updateMessage =
+ "Update `$toolName` documentation for module `$module` as for version $version"
repository.commitAllChanges(updateMessage)
- logger.debug("Update of the $toolName documentation for `$module` successfully finished.")
+ logDebug { "Update of the `$toolName` documentation for `$module` successfully finished." }
}
private fun replaceMostRecentDocs(): ConfigurableFileCollection {
val generatedDocs = project.files(docsSourceFolder)
- logger.debug("Replacing the most recent $toolName documentation in ${mostRecentFolder}.")
+ logDebug {
+ "Replacing the most recent `$toolName` documentation in `${mostRecentFolder}`."
+ }
copyDocs(generatedDocs, mostRecentFolder)
return generatedDocs
@@ -125,7 +133,9 @@ private abstract class UpdateDocumentation(
private fun copyIntoVersionDir(generatedDocs: ConfigurableFileCollection) {
val versionedDocDir = File("$mostRecentFolder/v/${project.version}")
- logger.debug("Storing the new version of $toolName documentation in `${versionedDocDir}.")
+ logDebug {
+ "Storing the new version of `$toolName` documentation in `${versionedDocDir}`."
+ }
copyDocs(generatedDocs, versionedDocDir)
}
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/UpdateGitHubPages.kt b/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/UpdateGitHubPages.kt
similarity index 93%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/UpdateGitHubPages.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/github/pages/UpdateGitHubPages.kt
index ba8c290..e46a565 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/UpdateGitHubPages.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/UpdateGitHubPages.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,16 +24,16 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.github.pages
+package io.spine.gradle.github.pages
import dokkaHtmlTask
-import io.spine.internal.gradle.fs.LazyTempPath
-import io.spine.internal.gradle.github.pages.TaskName.copyDokka
-import io.spine.internal.gradle.github.pages.TaskName.copyJavadoc
-import io.spine.internal.gradle.github.pages.TaskName.updateGitHubPages
-import io.spine.internal.gradle.isSnapshot
-import io.spine.internal.gradle.javadoc.ExcludeInternalDoclet
-import io.spine.internal.gradle.javadoc.javadocTask
+import io.spine.gradle.fs.LazyTempPath
+import io.spine.gradle.github.pages.TaskName.copyDokka
+import io.spine.gradle.github.pages.TaskName.copyJavadoc
+import io.spine.gradle.github.pages.TaskName.updateGitHubPages
+import io.spine.gradle.isSnapshot
+import io.spine.gradle.javadoc.ExcludeInternalDoclet
+import io.spine.gradle.javadoc.javadocTask
import java.io.File
import org.gradle.api.Plugin
import org.gradle.api.Project
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/UpdateGitHubPagesExtension.kt b/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/UpdateGitHubPagesExtension.kt
similarity index 94%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/UpdateGitHubPagesExtension.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/github/pages/UpdateGitHubPagesExtension.kt
index d523d5e..90eebc2 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/UpdateGitHubPagesExtension.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/github/pages/UpdateGitHubPagesExtension.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.github.pages
+package io.spine.gradle.github.pages
import java.io.File
import org.gradle.api.Project
@@ -78,7 +78,7 @@ private constructor(
/**
* The version of the
- * [ExcludeInternalDoclet][io.spine.internal.gradle.javadoc.ExcludeInternalDoclet]
+ * [ExcludeInternalDoclet][io.spine.gradle.javadoc.ExcludeInternalDoclet]
* used when updating documentation at GitHub Pages.
*
* This value is used when adding dependency on the doclet when the plugin tasks
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/java/Tasks.kt b/buildSrc/src/main/kotlin/io/spine/gradle/java/Tasks.kt
similarity index 92%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/java/Tasks.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/java/Tasks.kt
index 3e0aad9..12d4d56 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/java/Tasks.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/java/Tasks.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.java
+package io.spine.gradle.java
import org.gradle.api.tasks.TaskContainer
import org.gradle.api.tasks.TaskProvider
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javac/ErrorProne.kt b/buildSrc/src/main/kotlin/io/spine/gradle/javac/ErrorProne.kt
similarity index 94%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/javac/ErrorProne.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/javac/ErrorProne.kt
index 1489c08..84c6bcb 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javac/ErrorProne.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/javac/ErrorProne.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.javac
+package io.spine.gradle.javac
import net.ltgt.gradle.errorprone.errorprone
import org.gradle.api.tasks.compile.JavaCompile
@@ -51,6 +51,7 @@ import org.gradle.process.CommandLineArgumentProvider
*/
@Suppress("unused")
fun JavaCompile.configureErrorProne() {
+ options.compilerArgs.add("--should-stop=ifError=FLOW")
options.errorprone
.errorproneArgumentProviders
.add(ErrorProneConfig.ARGUMENTS)
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javac/Javac.kt b/buildSrc/src/main/kotlin/io/spine/gradle/javac/Javac.kt
similarity index 94%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/javac/Javac.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/javac/Javac.kt
index de02687..44223cb 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javac/Javac.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/javac/Javac.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.javac
+package io.spine.gradle.javac
import org.gradle.api.tasks.compile.JavaCompile
import org.gradle.process.CommandLineArgumentProvider
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/Encoding.kt b/buildSrc/src/main/kotlin/io/spine/gradle/javadoc/Encoding.kt
similarity index 90%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/Encoding.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/javadoc/Encoding.kt
index bf8601b..052a1aa 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/Encoding.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/javadoc/Encoding.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.javadoc
+package io.spine.gradle.javadoc
/**
* The encoding to use in Javadoc processing.
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/ExcludeInternalDoclet.kt b/buildSrc/src/main/kotlin/io/spine/gradle/javadoc/ExcludeInternalDoclet.kt
similarity index 86%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/ExcludeInternalDoclet.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/javadoc/ExcludeInternalDoclet.kt
index 27ee98c..541504c 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/ExcludeInternalDoclet.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/javadoc/ExcludeInternalDoclet.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,10 +24,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.javadoc
+package io.spine.gradle.javadoc
-import io.spine.internal.gradle.javadoc.ExcludeInternalDoclet.Companion.taskName
-import io.spine.internal.gradle.sourceSets
+import io.spine.dependency.local.ArtifactVersion
+import io.spine.dependency.local.Spine
+import io.spine.gradle.javadoc.ExcludeInternalDoclet.Companion.taskName
+import io.spine.gradle.sourceSets
import org.gradle.api.Project
import org.gradle.api.artifacts.Configuration
import org.gradle.api.tasks.javadoc.Javadoc
@@ -36,9 +38,13 @@ import org.gradle.external.javadoc.StandardJavadocDocletOptions
/**
* The doclet which removes Javadoc for `@Internal` things in the Java code.
*/
-class ExcludeInternalDoclet(val version: String) {
+@Suppress("ConstPropertyName")
+class ExcludeInternalDoclet(
+ @Deprecated("`Spine.ArtifactVersion.javadocTools` is used instead.")
+ val version: String = ArtifactVersion.javadocTools
+) {
- private val dependency = "io.spine.tools:spine-javadoc-filter:${version}"
+ private val dependency = Spine.javadocFilter
companion object {
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/JavadocConfig.kt b/buildSrc/src/main/kotlin/io/spine/gradle/javadoc/JavadocConfig.kt
similarity index 97%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/JavadocConfig.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/javadoc/JavadocConfig.kt
index debd78d..d2e4c90 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/JavadocConfig.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/javadoc/JavadocConfig.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.javadoc
+package io.spine.gradle.javadoc
import java.io.File
import org.gradle.api.JavaVersion
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/JavadocTag.kt b/buildSrc/src/main/kotlin/io/spine/gradle/javadoc/JavadocTag.kt
similarity index 90%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/JavadocTag.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/javadoc/JavadocTag.kt
index 8eb8b17..a6224a5 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/JavadocTag.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/javadoc/JavadocTag.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.javadoc
+package io.spine.gradle.javadoc
/**
* The Javadoc tag.
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/TaskContainerExtensions.kt b/buildSrc/src/main/kotlin/io/spine/gradle/javadoc/TaskContainerExtensions.kt
similarity index 91%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/TaskContainerExtensions.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/javadoc/TaskContainerExtensions.kt
index 3897118..7e5b517 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/TaskContainerExtensions.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/javadoc/TaskContainerExtensions.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.javadoc
+package io.spine.gradle.javadoc
import org.gradle.api.tasks.TaskContainer
import org.gradle.api.tasks.javadoc.Javadoc
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/JsContext.kt b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/JsContext.kt
similarity index 86%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/JsContext.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/javascript/JsContext.kt
index 75cd401..ec5d872 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/JsContext.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/JsContext.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,10 +24,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.javascript
+package io.spine.gradle.javascript
import java.io.File
import org.gradle.api.Project
+import org.gradle.kotlin.dsl.support.serviceOf
+import org.gradle.process.ExecOperations
/**
* Provides access to the current [JsEnvironment] and shortcuts for running `npm` tool.
@@ -47,8 +49,7 @@ open class JsContext(jsEnv: JsEnvironment, internal val project: Project)
*
* This [File] is used as a working directory.
*/
- fun File.npm(vararg args: String) = project.exec {
-
+ fun File.npm(vararg args: String) = project.serviceOf().exec {
workingDir(this@npm)
commandLine(npmExecutable)
args(*args)
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/JsEnvironment.kt b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/JsEnvironment.kt
similarity index 98%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/JsEnvironment.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/javascript/JsEnvironment.kt
index bce4fa8..c2dc68e 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/JsEnvironment.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/JsEnvironment.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.javascript
+package io.spine.gradle.javascript
import java.io.File
import org.apache.tools.ant.taskdefs.condition.Os
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/JsExtension.kt b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/JsExtension.kt
similarity index 95%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/JsExtension.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/javascript/JsExtension.kt
index 22ebf52..69c3e26 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/JsExtension.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/JsExtension.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,10 +24,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.javascript
+package io.spine.gradle.javascript
-import io.spine.internal.gradle.javascript.task.JsTasks
-import io.spine.internal.gradle.javascript.plugin.JsPlugins
+import io.spine.gradle.javascript.plugin.JsPlugins
+import io.spine.gradle.javascript.task.JsTasks
import org.gradle.api.Project
import org.gradle.kotlin.dsl.create
import org.gradle.kotlin.dsl.extra
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/Idea.kt b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/plugin/Idea.kt
similarity index 93%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/Idea.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/javascript/plugin/Idea.kt
index 5e51155..087dd25 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/Idea.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/plugin/Idea.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.javascript.plugin
+package io.spine.gradle.javascript.plugin
import org.gradle.kotlin.dsl.configure
import org.gradle.plugins.ide.idea.model.IdeaModel
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/JsPlugins.kt b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/plugin/JsPlugins.kt
similarity index 88%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/JsPlugins.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/javascript/plugin/JsPlugins.kt
index 60a088a..b478f64 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/JsPlugins.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/plugin/JsPlugins.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,10 +24,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.javascript.plugin
+package io.spine.gradle.javascript.plugin
-import io.spine.internal.gradle.javascript.JsContext
-import io.spine.internal.gradle.javascript.JsEnvironment
+import io.spine.gradle.javascript.JsContext
+import io.spine.gradle.javascript.JsEnvironment
import org.gradle.api.Project
import org.gradle.api.plugins.ExtensionContainer
import org.gradle.api.plugins.PluginContainer
@@ -63,8 +63,8 @@ import org.gradle.api.tasks.TaskContainer
* And here's how to apply it in `build.gradle.kts`:
*
* ```
- * import io.spine.internal.gradle.javascript.javascript
- * import io.spine.internal.gradle.javascript.plugins.fooBar
+ * import io.spine.gradle.javascript.javascript
+ * import io.spine.gradle.javascript.plugins.fooBar
*
* // ...
*
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/McJs.kt b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/plugin/McJs.kt
similarity index 93%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/McJs.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/javascript/plugin/McJs.kt
index 61e59d5..2efa4a4 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/McJs.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/plugin/McJs.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.javascript.plugin
+package io.spine.gradle.javascript.plugin
import org.gradle.api.Task
import org.gradle.api.tasks.TaskContainer
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/Protobuf.kt b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/plugin/Protobuf.kt
similarity index 92%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/Protobuf.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/javascript/plugin/Protobuf.kt
index c50ddd9..c1c2d64 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/Protobuf.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/plugin/Protobuf.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,12 +24,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.javascript.plugin
+package io.spine.gradle.javascript.plugin
import com.google.protobuf.gradle.ProtobufExtension
import com.google.protobuf.gradle.id
import com.google.protobuf.gradle.remove
-import io.spine.internal.dependency.Protobuf
+import io.spine.dependency.lib.Protobuf
/**
* Applies and configures `protobuf` plugin to work with a JavaScript module.
@@ -50,8 +50,6 @@ fun JsPlugins.protobuf() {
val protobufExt = project.extensions.getByType(ProtobufExtension::class.java)
protobufExt.apply {
- generatedFilesBaseDir = projectDir.path
-
protoc {
artifact = Protobuf.compiler
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Assemble.kt b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/Assemble.kt
similarity index 88%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Assemble.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/Assemble.kt
index 4739307..4b57a4e 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Assemble.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/Assemble.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,16 +24,16 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.javascript.task
+package io.spine.gradle.javascript.task
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.databind.node.ObjectNode
import com.google.protobuf.gradle.GenerateProtoTask
-import io.spine.internal.gradle.base.assemble
-import io.spine.internal.gradle.javascript.plugin.generateJsonParsers
-import io.spine.internal.gradle.named
-import io.spine.internal.gradle.register
-import io.spine.internal.gradle.TaskName
+import io.spine.gradle.TaskName
+import io.spine.gradle.base.assemble
+import io.spine.gradle.javascript.plugin.generateJsonParsers
+import io.spine.gradle.named
+import io.spine.gradle.register
import org.gradle.api.Task
import org.gradle.api.tasks.TaskContainer
import org.gradle.api.tasks.TaskProvider
@@ -42,8 +42,8 @@ import org.gradle.kotlin.dsl.withType
/**
* Registers tasks for assembling JavaScript artifacts.
*
- * Please note, this task group depends on [mc-js][io.spine.internal.gradle.javascript.plugin.mcJs]
- * and [protobuf][io.spine.internal.gradle.javascript.plugin.protobuf]` plugins. Therefore,
+ * Please note, this task group depends on [mc-js][io.spine.gradle.javascript.plugin.mcJs]
+ * and [protobuf][io.spine.gradle.javascript.plugin.protobuf]` plugins. Therefore,
* these plugins should be applied in the first place.
*
* List of tasks to be created:
@@ -56,8 +56,8 @@ import org.gradle.kotlin.dsl.withType
* Here's an example of how to apply it in `build.gradle.kts`:
*
* ```
- * import io.spine.internal.gradle.javascript.javascript
- * import io.spine.internal.gradle.javascript.task.assemble
+ * import io.spine.gradle.javascript.javascript
+ * import io.spine.gradle.javascript.task.assemble
*
* // ...
*
@@ -175,7 +175,7 @@ private val updatePackageVersionName = TaskName.of("updatePackageVersion")
* Locates `updatePackageVersion` task in this [TaskContainer].
*
* The task sets the module's version in `package.json` to the value of
- * [moduleVersion][io.spine.internal.gradle.javascript.JsEnvironment.moduleVersion]
+ * [moduleVersion][io.spine.gradle.javascript.JsEnvironment.moduleVersion]
* specified in the current `JsEnvironment`.
*/
val TaskContainer.updatePackageVersion: TaskProvider
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Check.kt b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/Check.kt
similarity index 89%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Check.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/Check.kt
index c15f3e2..d25c3c2 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Check.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/Check.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,14 +24,14 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.javascript.task
+package io.spine.gradle.javascript.task
-import io.spine.internal.gradle.base.check
-import io.spine.internal.gradle.java.test
-import io.spine.internal.gradle.javascript.isWindows
-import io.spine.internal.gradle.named
-import io.spine.internal.gradle.register
-import io.spine.internal.gradle.TaskName
+import io.spine.gradle.TaskName
+import io.spine.gradle.base.check
+import io.spine.gradle.java.test
+import io.spine.gradle.javascript.isWindows
+import io.spine.gradle.named
+import io.spine.gradle.register
import org.gradle.api.Task
import org.gradle.api.tasks.TaskContainer
import org.gradle.api.tasks.TaskProvider
@@ -52,9 +52,9 @@ import org.gradle.api.tasks.TaskProvider
* Here's an example of how to apply it in `build.gradle.kts`:
*
* ```
- * import io.spine.internal.gradle.javascript.javascript
- * import io.spine.internal.gradle.javascript.task.assemble
- * import io.spine.internal.gradle.javascript.task.check
+ * import io.spine.gradle.javascript.javascript
+ * import io.spine.gradle.javascript.task.assemble
+ * import io.spine.gradle.javascript.task.check
*
* // ...
*
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Clean.kt b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/Clean.kt
similarity index 86%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Clean.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/Clean.kt
index 4680591..c5ff835 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Clean.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/Clean.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,12 +24,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.javascript.task
+package io.spine.gradle.javascript.task
-import io.spine.internal.gradle.base.clean
-import io.spine.internal.gradle.named
-import io.spine.internal.gradle.register
-import io.spine.internal.gradle.TaskName
+import io.spine.gradle.TaskName
+import io.spine.gradle.base.clean
+import io.spine.gradle.named
+import io.spine.gradle.register
import org.gradle.api.tasks.Delete
import org.gradle.api.tasks.TaskContainer
import org.gradle.api.tasks.TaskProvider
@@ -48,9 +48,9 @@ import org.gradle.api.tasks.TaskProvider
* Here's an example of how to apply it in `build.gradle.kts`:
*
* ```
- * import io.spine.internal.gradle.javascript.javascript
- * import io.spine.internal.gradle.javascript.task.assemble
- * import io.spine.internal.gradle.javascript.task.clean
+ * import io.spine.gradle.javascript.javascript
+ * import io.spine.gradle.javascript.task.assemble
+ * import io.spine.gradle.javascript.task.clean
*
* // ...
*
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/IntegrationTest.kt b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/IntegrationTest.kt
similarity index 89%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/IntegrationTest.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/IntegrationTest.kt
index dd21801..227e33e 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/IntegrationTest.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/IntegrationTest.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,12 +24,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.javascript.task
+package io.spine.gradle.javascript.task
-import io.spine.internal.gradle.base.build
-import io.spine.internal.gradle.named
-import io.spine.internal.gradle.register
-import io.spine.internal.gradle.TaskName
+import io.spine.gradle.TaskName
+import io.spine.gradle.base.build
+import io.spine.gradle.named
+import io.spine.gradle.register
import org.gradle.api.Task
import org.gradle.api.tasks.TaskContainer
import org.gradle.api.tasks.TaskProvider
@@ -61,8 +61,8 @@ val TaskContainer.integrationTest: TaskProvider
* Here's an example of how to apply it in `build.gradle.kts`:
*
* ```
- * import io.spine.internal.gradle.javascript.javascript
- * import io.spine.internal.gradle.javascript.task.integrationTest
+ * import io.spine.gradle.javascript.javascript
+ * import io.spine.gradle.javascript.task.integrationTest
*
* // ...
*
@@ -74,6 +74,7 @@ val TaskContainer.integrationTest: TaskProvider
* }
* ```
*/
+@Suppress("unused")
fun JsTasks.integrationTest() {
linkSpineWebModule()
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/JsTasks.kt b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/JsTasks.kt
similarity index 85%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/JsTasks.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/JsTasks.kt
index b13d996..3cf6335 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/JsTasks.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/JsTasks.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,10 +24,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.javascript.task
+package io.spine.gradle.javascript.task
-import io.spine.internal.gradle.javascript.JsEnvironment
-import io.spine.internal.gradle.javascript.JsContext
+import io.spine.gradle.javascript.JsContext
+import io.spine.gradle.javascript.JsEnvironment
import org.gradle.api.Project
import org.gradle.api.tasks.TaskContainer
@@ -43,7 +43,7 @@ import org.gradle.api.tasks.TaskContainer
* Supposing, one needs to create a new task that would participate in building. Let the task name
* be `bundleJs`. To do that, several steps should be completed:
*
- * 1. Define the task name and type using [TaskName][io.spine.internal.gradle.TaskName].
+ * 1. Define the task name and type using [TaskName][io.spine.gradle.TaskName].
* 2. Create a public typed reference for the task upon [TaskContainer]. It would facilitate
* referencing to the new task, so that external tasks could depend on it. This reference
* should be documented.
@@ -53,9 +53,9 @@ import org.gradle.api.tasks.TaskContainer
* Here's an example of `bundleJs()` extension:
*
* ```
- * import io.spine.internal.gradle.named
- * import io.spine.internal.gradle.register
- * import io.spine.internal.gradle.TaskName
+ * import io.spine.gradle.named
+ * import io.spine.gradle.register
+ * import io.spine.gradle.TaskName
* import org.gradle.api.Task
* import org.gradle.api.tasks.TaskContainer
* import org.gradle.api.tasks.Exec
@@ -85,8 +85,8 @@ import org.gradle.api.tasks.TaskContainer
* And here's how to apply it in `build.gradle.kts`:
*
* ```
- * import io.spine.internal.gradle.javascript.javascript
- * import io.spine.internal.gradle.javascript.task.bundleJs
+ * import io.spine.gradle.javascript.javascript
+ * import io.spine.gradle.javascript.task.bundleJs
*
* // ...
*
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/LicenseReport.kt b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/LicenseReport.kt
similarity index 84%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/LicenseReport.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/LicenseReport.kt
index 8f8f6ff..c3b3a6a 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/LicenseReport.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/LicenseReport.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,12 +24,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.javascript.task
+package io.spine.gradle.javascript.task
-import io.spine.internal.gradle.named
-import io.spine.internal.gradle.register
-import io.spine.internal.gradle.report.license.generateLicenseReport
-import io.spine.internal.gradle.TaskName
+import io.spine.gradle.TaskName
+import io.spine.gradle.named
+import io.spine.gradle.register
+import io.spine.gradle.report.license.generateLicenseReport
import org.gradle.api.Task
import org.gradle.api.tasks.TaskContainer
import org.gradle.api.tasks.TaskProvider
@@ -42,8 +42,8 @@ import org.gradle.api.tasks.TaskProvider
* Here's an example of how to apply it in `build.gradle.kts`:
*
* ```
- * import io.spine.internal.gradle.javascript.javascript
- * import io.spine.internal.gradle.javascript.task.clean
+ * import io.spine.gradle.javascript.javascript
+ * import io.spine.gradle.javascript.task.clean
*
* // ...
*
@@ -54,6 +54,7 @@ import org.gradle.api.tasks.TaskProvider
* }
* ```
*/
+@Suppress("unused")
fun JsTasks.licenseReport() {
npmLicenseReport().also {
generateLicenseReport.configure {
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Publish.kt b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/Publish.kt
similarity index 87%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Publish.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/Publish.kt
index 01a67f5..7d1baea 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Publish.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/Publish.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,12 +24,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.javascript.task
+package io.spine.gradle.javascript.task
-import io.spine.internal.gradle.publish.publish
-import io.spine.internal.gradle.named
-import io.spine.internal.gradle.register
-import io.spine.internal.gradle.TaskName
+import io.spine.gradle.TaskName
+import io.spine.gradle.named
+import io.spine.gradle.publish.publish
+import io.spine.gradle.register
import org.gradle.api.Task
import org.gradle.api.tasks.TaskContainer
import org.gradle.api.tasks.TaskProvider
@@ -49,9 +49,9 @@ import org.gradle.api.tasks.TaskProvider
* Here's an example of how to apply it in `build.gradle.kts`:
*
* ```
- * import io.spine.internal.gradle.javascript.javascript
- * import io.spine.internal.gradle.javascript.task.assemble
- * import io.spine.internal.gradle.javascript.task.publish
+ * import io.spine.gradle.javascript.javascript
+ * import io.spine.gradle.javascript.task.assemble
+ * import io.spine.gradle.javascript.task.publish
*
* // ...
*
@@ -103,7 +103,7 @@ private val prepareJsPublicationName = TaskName.of("prepareJsPublication")
* Locates `prepareJsPublication` task in this [TaskContainer].
*
* This is a lifecycle task that prepares the NPM package in
- * [publicationDirectory][io.spine.internal.gradle.javascript.JsEnvironment.publicationDir]
+ * [publicationDirectory][io.spine.gradle.javascript.JsEnvironment.publicationDir]
* of the current `JsEnvironment`.
*/
val TaskContainer.prepareJsPublication: TaskProvider
@@ -168,11 +168,11 @@ private val publishJsName = TaskName.of("publishJs")
* Locates `publishJs` task in this [TaskContainer].
*
* The task publishes the prepared NPM package from
- * [publicationDirectory][io.spine.internal.gradle.javascript.JsEnvironment.publicationDir]
+ * [publicationDirectory][io.spine.gradle.javascript.JsEnvironment.publicationDir]
* using `npm publish`.
*
* Please note, in order to publish an NMP package, a valid
- * [npmAuthToken][io.spine.internal.gradle.javascript.JsEnvironment.npmAuthToken] should be
+ * [npmAuthToken][io.spine.gradle.javascript.JsEnvironment.npmAuthToken] should be
* set. If no token is set, a default dummy value is quite enough for the local development.
*
* @see npm-publish | npm Docs
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Webpack.kt b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/Webpack.kt
similarity index 85%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Webpack.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/Webpack.kt
index f758fc7..7c82ad7 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Webpack.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/javascript/task/Webpack.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,11 +24,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.javascript.task
+package io.spine.gradle.javascript.task
-import io.spine.internal.gradle.named
-import io.spine.internal.gradle.register
-import io.spine.internal.gradle.TaskName
+import io.spine.gradle.TaskName
+import io.spine.gradle.named
+import io.spine.gradle.register
import org.gradle.api.tasks.Copy
import org.gradle.api.tasks.TaskContainer
import org.gradle.api.tasks.TaskProvider
@@ -47,10 +47,10 @@ import org.gradle.api.tasks.TaskProvider
* Here's an example of how to apply it in `build.gradle.kts`:
*
* ```
- * import io.spine.internal.gradle.javascript.javascript
- * import io.spine.internal.gradle.javascript.task.assemble
- * import io.spine.internal.gradle.javascript.task.publish
- * import io.spine.internal.gradle.javascript.task.webpack
+ * import io.spine.gradle.javascript.javascript
+ * import io.spine.gradle.javascript.task.assemble
+ * import io.spine.gradle.javascript.task.publish
+ * import io.spine.gradle.javascript.task.webpack
*
* // ...
*
@@ -63,6 +63,7 @@ import org.gradle.api.tasks.TaskProvider
* }
* ```
*/
+@Suppress("unused")
fun JsTasks.webpack() {
assembleJs.configure {
@@ -92,6 +93,7 @@ private val copyBundledJsName = TaskName.of("copyBundledJs", Copy::class)
*
* The task copies bundled JavaScript sources to the publication directory.
*/
+@Suppress("unused")
val TaskContainer.copyBundledJs: TaskProvider
get() = named(copyBundledJsName)
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/kotlin/KotlinConfig.kt b/buildSrc/src/main/kotlin/io/spine/gradle/kotlin/KotlinConfig.kt
similarity index 87%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/kotlin/KotlinConfig.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/kotlin/KotlinConfig.kt
index b2964ce..65cdebd 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/kotlin/KotlinConfig.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/kotlin/KotlinConfig.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,15 +24,15 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.kotlin
+package io.spine.gradle.kotlin
import org.gradle.jvm.toolchain.JavaLanguageVersion
+import org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompilerOptions
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
-import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
/**
* Sets [Java toolchain](https://kotlinlang.org/docs/gradle.html#gradle-java-toolchains-support)
- * to the specified version (e.g. 11 or 8).
+ * to the specified version (e.g., 11 or 8).
*/
fun KotlinJvmProjectExtension.applyJvmToolchain(version: Int) {
jvmToolchain {
@@ -52,9 +52,9 @@ fun KotlinJvmProjectExtension.applyJvmToolchain(version: String) =
* Opts-in to experimental features that we use in our codebase.
*/
@Suppress("unused")
-fun KotlinCompile.setFreeCompilerArgs() {
- kotlinOptions {
- freeCompilerArgs = listOf(
+fun KotlinJvmCompilerOptions.setFreeCompilerArgs() {
+ freeCompilerArgs.addAll(
+ listOf(
"-Xskip-prerelease-check",
"-Xjvm-default=all",
"-Xinline-classes",
@@ -65,5 +65,5 @@ fun KotlinCompile.setFreeCompilerArgs() {
"kotlin.ExperimentalStdlibApi," +
"kotlin.experimental.ExperimentalTypeInference",
)
- }
+ )
}
diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/protobuf/ProtoTaskExtensions.kt b/buildSrc/src/main/kotlin/io/spine/gradle/protobuf/ProtoTaskExtensions.kt
new file mode 100644
index 0000000..6816669
--- /dev/null
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/protobuf/ProtoTaskExtensions.kt
@@ -0,0 +1,415 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.gradle.protobuf
+
+import com.google.protobuf.gradle.GenerateProtoTask
+import com.google.protobuf.gradle.ProtobufExtension
+import io.spine.gradle.sourceSets
+import java.io.File
+import java.nio.file.Files
+import java.nio.file.Path
+import java.nio.file.Paths
+import java.nio.file.StandardOpenOption.TRUNCATE_EXISTING
+import org.gradle.api.Project
+import org.gradle.api.file.SourceDirectorySet
+import org.gradle.api.tasks.SourceSet
+import org.gradle.kotlin.dsl.get
+import org.gradle.kotlin.dsl.getByType
+import org.gradle.plugins.ide.idea.GenerateIdeaModule
+import org.gradle.plugins.ide.idea.model.IdeaModel
+import org.gradle.plugins.ide.idea.model.IdeaModule
+import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
+import titleCaseFirstChar
+
+/**
+ * Obtains the path of the `generated` directory under the project root directory.
+ */
+private val Project.generatedDir: Path
+ get() = projectDir.resolve("generated").toPath()
+
+/**
+ * Obtains the `generated` directory for the source set of the task.
+ *
+ * If [language] is specified returns the subdirectory for this language.
+ */
+private fun GenerateProtoTask.generatedDir(language: String = ""): File {
+ val path = "${project.generatedDir}/${sourceSet.name}/$language"
+ return File(path)
+}
+
+/**
+ * Configures a [GenerateProtoTask] for the code which cannot use Spine Model Compiler
+ * (e.g., Spine Base or Spine Validation modules).
+ *
+ * The task configuration consists of the following steps:
+ *
+ * 1. Adding `"kotlin"` to the list of involved `protoc` builtins.
+ *
+ * 2. Turning on the generation of a descriptor set file for each source set.
+ * These files are placed under the `build/descriptors` directory.
+ *
+ * 3. Removing source code generated for `com.google` package for both Java and Kotlin.
+ * This is done at the final steps of the code generation.
+ *
+ * 4. Making `processResource` tasks depend on corresponding `generateProto` tasks.
+ * If the source set of the configured task isn't `main`, appropriate infix for
+ * the task names is used.
+ *
+ * The usage of this extension in a module build file would be:
+ * ```
+ * protobuf {
+ * generateProtoTasks.all().configureEach {
+ * setup()
+ * }
+ * }
+ * ```
+ * Using the same code under `subprojects` in a root build file does not seem to work because
+ * test descriptor set files are not copied to resources. Performing this configuration from
+ * a module build script solves the issue.
+ *
+ * IMPORTANT: In addition to calling `setup`, a submodule must contain a descriptor set reference
+ * file (`desc.ref`) files placed under `resources`. The descriptor reference file must contain
+ * a reference to the descriptor set file generated by the corresponding `GenerateProtoTask`.
+ *
+ * For example, for the `test` source set, the reference would be `known_types_test.desc`, and
+ * for the `main` source set, the reference would be `known_types_main.desc`.
+ *
+ * See `io.spine.code.proto.DescriptorReference` and `io.spine.code.proto.FileDescriptors` classes
+ * under the `base` project for more details.
+ */
+@Suppress("unused")
+fun GenerateProtoTask.setup() {
+ builtins.maybeCreate("kotlin")
+ setupDescriptorSetFileCreation()
+ doLast {
+ copyGeneratedFiles()
+ }
+ excludeProtocOutput()
+ setupKotlinCompile()
+ dependOnProcessResourcesTask()
+ makeDirsForIdeaModule()
+}
+
+/**
+ * Tell `protoc` to generate descriptor set files under the project build dir.
+ *
+ * The name of the descriptor set file to be generated
+ * is made to be unique via the project's Maven coordinates.
+ *
+ * As the last step of this task, writes a `desc.ref` file
+ * for the contextual source set, pointing to the generated descriptor set file.
+ * This is needed to allow other Spine libraries to locate and load the generated
+ * descriptor set files properly.
+ *
+ * Such a job is usually performed by Spine McJava plugin;
+ * however, it is not possible to use this plugin (or its code)
+ * in this repository due to cyclic dependencies.
+ */
+@Suppress(
+ "TooGenericExceptionCaught" /* Handling all file-writing failures in the same way.*/
+)
+fun GenerateProtoTask.setupDescriptorSetFileCreation() {
+ // Tell `protoc` generate a descriptor set file.
+ // The name of the generated file reflects the Maven coordinates of the project.
+ val ssn = sourceSet.name
+ generateDescriptorSet = true
+ val buildDir = project.layout.buildDirectory.asFile.get().path
+ val descriptorsDir = "$buildDir/descriptors/${ssn}"
+ val descriptorName = project.descriptorSetName(sourceSet)
+ with(descriptorSetOptions) {
+ path = "$descriptorsDir/$descriptorName"
+ includeImports = true
+ includeSourceInfo = true
+ }
+
+ // Add the descriptor set file into the resources.
+ project.sourceSets.named(ssn) {
+ resources.srcDirs(descriptorsDir)
+ }
+
+ // Create a `desc.ref` in the same resource folder,
+ // with the name of the descriptor set file created above.
+ this.doLast {
+ val descRefFile = File(descriptorsDir, "desc.ref")
+ descRefFile.createNewFile()
+ try {
+ Files.write(descRefFile.toPath(), setOf(descriptorName), TRUNCATE_EXISTING)
+ } catch (e: Exception) {
+ project.logger.error("Error writing `${descRefFile.absolutePath}`.", e)
+ throw e
+ }
+ }
+}
+
+/**
+ * Returns a name of the descriptor file for the given [sourceSet],
+ * reflecting the Maven coordinates of Gradle artifact, and the source set
+ * for which the descriptor set name is to be generated.
+ *
+ * The returned value is just a file name and does not contain a file path.
+ */
+private fun Project.descriptorSetName(sourceSet: SourceSet) =
+ arrayOf(
+ group.toString(),
+ name,
+ sourceSet.name,
+ version.toString()
+ ).joinToString(separator = "_", postfix = ".desc")
+
+/**
+ * Copies files from the [outputBaseDir][GenerateProtoTask.outputBaseDir] into
+ * a subdirectory of [generatedDir][Project.generatedDir] for
+ * the current [sourceSet][GenerateProtoTask.sourceSet].
+ *
+ * Also removes sources belonging to the `com.google` package in the target directory.
+ */
+private fun GenerateProtoTask.copyGeneratedFiles() {
+ project.copy {
+ from(outputBaseDir)
+ into(generatedDir())
+ }
+ deleteComGoogle("java")
+ deleteComGoogle("kotlin")
+}
+
+/**
+ * Remove the code generated for Google Protobuf library types.
+ *
+ * Java code for the `com.google` package was generated because we wanted
+ * to have descriptors for all the types, including those from Google Protobuf library.
+ * We want all the descriptors so that they are included into the resources used by
+ * the `io.spine.type.KnownTypes` class.
+ *
+ * Now, as we have the descriptors _and_ excessive Java or Kotlin code, we delete it to avoid
+ * classes that duplicate those coming from Protobuf library JARs.
+ */
+private fun GenerateProtoTask.deleteComGoogle(language: String) {
+ val comDirectory = generatedDir(language).resolve("com")
+ val googlePackage = comDirectory.resolve("google")
+
+ project.delete(googlePackage)
+
+ // If the `com` directory becomes empty, delete it too.
+ if (comDirectory.exists() && comDirectory.isDirectory && comDirectory.list()!!.isEmpty()) {
+ project.delete(comDirectory)
+ }
+}
+
+/**
+ * Exclude [GenerateProtoTask.outputBaseDir] from Java source set directories to avoid
+ * duplicated source code files.
+ */
+fun GenerateProtoTask.excludeProtocOutput() {
+ val protocOutputDir = File(outputBaseDir).parentFile
+ val java: SourceDirectorySet = sourceSet.java
+
+ // Filter out directories belonging to `build/generated/source/proto`.
+ val newSourceDirectories = java.sourceDirectories
+ .filter { !it.residesIn(protocOutputDir) }
+ .toSet()
+ // Make sure we start from scratch.
+ // Not doing this failed the following, real, assignment sometimes.
+ java.setSrcDirs(listOf())
+ java.srcDirs(newSourceDirectories)
+
+ // Add copied files to the Java source set.
+ java.srcDir(generatedDir("java"))
+ java.srcDir(generatedDir("kotlin"))
+}
+
+/**
+ * Make sure Kotlin compilation explicitly depends on this `GenerateProtoTask` to avoid racing.
+ */
+fun GenerateProtoTask.setupKotlinCompile() {
+ val kotlinCompile = project.kotlinCompilationTaskFor(sourceSet)
+ kotlinCompile?.dependsOn(this)
+}
+
+/**
+ * Make the tasks `processResources` depend on `generateProto` tasks explicitly so that:
+ * 1) Descriptor set files get into resources, avoiding the racing conditions
+ * during the build.
+ *
+ * 2) We don't have the warning "Execution optimizations have been disabled..." issued
+ * by Gradle during the build because Protobuf Gradle Plugin does not set
+ * dependencies between `generateProto` and `processResources` tasks.
+ */
+fun GenerateProtoTask.dependOnProcessResourcesTask() {
+ val processResources = processResourceTaskName(sourceSet.name)
+ project.tasks[processResources].dependsOn(this)
+}
+
+/**
+ * Obtains the name of the `processResource` task for the given source set name.
+ */
+private fun processResourceTaskName(sourceSetName: String): String {
+ val infix =
+ if (sourceSetName == "main") ""
+ else sourceSetName.titleCaseFirstChar()
+ return "process${infix}Resources"
+}
+
+private fun Project.kotlinCompilationTaskFor(sourceSet: SourceSet): KotlinCompilationTask<*>? {
+ val taskName = sourceSet.getCompileTaskName("Kotlin")
+ return tasks.named(taskName, KotlinCompilationTask::class.java).orNull
+}
+
+private fun File.residesIn(directory: File): Boolean =
+ canonicalFile.startsWith(directory.absolutePath)
+
+/**
+ * Ensures that generated directories for Java and Kotlin are created before [GenerateIdeaModule].
+ *
+ * This works as advised by `Utils.groovy` from Protobuf Gradle plugin:
+ * ```
+ * This is required because the IntelliJ IDEA plugin does not allow adding source directories
+ * that do not exist. The IntelliJ IDEA config files should be valid from the start even if
+ * a user runs './gradlew idea' before running './gradlew generateProto'.
+ * ```
+ */
+fun GenerateProtoTask.makeDirsForIdeaModule() {
+ project.plugins.withId("idea") {
+ val javaDir = generatedDir("java")
+ val kotlinDir = generatedDir("kotlin")
+ project.tasks.withType(GenerateIdeaModule::class.java).forEach {
+ it.doFirst {
+ javaDir.mkdirs()
+ kotlinDir.mkdirs()
+ }
+ }
+ }
+}
+
+/**
+ * Prints diagnostic output of `sourceDirs` and `generatedSourceDirs` of an [IdeaModule].
+ *
+ * To get a handle on [IdeaModule] please use the following code:
+ *
+ * ```kotlin
+ * val module = project.extensions.findByType(IdeaModel::class.java)!!.module
+ * ```
+ */
+@Suppress("unused") // To be used when debugging build scripts.
+fun IdeaModule.printSourceDirectories() {
+ println("**** [IDEA] Source directories:")
+ sourceDirs.forEach { println(it) }
+ println()
+ println("**** [IDEA] Generated source directories:")
+ generatedSourceDirs.forEach { println(it) }
+ println()
+ println("**** [IDEA] Excluded directories:")
+ excludeDirs.forEach { println(it) }
+}
+
+/**
+ * Obtains the directory where the Protobuf Gradle Plugin should place the generated code.
+ *
+ * The directory is fixed to be `$buildDir/generated/source/proto` and cannot be
+ * changed by the settings of the plugin. Even though [ProtobufExtension] has a property
+ * [generatedFilesBaseDir][ProtobufExtension.getGeneratedFilesBaseDir], which is supposed
+ * to be used for this purpose, it is declared with `@PackageScope` and thus cannot be
+ * accessed from outside the plugin. The Protobuf Gradle Plugin (at v0.9.2) does not
+ * modify the value of the property either.
+ */
+val Project.generatedSourceProtoDir: Path
+ get() = layout.buildDirectory.dir("generated/source/proto").get().asFile.toPath()
+
+/**
+ * Ensures that the sources generated by Protobuf Gradle Plugin
+ * are not included in the IDEA project.
+ *
+ * IDEA should only see the sources generated by ProtoData as
+ * we define in [GenerateProtoTask.excludeProtocOutput].
+ */
+@Suppress("unused")
+fun Project.configureIdea() {
+
+ fun filterSources(sources: Set, excludeDir: File): Set =
+ sources.filter { !it.residesIn(excludeDir) }.toSet()
+
+ pluginManager.withPlugin("idea") {
+ val idea = extensions.getByType()
+ with(idea.module) {
+ val protocOutput = file(generatedSourceProtoDir)
+ val protocTargets = protocTargets()
+ excludeWithNested(protocOutput.toPath(), protocTargets)
+ sourceDirs = filterSources(sourceDirs, protocOutput)
+ testSources.filter { !it.residesIn(protocOutput) }
+ generatedSourceDirs = generatedDir.resolve(protocTargets)
+ .map { it.toFile() }
+ .toSet()
+ }
+ }
+}
+
+/**
+ * Lists target directories for Protobuf code generation.
+ *
+ * The directory names are in the following format:
+ *
+ * `/`
+ */
+private fun Project.protocTargets(): List {
+ val protobufTasks = tasks.withType(GenerateProtoTask::class.java)
+ val codegenTargets = sequence {
+ protobufTasks.forEach { task ->
+ val sourceSet = task.sourceSet.name
+ val builtins = task.builtins.map { builtin -> builtin.name }
+ val plugins = task.plugins.map { plugin -> plugin.name }
+ val combined = builtins + plugins
+ combined.forEach { subdir ->
+ yield(Paths.get(sourceSet, subdir))
+ }
+ }
+ }
+ return codegenTargets.toList()
+}
+
+private fun Path.resolve(subdirs: Iterable): List =
+ subdirs.map {
+ resolve(it)
+ }
+
+/**
+ * Excludes the given directory and its subdirectories from
+ * being seen as ones with the source code.
+ *
+ * The primary use of this extension is to exclude `build/generated/source/proto` and its
+ * subdirectories to avoid duplication of types in the generated code with those in
+ * produced by ProtoData under the `$projectDir/generated/` directory.
+ */
+private fun IdeaModule.excludeWithNested(directory: Path, subdirs: Iterable) {
+ excludeDirs.add(directory.toFile())
+ directory.resolve(subdirs).forEach {
+ excludeDirs.add(it.toFile())
+ }
+}
+
+@Suppress("unused") // To be used when debugging build scripts.
+private fun printExcluded(dir: Any) {
+ println(" [IDEA] Excluding directory: $dir")
+}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/CheckVersionIncrement.kt b/buildSrc/src/main/kotlin/io/spine/gradle/publish/CheckVersionIncrement.kt
similarity index 80%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/CheckVersionIncrement.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/publish/CheckVersionIncrement.kt
index a81cbdc..9e38068 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/CheckVersionIncrement.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/publish/CheckVersionIncrement.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,11 +24,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.publish
+package io.spine.gradle.publish
import com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES
import com.fasterxml.jackson.dataformat.xml.XmlMapper
-import io.spine.internal.gradle.Repository
+import io.spine.gradle.Repository
import java.io.FileNotFoundException
import java.net.URL
import org.gradle.api.DefaultTask
@@ -70,8 +70,9 @@ open class CheckVersionIncrement : DefaultTask() {
val versions = metadata?.versioning?.versions
val versionExists = versions?.contains(version) ?: false
if (versionExists) {
- throw GradleException("""
- Version `$version` is already published to maven repository `$repoUrl`.
+ throw GradleException(
+ """
+ The version `$version` is already published to the Maven repository `$repoUrl`.
Try incrementing the library version.
All available versions are: ${versions?.joinToString(separator = ", ")}.
@@ -88,13 +89,28 @@ open class CheckVersionIncrement : DefaultTask() {
private fun Project.artifactPath(): String {
val group = this.group as String
- val name = "spine-${this.name}"
+ val name = "${artifactPrefix()}${this.name}"
val pathElements = ArrayList(group.split('.'))
pathElements.add(name)
val path = pathElements.joinToString(separator = "/")
return path
}
+
+ /**
+ * Returns the artifact prefix used for the publishing of this project.
+ *
+ * All current Spine modules should be using `SpinePublishing`.
+ * Therefore, the corresponding extension should be present in the root project.
+ * However, just in case, we define the "standard" prefix here as well.
+ *
+ * This value MUST be the same as defined by the defaults in `SpinePublishing`.
+ */
+ private fun Project.artifactPrefix(): String {
+ val ext = rootProject.extensions.findByType(SpinePublishing::class.java)
+ val result = ext?.artifactPrefix ?: SpinePublishing.DEFAULT_PREFIX
+ return result
+ }
}
private data class MavenMetadata(var versioning: Versioning = Versioning()) {
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/CloudArtifactRegistry.kt b/buildSrc/src/main/kotlin/io/spine/gradle/publish/CloudArtifactRegistry.kt
similarity index 93%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/CloudArtifactRegistry.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/publish/CloudArtifactRegistry.kt
index 4751d56..1cfa7c2 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/CloudArtifactRegistry.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/publish/CloudArtifactRegistry.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,12 +24,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.publish
+package io.spine.gradle.publish
import com.google.auth.oauth2.GoogleCredentials
import com.google.cloud.artifactregistry.auth.DefaultCredentialProvider
-import io.spine.internal.gradle.Credentials
-import io.spine.internal.gradle.Repository
+import io.spine.gradle.Credentials
+import io.spine.gradle.Repository
import java.io.IOException
import org.gradle.api.Project
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/CloudRepo.kt b/buildSrc/src/main/kotlin/io/spine/gradle/publish/CloudRepo.kt
similarity index 89%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/CloudRepo.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/publish/CloudRepo.kt
index 148ebce..7db15aa 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/CloudRepo.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/publish/CloudRepo.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,16 +24,16 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.publish
+package io.spine.gradle.publish
-import io.spine.internal.gradle.Repository
+import io.spine.gradle.Repository
/**
* CloudRepo Maven repository.
*
* There is a special treatment for this repository. Usually, fetching and publishing of artifacts
* is performed via the same URL. But it is not true for CloudRepo. Fetching is performed via
- * public repository, and publishing via private one. Their URLs differ in `/public` infix.
+ * the public repository, and publishing via the private one. Their URLs differ in `/public` infix.
*/
internal object CloudRepo {
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/GitHubPackages.kt b/buildSrc/src/main/kotlin/io/spine/gradle/publish/GitHubPackages.kt
similarity index 92%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/GitHubPackages.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/publish/GitHubPackages.kt
index fef0682..1072139 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/GitHubPackages.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/publish/GitHubPackages.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,10 +24,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.publish
+package io.spine.gradle.publish
-import io.spine.internal.gradle.Credentials
-import io.spine.internal.gradle.Repository
+import io.spine.gradle.Credentials
+import io.spine.gradle.Repository
+import io.spine.gradle.buildDirectory
import net.lingala.zip4j.ZipFile
import org.gradle.api.Project
@@ -90,7 +91,7 @@ private fun Project.readGitHubToken(): String {
* use such a workaround.
*/
private fun Project.readTokenFromArchive(): String {
- val targetDir = "${buildDir}/token"
+ val targetDir = "$buildDirectory/token"
file(targetDir).mkdirs()
val fileToUnzip = "${rootDir}/buildSrc/aus.weis"
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/IncrementGuard.kt b/buildSrc/src/main/kotlin/io/spine/gradle/publish/IncrementGuard.kt
similarity index 86%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/IncrementGuard.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/publish/IncrementGuard.kt
index b97a5ee..b6683fa 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/IncrementGuard.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/publish/IncrementGuard.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -26,7 +26,7 @@
@file:Suppress("unused")
-package io.spine.internal.gradle.publish
+package io.spine.gradle.publish
import org.gradle.api.Plugin
import org.gradle.api.Project
@@ -45,19 +45,20 @@ class IncrementGuard : Plugin {
/**
* Adds the [CheckVersionIncrement] task to the project.
*
- * Only adds the check if the project is built on Travis CI and the job is a pull request.
+ * The task is created anyway, but it is enabled only if:
+ * 1. The project is built on GitHub CI, and
+ * 2. The job is a pull request.
*
- * The task only runs on non-master branches on GitHub Actions. This is done
- * to prevent unexpected CI fails when re-building `master` multiple times, creating git
- * tags, and in other cases that go outside of the "usual" development cycle.
+ * The task only runs on non-master branches on GitHub Actions.
+ * This is done to prevent unexpected CI fails when re-building `master` multiple times,
+ * creating git tags, and in other cases that go outside the "usual" development cycle.
*/
override fun apply(target: Project) {
val tasks = target.tasks
tasks.register(taskName, CheckVersionIncrement::class.java) {
- repository = CloudRepo.published
+ repository = CloudArtifactRegistry.repository
tasks.getByName("check").dependsOn(this)
- shouldRunAfter("test")
if (!shouldCheckVersion()) {
logger.info(
"The build does not represent a GitHub Actions feature branch job, " +
@@ -72,7 +73,7 @@ class IncrementGuard : Plugin {
* Returns `true` if the current build is a GitHub Actions build which represents a push
* to a feature branch.
*
- * Returns `false` if the associated reference is not a branch (e.g. a tag) or if it has
+ * Returns `false` if the associated reference is not a branch (e.g., a tag) or if it has
* the name which ends with `master` or `main`.
*
* For example, on the following branches the method would return `false`:
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/JarDsl.kt b/buildSrc/src/main/kotlin/io/spine/gradle/publish/JarDsl.kt
similarity index 97%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/JarDsl.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/publish/JarDsl.kt
index 2bc2870..1371184 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/JarDsl.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/publish/JarDsl.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.publish
+package io.spine.gradle.publish
/**
* A DSL element of [SpinePublishing] extension which configures publishing of
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/ProtoExts.kt b/buildSrc/src/main/kotlin/io/spine/gradle/publish/ProtoExts.kt
similarity index 94%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/ProtoExts.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/publish/ProtoExts.kt
index 97e3319..874b7f9 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/ProtoExts.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/publish/ProtoExts.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,9 +24,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.publish
+package io.spine.gradle.publish
-import io.spine.internal.gradle.sourceSets
+import io.spine.gradle.sourceSets
import java.io.File
import org.gradle.api.Project
import org.gradle.api.Task
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/Publications.kt b/buildSrc/src/main/kotlin/io/spine/gradle/publish/Publications.kt
similarity index 78%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/Publications.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/publish/Publications.kt
index be3bc0e..c9acef8 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/Publications.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/publish/Publications.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,10 +24,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.publish
+package io.spine.gradle.publish
-import io.spine.internal.gradle.Repository
-import io.spine.internal.gradle.isSnapshot
+import io.spine.gradle.Repository
+import io.spine.gradle.isSnapshot
import org.gradle.api.Project
import org.gradle.api.artifacts.dsl.RepositoryHandler
import org.gradle.api.publish.maven.MavenPublication
@@ -80,13 +80,35 @@ internal sealed class PublicationHandler(
}
/**
- * Takes a group name and a version from the given [project] and assigns
- * them to this publication.
+ * Copies the attributes of Gradle [Project] to this [MavenPublication].
+ *
+ * The following project attributes are copied:
+ * * [group][Project.getGroup];
+ * * [version][Project.getVersion];
+ * * [description][Project.getDescription].
+ *
+ * Also, this function adds the [artifactPrefix][SpinePublishing.artifactPrefix] to
+ * the [artifactId][MavenPublication.setArtifactId] of this publication,
+ * if the prefix is not added yet.
+ *
+ * Finally, the Apache Software License 2.0 is set as the only license
+ * under which the published artifact is distributed.
*/
- protected fun MavenPublication.assignMavenCoordinates() {
+ protected fun MavenPublication.copyProjectAttributes() {
groupId = project.group.toString()
- artifactId = project.spinePublishing.artifactPrefix + artifactId
+ val prefix = project.spinePublishing.artifactPrefix
+ if (!artifactId.startsWith(prefix)) {
+ artifactId = prefix + artifactId
+ }
version = project.version.toString()
+ pom.description.set(project.description)
+
+ pom.licenses {
+ license {
+ name.set("The Apache Software License, Version 2.0")
+ url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
+ }
+ }
}
}
@@ -110,7 +132,7 @@ private fun RepositoryHandler.register(project: Project, repository: Repository)
/**
* A publication for a typical Java project.
*
- * In Gradle, in order to publish something somewhere one should create a publication.
+ * In Gradle, to publish something, one should create a publication.
* A publication has a name and consists of one or more artifacts plus information about
* those artifacts – the metadata.
*
@@ -142,7 +164,7 @@ internal class StandardJavaPublicationHandler(
val jars = project.artifacts(jarFlags)
val publications = project.publications
publications.create("mavenJava") {
- assignMavenCoordinates()
+ copyProjectAttributes()
specifyArtifacts(jars)
}
}
@@ -152,14 +174,14 @@ internal class StandardJavaPublicationHandler(
*
* A typical Maven publication contains:
*
- * 1. Jar archives. For example: compilation output, sources, javadoc, etc.
- * 2. Maven metadata file that has ".pom" extension.
- * 3. Gradle's metadata file that has ".module" extension.
+ * 1. Jar archives. For example, compilation output, sources, javadoc, etc.
+ * 2. Maven metadata file that has the ".pom" extension.
+ * 3. Gradle's metadata file that has the ".module" extension.
*
- * Metadata files contain information about a publication itself, its artifacts and their
+ * Metadata files contain information about a publication itself, its artifacts, and their
* dependencies. Presence of ".pom" file is mandatory for publication to be consumed by
* `mvn` build tool itself or other build tools that understand Maven notation (Gradle, Ivy).
- * Presence of ".module" is optional, but useful when a publication is consumed by Gradle.
+ * The presence of ".module" is optional, but useful when a publication is consumed by Gradle.
*
* @see Maven – POM Reference
* @see
@@ -191,14 +213,14 @@ internal class StandardJavaPublicationHandler(
*
* Such publications should be treated differently than [StandardJavaPublicationHandler],
* which is created for a module. Instead, since the publications are already declared,
- * this class only [assigns maven coordinates][assignMavenCoordinates].
+ * this class only [assigns maven coordinates][copyProjectAttributes].
*
* A module which declares custom publications must be specified in
* the [SpinePublishing.modulesWithCustomPublishing] property.
*
* If a module with [publications] declared locally is not specified as one with custom publishing,
* it may cause a name clash between an artifact produced by the [standard][MavenPublication]
- * publication, and custom ones. In order to have both standard and custom publications,
+ * publication, and custom ones. To have both standard and custom publications,
* please specify custom artifact IDs or classifiers for each custom publication.
*/
internal class CustomPublicationHandler(project: Project, destinations: Set) :
@@ -206,7 +228,7 @@ internal class CustomPublicationHandler(project: Project, destinations: Set()
+ get() {
+ val local = this.extensions.findByType()
+ if (local != null) {
+ return local
+ }
+ val fromRoot = this.rootProject.extensions.findByType()
+ if (fromRoot != null) {
+ return fromRoot
+ }
+ error("`SpinePublishing` is not found in `${project.name}`.")
+ }
/**
* Tells if this project has custom publishing.
@@ -212,7 +225,8 @@ internal fun Project.testJar(): TaskProvider = tasks.getOrCreate("testJar")
*/
fun Project.javadocJar(): TaskProvider = tasks.getOrCreate("javadocJar") {
archiveClassifier.set("javadoc")
- from(files("$buildDir/docs/javadoc"))
+ val javadocFiles = layout.buildDirectory.files("/docs/javadoc")
+ from(javadocFiles)
dependsOn("javadoc")
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/PublishingRepos.kt b/buildSrc/src/main/kotlin/io/spine/gradle/publish/PublishingRepos.kt
similarity index 86%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/PublishingRepos.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/publish/PublishingRepos.kt
index 36fcac4..f383e68 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/PublishingRepos.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/publish/PublishingRepos.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,17 +24,15 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.publish
+package io.spine.gradle.publish
-import io.spine.internal.gradle.Repository
+import io.spine.gradle.Repository
/**
* Repositories to which we may publish.
*/
object PublishingRepos {
- val cloudRepo = CloudRepo.destination
-
val cloudArtifactRegistry = CloudArtifactRegistry.repository
/**
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/SpinePublishing.kt b/buildSrc/src/main/kotlin/io/spine/gradle/publish/SpinePublishing.kt
similarity index 87%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/SpinePublishing.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/publish/SpinePublishing.kt
index 0f90975..2f74536 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/SpinePublishing.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/publish/SpinePublishing.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,11 +24,13 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.publish
+@file:Suppress("TooManyFunctions")
+
+package io.spine.gradle.publish
import dokkaJavaJar
import dokkaKotlinJar
-import io.spine.internal.gradle.Repository
+import io.spine.gradle.Repository
import org.gradle.api.Project
import org.gradle.api.publish.maven.plugins.MavenPublishPlugin
import org.gradle.kotlin.dsl.apply
@@ -102,9 +104,9 @@ import org.gradle.kotlin.dsl.findByType
* 3. [javadocJar] - javadoc, generated upon Java sources from "main" source set.
* If javadoc for Kotlin is also needed, apply Dokka plugin. It tunes `javadoc` task to generate
* docs upon Kotlin sources as well.
- * 4. [dokkaKotlinJar][dokkaKotlinJar] - documentation generated by Dokka for Kotlin and Java sources
+ * 4. [dokkaKotlinJar] - documentation generated by Dokka for Kotlin and Java sources
* using the Kotlin API mode.
- * 5. [dokkaJavaJar][dokkaJavaJar] - documentation generated by Dokka for Kotlin and Java sources
+ * 5. [dokkaJavaJar] - documentation generated by Dokka for Kotlin and Java sources
* * using the Java API mode.
*
* Additionally, [testJar] artifact can be published. This artifact contains compilation output
@@ -135,6 +137,14 @@ fun Project.spinePublishing(block: SpinePublishing.() -> Unit) {
*/
open class SpinePublishing(private val project: Project) {
+ companion object {
+
+ /**
+ * The default prefix added before a module name when publishing artifacts.
+ */
+ const val DEFAULT_PREFIX = "spine-"
+ }
+
private val protoJar = ProtoJar()
private val testJar = TestJar()
private val dokkaJar = DokkaJar()
@@ -142,7 +152,7 @@ open class SpinePublishing(private val project: Project) {
/**
* Set of modules to be published.
*
- * Both module's name or path can be used.
+ * Both the module's name or path can be used.
*
* Use this property if the extension is configured from a root project's build file.
*
@@ -152,6 +162,22 @@ open class SpinePublishing(private val project: Project) {
*/
var modules: Set = emptySet()
+ /**
+ * Controls whether the published module needs standard publications.
+ *
+ * If `true`, the module should configure publications on its own.
+ * Otherwise, the extension will configure standard [ones][StandardJavaPublicationHandler].
+ *
+ * This property is analogue of [modulesWithCustomPublishing] for projects,
+ * for which [spinePublishing] is configured individually.
+ *
+ * Setting of this property and having a non-empty [modules] will lead
+ * to an exception.
+ *
+ * Default value is `false`.
+ */
+ var customPublishing = false
+
/**
* Set of modules that have custom publications and do not need standard ones.
*
@@ -179,16 +205,14 @@ open class SpinePublishing(private val project: Project) {
/**
* A prefix to be added before the name of each artifact.
- *
- * Default value is "spine-".
*/
- var artifactPrefix: String = "spine-"
+ var artifactPrefix: String = DEFAULT_PREFIX
/**
* Allows disabling publishing of [protoJar] artifact, containing all Proto sources
* from `sourceSets.main.proto`.
*
- * Here's an example of how to disable it for some of published modules:
+ * Here's an example of how to disable it for some of the published modules:
*
* ```
* spinePublishing {
@@ -214,8 +238,8 @@ open class SpinePublishing(private val project: Project) {
* }
* ```
*
- * The resulting artifact is available under "proto" classifier. I.e., in Gradle 7+, one could
- * depend on it like this:
+ * The resulting artifact is available under "proto" classifier.
+ * For example, in Gradle 7+, one could depend on it like this:
*
* ```
* implementation("io.spine:spine-client:$version@proto")
@@ -227,7 +251,7 @@ open class SpinePublishing(private val project: Project) {
* Allows enabling publishing of [testJar] artifact, containing compilation output
* of "test" source set.
*
- * Here's an example of how to enable it for some of published modules:
+ * Here's an example of how to enable it for some of the published modules:
*
* ```
* spinePublishing {
@@ -271,7 +295,7 @@ open class SpinePublishing(private val project: Project) {
*
* Remember that the Dokka Gradle plugin should be applied to publish this artifact as it is
* produced by the `dokkaHtml` task. It can be done by using the
- * [io.spine.internal.dependency.Dokka] dependency object or by applying the
+ * [io.spine.dependency.build.Dokka] dependency object or by applying the
* `buildSrc/src/main/kotlin/dokka-for-kotlin` or
* `buildSrc/src/main/kotlin/dokka-for-java` script plugins.
*
@@ -299,7 +323,8 @@ open class SpinePublishing(private val project: Project) {
internal fun configured() {
ensureProtoJarExclusionsArePublished()
ensureTestJarInclusionsArePublished()
- ensuresModulesNotDuplicated()
+ ensureModulesNotDuplicated()
+ ensureCustomPublishingNotMisused()
val projectsToPublish = projectsToPublish()
projectsToPublish.forEach { project ->
@@ -352,7 +377,7 @@ open class SpinePublishing(private val project: Project) {
* we configure publishing for it.
*/
private fun Project.setUpPublishing(jarFlags: JarFlags) {
- val customPublishing = modulesWithCustomPublishing.contains(name)
+ val customPublishing = modulesWithCustomPublishing.contains(name) || customPublishing
val handler = if (customPublishing) {
CustomPublicationHandler(project, destinations)
} else {
@@ -409,7 +434,7 @@ open class SpinePublishing(private val project: Project) {
* We allow configuration of publishing from two places - a root project and module itself.
* Here we verify that publishing of a module is not configured in both places simultaneously.
*/
- private fun ensuresModulesNotDuplicated() {
+ private fun ensureModulesNotDuplicated() {
val rootProject = project.rootProject
if (rootProject == project) {
return
@@ -425,4 +450,11 @@ open class SpinePublishing(private val project: Project) {
}
}
}
+
+ private fun ensureCustomPublishingNotMisused() {
+ if (modules.isNotEmpty() && customPublishing) {
+ error("`customPublishing` property can be set only if `spinePublishing` extension " +
+ "is open in an individual module, so `modules` property should be empty.")
+ }
+ }
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/CodebaseFilter.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/CodebaseFilter.kt
similarity index 94%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/CodebaseFilter.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/CodebaseFilter.kt
index 4b0a9cc..a5b9e72 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/CodebaseFilter.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/CodebaseFilter.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,10 +24,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.report.coverage
+package io.spine.gradle.report.coverage
import com.google.errorprone.annotations.CanIgnoreReturnValue
-import io.spine.internal.gradle.report.coverage.FileFilter.generatedOnly
+import io.spine.gradle.report.coverage.FileFilter.generatedOnly
import java.io.File
import kotlin.streams.toList
import org.gradle.api.Project
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/FileExtension.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/FileExtension.kt
similarity index 91%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/FileExtension.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/FileExtension.kt
index 75763dd..ae4734c 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/FileExtension.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/FileExtension.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.report.coverage
+package io.spine.gradle.report.coverage
/**
* File extensions.
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/FileExtensions.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/FileExtensions.kt
similarity index 85%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/FileExtensions.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/FileExtensions.kt
index 69193ba..89c8789 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/FileExtensions.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/FileExtensions.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,16 +24,16 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.report.coverage
+package io.spine.gradle.report.coverage
-import io.spine.internal.gradle.report.coverage.FileExtension.COMPILED_CLASS
-import io.spine.internal.gradle.report.coverage.FileExtension.JAVA_SOURCE
-import io.spine.internal.gradle.report.coverage.PathMarker.ANONYMOUS_CLASS
-import io.spine.internal.gradle.report.coverage.PathMarker.GENERATED
-import io.spine.internal.gradle.report.coverage.PathMarker.GRPC_SRC_FOLDER
-import io.spine.internal.gradle.report.coverage.PathMarker.JAVA_OUTPUT_FOLDER
-import io.spine.internal.gradle.report.coverage.PathMarker.JAVA_SRC_FOLDER
-import io.spine.internal.gradle.report.coverage.PathMarker.SPINE_JAVA_SRC_FOLDER
+import io.spine.gradle.report.coverage.FileExtension.COMPILED_CLASS
+import io.spine.gradle.report.coverage.FileExtension.JAVA_SOURCE
+import io.spine.gradle.report.coverage.PathMarker.ANONYMOUS_CLASS
+import io.spine.gradle.report.coverage.PathMarker.GENERATED
+import io.spine.gradle.report.coverage.PathMarker.GRPC_SRC_FOLDER
+import io.spine.gradle.report.coverage.PathMarker.JAVA_OUTPUT_FOLDER
+import io.spine.gradle.report.coverage.PathMarker.JAVA_SRC_FOLDER
+import io.spine.gradle.report.coverage.PathMarker.SPINE_JAVA_SRC_FOLDER
import java.io.File
/**
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/FileFilter.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/FileFilter.kt
similarity index 92%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/FileFilter.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/FileFilter.kt
index cc80ea1..5b26cc7 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/FileFilter.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/FileFilter.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.report.coverage
+package io.spine.gradle.report.coverage
import java.io.File
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/JacocoConfig.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/JacocoConfig.kt
similarity index 83%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/JacocoConfig.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/JacocoConfig.kt
index 4d789a5..de5d00b 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/JacocoConfig.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/JacocoConfig.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,19 +24,19 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.report.coverage
+package io.spine.gradle.report.coverage
-import io.spine.internal.gradle.applyPlugin
-import io.spine.internal.gradle.findTask
-import io.spine.internal.gradle.report.coverage.TaskName.check
-import io.spine.internal.gradle.report.coverage.TaskName.copyReports
-import io.spine.internal.gradle.report.coverage.TaskName.jacocoRootReport
-import io.spine.internal.gradle.report.coverage.TaskName.jacocoTestReport
-import io.spine.internal.gradle.sourceSets
+import io.spine.dependency.test.Jacoco
+import io.spine.gradle.applyPlugin
+import io.spine.gradle.findTask
+import io.spine.gradle.report.coverage.TaskName.check
+import io.spine.gradle.report.coverage.TaskName.copyReports
+import io.spine.gradle.report.coverage.TaskName.jacocoRootReport
+import io.spine.gradle.report.coverage.TaskName.jacocoTestReport
+import io.spine.gradle.sourceSets
import java.io.File
import java.util.*
import org.gradle.api.Project
-import org.gradle.api.Task
import org.gradle.api.file.ConfigurableFileCollection
import org.gradle.api.plugins.BasePlugin
import org.gradle.api.tasks.Copy
@@ -45,7 +45,9 @@ import org.gradle.api.tasks.SourceSetOutput
import org.gradle.api.tasks.TaskContainer
import org.gradle.api.tasks.TaskProvider
import org.gradle.kotlin.dsl.get
+import org.gradle.kotlin.dsl.the
import org.gradle.testing.jacoco.plugins.JacocoPlugin
+import org.gradle.testing.jacoco.plugins.JacocoPluginExtension
import org.gradle.testing.jacoco.tasks.JacocoReport
/**
@@ -90,8 +92,13 @@ class JacocoConfig(
fun applyTo(project: Project) {
project.applyPlugin(BasePlugin::class.java)
val javaProjects: Iterable = eligibleProjects(project)
- val reportsDir = project.rootProject.buildDir.resolve(reportsDirSuffix)
- JacocoConfig(project.rootProject, reportsDir, javaProjects).configure()
+ val reportsDir = project.rootProject.layout
+ .buildDirectory.dir(reportsDirSuffix).get().asFile
+ JacocoConfig(
+ project.rootProject,
+ reportsDir,
+ javaProjects
+ ).configure()
}
/**
@@ -117,12 +124,22 @@ class JacocoConfig(
}
private fun configure() {
+ configureVersion()
+ configureTask()
+ }
+
+ private fun configureVersion() {
+ val jacoco = rootProject.the()
+ jacoco.toolVersion = Jacoco.version
+ }
+
+ private fun configureTask() {
val tasks = rootProject.tasks
val copyReports = registerCopy(tasks)
val rootReport = registerRootReport(tasks, copyReports)
- rootProject
- .findTask(check.name)
- .dependsOn(rootReport)
+ tasks.named(check.name) {
+ dependsOn(rootReport)
+ }
}
private fun registerRootReport(
@@ -131,9 +148,14 @@ class JacocoConfig(
): TaskProvider {
val allSourceSets = Projects(projects).sourceSets()
val mainJavaSrcDirs = allSourceSets.mainJavaSrcDirs()
- val humanProducedSourceFolders = FileFilter.producedByHuman(mainJavaSrcDirs)
-
- val filter = CodebaseFilter(rootProject, mainJavaSrcDirs, allSourceSets.mainOutputs())
+ val humanProducedSourceFolders =
+ FileFilter.producedByHuman(mainJavaSrcDirs)
+
+ val filter = CodebaseFilter(
+ rootProject,
+ mainJavaSrcDirs,
+ allSourceSets.mainOutputs()
+ )
val humanProducedCompiledFiles = filter.humanProducedCompiledFiles()
val rootReport = tasks.register(jacocoRootReport.name, JacocoReport::class.java) {
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/PathMarker.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/PathMarker.kt
similarity index 93%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/PathMarker.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/PathMarker.kt
index 06b0bc5..26bb135 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/PathMarker.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/PathMarker.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.report.coverage
+package io.spine.gradle.report.coverage
/**
* Fragments of file path which allow to detect the type of the file.
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/TaskName.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/TaskName.kt
similarity index 86%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/TaskName.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/TaskName.kt
index c81c24c..7c0e386 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/TaskName.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/coverage/TaskName.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,10 +24,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.report.coverage
+package io.spine.gradle.report.coverage
/**
- * The names of Gradle tasks involved into the JaCoCo reporting.
+ * The names of Gradle tasks involved in the JaCoCo reporting.
*/
@Suppress("EnumEntryName", "EnumNaming") /* Dubbing the actual values in Gradle. */
internal enum class TaskName {
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/Configuration.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/license/Configuration.kt
similarity index 92%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/Configuration.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/report/license/Configuration.kt
index 32b24b2..f6e06fd 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/Configuration.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/license/Configuration.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.report.license
+package io.spine.gradle.report.license
import com.github.jk1.license.ConfigurationData
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/LicenseReporter.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/license/LicenseReporter.kt
similarity index 88%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/LicenseReporter.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/report/license/LicenseReporter.kt
index f7f1a31..9b7a57f 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/LicenseReporter.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/license/LicenseReporter.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,13 +24,13 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.report.license
+package io.spine.gradle.report.license
import com.github.jk1.license.LicenseReportExtension
import com.github.jk1.license.LicenseReportExtension.ALL
import com.github.jk1.license.LicenseReportPlugin
-import io.spine.internal.gradle.applyPlugin
-import io.spine.internal.gradle.findTask
+import io.spine.gradle.applyPlugin
+import io.spine.gradle.findTask
import java.io.File
import org.gradle.api.Project
import org.gradle.api.Task
@@ -80,11 +80,17 @@ object LicenseReporter {
*/
fun generateReportIn(project: Project) {
project.applyPlugin(LicenseReportPlugin::class.java)
- val reportOutputDir = project.buildDir.resolve(Paths.relativePath)
+ val reportOutputDir = project.layout.buildDirectory.dir(Paths.relativePath).get().asFile
with(project.the()) {
outputDir = reportOutputDir.absolutePath
- excludeGroups = arrayOf("io.spine", "io.spine.tools", "io.spine.gcloud")
+ excludeGroups = arrayOf(
+ "io.spine",
+ "io.spine.gcloud",
+ "io.spine.protodata",
+ "io.spine.tools",
+ "io.spine.validation"
+ )
configurations = ALL
renderers = arrayOf(MarkdownReportRenderer(Paths.outputFilename))
@@ -146,7 +152,8 @@ object LicenseReporter {
rootProject: Project
) {
val paths = sourceProjects.map {
- "${it.buildDir}/${Paths.relativePath}/${Paths.outputFilename}"
+ val buildDir = it.layout.buildDirectory.asFile.get()
+ "$buildDir/${Paths.relativePath}/${Paths.outputFilename}"
}
println("Merging the license reports from the all projects.")
val mergedContent = paths.joinToString("\n\n\n") { (File(it)).readText() }
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/MarkdownReportRenderer.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/license/MarkdownReportRenderer.kt
similarity index 84%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/MarkdownReportRenderer.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/report/license/MarkdownReportRenderer.kt
index e1cd8af..b158210 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/MarkdownReportRenderer.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/license/MarkdownReportRenderer.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,12 +24,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.report.license
+package io.spine.gradle.report.license
import com.github.jk1.license.LicenseReportExtension
import com.github.jk1.license.ProjectData
import com.github.jk1.license.render.ReportRenderer
-import io.spine.internal.markup.MarkdownDocument
+import io.spine.docs.MarkdownDocument
import java.io.File
import org.gradle.api.Project
@@ -54,9 +54,8 @@ internal class MarkdownReportRenderer(
}
private fun outputFile(project: Project): File {
- val config =
- project.extensions.findByName("licenseReport") as LicenseReportExtension
- return File(config.outputDir).resolve(filename)
+ val ext = project.extensions.findByName("licenseReport") as LicenseReportExtension
+ return File(ext.outputDir).resolve(filename)
}
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/ModuleDataExtensions.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/license/ModuleDataExtensions.kt
similarity index 93%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/ModuleDataExtensions.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/report/license/ModuleDataExtensions.kt
index b472396..0aca30f 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/ModuleDataExtensions.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/license/ModuleDataExtensions.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,10 +24,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.report.license
+package io.spine.gradle.report.license
import com.github.jk1.license.ModuleData
-import io.spine.internal.markup.MarkdownDocument
+import io.spine.docs.MarkdownDocument
import kotlin.reflect.KCallable
/**
@@ -49,7 +49,7 @@ internal fun MarkdownDocument.printSection(
}
/**
- * Prints the metadata of the module to the specified [Markdown document][out].
+ * Prints the module metadata to this [MarkdownDocument].
*/
private fun MarkdownDocument.printModule(module: ModuleData) {
ol()
@@ -105,7 +105,7 @@ private fun MarkdownDocument.printProjectUrl(projectUrl: String?, indent: Int) {
}
/**
- * Prints the links to the the source code licenses.
+ * Prints the links to the source code licenses.
*/
@Suppress("SameParameterValue" /* Indentation is consistent across the list. */)
private fun MarkdownDocument.printLicenses(licenses: Set, indent: Int) {
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/Paths.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/license/Paths.kt
similarity index 89%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/Paths.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/report/license/Paths.kt
index 89fb859..975a73b 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/Paths.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/license/Paths.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.report.license
+package io.spine.gradle.report.license
/**
* Filesystem paths used by [LicenseReporter].
@@ -40,7 +40,7 @@ internal object Paths {
* Its contents describe the licensing information for each of the Java dependencies
* which are referenced by Gradle projects in the repository.
*/
- internal const val outputFilename = "license-report.md"
+ internal const val outputFilename = "dependencies.md"
/**
* The path to a directory, to which a per-project report is generated.
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/ProjectDependencies.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/license/ProjectDependencies.kt
similarity index 93%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/ProjectDependencies.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/report/license/ProjectDependencies.kt
index fc90bb3..d9e569c 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/ProjectDependencies.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/license/ProjectDependencies.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,11 +24,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.report.license
+package io.spine.gradle.report.license
import com.github.jk1.license.ModuleData
import com.github.jk1.license.ProjectData
-import io.spine.internal.markup.MarkdownDocument
+import io.spine.docs.MarkdownDocument
/**
* Dependencies of some [Gradle project][ProjectData] classified by the Gradle configuration
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/Tasks.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/license/Tasks.kt
similarity index 91%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/Tasks.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/report/license/Tasks.kt
index 6a57be5..05df91a 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/Tasks.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/license/Tasks.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.report.license
+package io.spine.gradle.report.license
import org.gradle.api.Task
import org.gradle.api.tasks.TaskContainer
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/Template.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/license/Template.kt
similarity index 91%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/Template.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/report/license/Template.kt
index 3eccbca..adda37b 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/Template.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/license/Template.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,10 +24,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.report.license
+package io.spine.gradle.report.license
-import io.spine.internal.gradle.artifactId
-import io.spine.internal.markup.MarkdownDocument
+import io.spine.docs.MarkdownDocument
+import io.spine.gradle.artifactId
import java.util.*
import org.gradle.api.Project
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/DependencyScope.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/DependencyScope.kt
similarity index 91%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/DependencyScope.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/report/pom/DependencyScope.kt
index 9c1f1ed..1b4f478 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/DependencyScope.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/DependencyScope.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.report.pom
+package io.spine.gradle.report.pom
/**
* A Maven dependency scope.
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/DependencyWriter.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/DependencyWriter.kt
similarity index 84%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/DependencyWriter.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/report/pom/DependencyWriter.kt
index fb1920b..af3873c 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/DependencyWriter.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/DependencyWriter.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,13 +24,14 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.report.pom
+package io.spine.gradle.report.pom
import groovy.xml.MarkupBuilder
import java.io.Writer
import java.util.*
import kotlin.reflect.full.isSubclassOf
import org.gradle.api.Project
+import org.gradle.api.artifacts.Configuration
import org.gradle.api.artifacts.Dependency
import org.gradle.api.internal.artifacts.dependencies.AbstractExternalModuleDependency
import org.gradle.kotlin.dsl.withGroovyBuilder
@@ -126,13 +127,34 @@ private fun Project.depsFromAllConfigurations(): Set {
}
configuration.dependencies.filter { it.isExternal() }
.forEach { dependency ->
- val moduleDependency = ModuleDependency(project, configuration, dependency)
+ val forcedVersion = configuration.forcedVersionOf(dependency)
+ val moduleDependency =
+ if (forcedVersion != null) {
+ ModuleDependency(project, configuration, dependency, forcedVersion)
+ } else {
+ ModuleDependency(project, configuration, dependency)
+ }
result.add(moduleDependency)
}
}
return result
}
+/**
+ * Searches for a forced version of given [dependency] in this [Configuration].
+ *
+ * Returns `null`, if it wasn't forced.
+ */
+private fun Configuration.forcedVersionOf(dependency: Dependency): String? {
+ val forcedModules = resolutionStrategy.forcedModules
+ val maybeForced = forcedModules.firstOrNull {
+ it.group == dependency.group
+ && it.name == dependency.name
+ && it.version != null
+ }
+ return maybeForced?.version
+}
+
/**
* Tells whether the dependency is an external module dependency.
*/
@@ -160,7 +182,7 @@ private fun Project.deduplicate(dependencies: Set): List
- group.value.maxByOrNull { dep -> dep.version!! }!!
+ group.value.maxByOrNull { dep -> dep.version }!!
}
return filtered
}
@@ -177,7 +199,7 @@ private fun Project.logDuplicate(dependency: String, versions: List {
companion object {
- private val COMPARATOR = compareBy { it.module }
+ private val COMPARATOR = compareBy { it.project }
.thenBy { it.configuration.name }
.thenBy { it.group }
.thenBy { it.name }
- .thenBy { it.version }
+ .thenBy { it.factualVersion }
}
+ override fun getVersion(): String = factualVersion
+
/**
* A project dependency with its [scope][DependencyScope].
*
* Doesn't contain any info about an origin module and configuration.
*/
- val scoped = ScopedDependency.of(dependency, configuration)
+ val scoped = ScopedDependency.of(this, configuration)
/**
* GAV coordinates of this dependency.
*
* Gradle's [Dependency] is a mutable object. Its properties can change their
- * values with time. In parcticular, the version can be changed as more
+ * values with time. In particular, the version can be changed as more
* configurations are getting resolved. This is why this property is calculated.
*/
val gav: String
- get() = "$group:$name:$version"
+ get() = "$group:$name:$factualVersion"
override fun compareTo(other: ModuleDependency): Int = COMPARATOR.compare(this, other)
@@ -76,17 +79,17 @@ internal class ModuleDependency(
other as ModuleDependency
- if (module != other.module) return false
+ if (project != other.project) return false
if (configuration != other.configuration) return false
- if (dependency != other.dependency) return false
+ if (gav != other.gav) return false
return true
}
override fun hashCode(): Int {
- var result = module.hashCode()
+ var result = project.hashCode()
result = 31 * result + configuration.hashCode()
- result = 31 * result + dependency.hashCode()
+ result = 31 * result + gav.hashCode()
return result
}
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/PomFormatting.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/PomFormatting.kt
similarity index 96%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/PomFormatting.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/report/pom/PomFormatting.kt
index d25ebd6..ba673bb 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/PomFormatting.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/PomFormatting.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.report.pom
+package io.spine.gradle.report.pom
import java.io.StringWriter
import java.lang.System.lineSeparator
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/PomGenerator.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/PomGenerator.kt
similarity index 82%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/PomGenerator.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/report/pom/PomGenerator.kt
index 3fe3964..9144e2f 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/PomGenerator.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/PomGenerator.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,11 +24,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.report.pom
+package io.spine.gradle.report.pom
import org.gradle.api.Project
import org.gradle.api.plugins.BasePlugin
-import org.gradle.kotlin.dsl.extra
/**
* Generates a `pom.xml` file that contains dependencies of the root project as
@@ -76,20 +75,21 @@ object PomGenerator {
plugin(BasePlugin::class.java)
}
- val task = project.tasks.create("generatePom")
- task.doLast {
- val pomFile = project.projectDir.resolve("pom.xml")
- project.delete(pomFile)
+ val task = project.tasks.register("generatePom") {
+ doLast {
+ val pomFile = project.projectDir.resolve("pom.xml")
+ project.delete(pomFile)
- val projectData = project.metadata()
- val writer = PomXmlWriter(projectData)
- writer.writeTo(pomFile)
+ val projectData = project.metadata()
+ val writer = PomXmlWriter(projectData)
+ writer.writeTo(pomFile)
+ }
+
+ val assembleTask = project.tasks.findByName("assemble")!!
+ dependsOn(assembleTask)
}
val buildTask = project.tasks.findByName("build")!!
buildTask.finalizedBy(task)
-
- val assembleTask = project.tasks.findByName("assemble")!!
- task.dependsOn(assembleTask)
}
}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/PomXmlWriter.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/PomXmlWriter.kt
similarity index 91%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/PomXmlWriter.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/report/pom/PomXmlWriter.kt
index c16fe76..5312219 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/PomXmlWriter.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/PomXmlWriter.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,10 +24,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.report.pom
+package io.spine.gradle.report.pom
-import io.spine.internal.gradle.report.pom.PomFormatting.writeBlocks
-import io.spine.internal.gradle.report.pom.PomFormatting.writeStart
+import io.spine.gradle.report.pom.PomFormatting.writeBlocks
+import io.spine.gradle.report.pom.PomFormatting.writeStart
import java.io.File
import java.io.FileWriter
import java.io.StringWriter
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/ProjectMetadata.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/ProjectMetadata.kt
similarity index 96%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/ProjectMetadata.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/report/pom/ProjectMetadata.kt
index ad1cbb7..ffb89a2 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/ProjectMetadata.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/ProjectMetadata.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.report.pom
+package io.spine.gradle.report.pom
import groovy.xml.MarkupBuilder
import java.io.StringWriter
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/ScopedDependency.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/ScopedDependency.kt
similarity index 93%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/ScopedDependency.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/report/pom/ScopedDependency.kt
index 5e6bf13..7c67a32 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/ScopedDependency.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/ScopedDependency.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,13 +24,13 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.report.pom
+package io.spine.gradle.report.pom
-import io.spine.internal.gradle.report.pom.DependencyScope.compile
-import io.spine.internal.gradle.report.pom.DependencyScope.provided
-import io.spine.internal.gradle.report.pom.DependencyScope.runtime
-import io.spine.internal.gradle.report.pom.DependencyScope.test
-import io.spine.internal.gradle.report.pom.DependencyScope.undefined
+import io.spine.gradle.report.pom.DependencyScope.compile
+import io.spine.gradle.report.pom.DependencyScope.provided
+import io.spine.gradle.report.pom.DependencyScope.runtime
+import io.spine.gradle.report.pom.DependencyScope.test
+import io.spine.gradle.report.pom.DependencyScope.undefined
import org.gradle.api.artifacts.Configuration
import org.gradle.api.artifacts.Dependency
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/SpineLicense.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/SpineLicense.kt
similarity index 93%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/SpineLicense.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/report/pom/SpineLicense.kt
index 080de4c..114395e 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/SpineLicense.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/SpineLicense.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.report.pom
+package io.spine.gradle.report.pom
import groovy.xml.MarkupBuilder
import java.io.StringWriter
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/testing/Logging.kt b/buildSrc/src/main/kotlin/io/spine/gradle/testing/Logging.kt
similarity index 95%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/testing/Logging.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/testing/Logging.kt
index de74b08..6fb7eab 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/testing/Logging.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/testing/Logging.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.testing
+package io.spine.gradle.testing
import org.gradle.api.tasks.testing.Test
import org.gradle.api.tasks.testing.TestDescriptor
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/testing/Multiproject.kt b/buildSrc/src/main/kotlin/io/spine/gradle/testing/Multiproject.kt
similarity index 90%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/testing/Multiproject.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/testing/Multiproject.kt
index b9d9c2a..1f5ed49 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/testing/Multiproject.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/testing/Multiproject.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,10 +24,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.testing
+package io.spine.gradle.testing
+import io.spine.gradle.publish.testJar
import org.gradle.api.Project
-import io.spine.internal.gradle.publish.testJar
/**
* Exposes the test classes of this project as a new "testArtifacts" configuration.
@@ -57,7 +57,7 @@ import io.spine.internal.gradle.publish.testJar
*
* Don't forget that this exposure mechanism works only for projects that reside within the same
* multi-project build. In order to share the test classes with external projects, publish a
- * dedicated [testJar][io.spine.internal.gradle.publish.SpinePublishing.testJar] artifact.
+ * dedicated [testJar][io.spine.gradle.publish.SpinePublishing.testJar] artifact.
*/
@Suppress("unused")
fun Project.exposeTestConfiguration() {
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/testing/Tasks.kt b/buildSrc/src/main/kotlin/io/spine/gradle/testing/Tasks.kt
similarity index 93%
rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/testing/Tasks.kt
rename to buildSrc/src/main/kotlin/io/spine/gradle/testing/Tasks.kt
index 1d7a656..971c4b4 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/testing/Tasks.kt
+++ b/buildSrc/src/main/kotlin/io/spine/gradle/testing/Tasks.kt
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.gradle.testing
+package io.spine.gradle.testing
import org.gradle.api.tasks.TaskContainer
import org.gradle.api.tasks.testing.Test
@@ -75,7 +75,7 @@ private const val SLOW_TAG = "slow"
/**
* Executes JUnit tests filtering out the ones tagged as `slow`.
*/
-private open class FastTest : Test() {
+private abstract class FastTest : Test() {
init {
description = "Executes all JUnit tests but the ones tagged as `slow`."
group = "Verification"
@@ -89,7 +89,7 @@ private open class FastTest : Test() {
/**
* Executes JUnit tests tagged as `slow`.
*/
-private open class SlowTest : Test() {
+private abstract class SlowTest : Test() {
init {
description = "Executes JUnit tests tagged as `slow`."
group = "Verification"
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Kotlin.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Kotlin.kt
deleted file mode 100644
index 474b6e5..0000000
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Kotlin.kt
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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
-
-// https://github.com/JetBrains/kotlin
-// https://github.com/Kotlin
-@Suppress("unused")
-object Kotlin {
-
- /**
- * When changing the version, also change the version used in the `buildSrc/build.gradle.kts`.
- */
- @Suppress("MemberVisibilityCanBePrivate") // used directly from outside
- const val version = "1.8.10"
-
- private const val group = "org.jetbrains.kotlin"
-
- const val stdLib = "${group}:kotlin-stdlib:${version}"
- const val stdLibCommon = "${group}:kotlin-stdlib-common:${version}"
-
- @Deprecated("Please use `stdLib` instead.")
- const val stdLibJdk7 = "${group}:kotlin-stdlib-jdk7:${version}"
-
- @Deprecated("Please use `stdLib` instead.")
- const val stdLibJdk8 = "${group}:kotlin-stdlib-jdk8:${version}"
-
- const val reflect = "${group}:kotlin-reflect:${version}"
- const val testJUnit5 = "${group}:kotlin-test-junit5:$version"
-
- const val gradlePluginApi = "${group}:kotlin-gradle-plugin-api:$version"
- const val gradlePluginLib = "${group}:kotlin-gradle-plugin:${version}"
-}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Spine.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Spine.kt
deleted file mode 100644
index 076be11..0000000
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Spine.kt
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * 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
-
-/**
- * Dependencies on Spine modules.
- */
-@Suppress("unused")
-object Spine {
-
- const val group = "io.spine"
- const val toolsGroup = "io.spine.tools"
-
- /**
- * Versions for published Spine SDK artifacts.
- */
- object ArtifactVersion {
-
- /** The version of [ProtoData]. */
- @Deprecated("Please use `ProtoData.version` instead.")
- const val protoData = ProtoData.version
-
- /** The version of [Spine.base]. */
- const val base = "2.0.0-SNAPSHOT.180"
-
- /** The version of [Spine.reflect]. */
- const val reflect = "2.0.0-SNAPSHOT.182"
-
- /** The version of [Spine.logging]. */
- const val logging = "2.0.0-SNAPSHOT.186"
-
- /** The version of [Spine.testlib]. */
- const val testlib = "2.0.0-SNAPSHOT.183"
-
- /**
- * The version of `core-java`.
- * @see [Spine.CoreJava.client]
- * @see [Spine.CoreJava.server]
- */
- const val core = "2.0.0-SNAPSHOT.141"
-
- /** The version of [Spine.modelCompiler]. */
- const val mc = "2.0.0-SNAPSHOT.132"
-
- /** The version of [McJava]. */
- const val mcJava = "2.0.0-SNAPSHOT.147"
-
- /** The version of [Spine.baseTypes]. */
- const val baseTypes = "2.0.0-SNAPSHOT.121"
-
- /** The version of [Spine.time]. */
- const val time = "2.0.0-SNAPSHOT.131"
-
- /** The version of [Spine.change]. */
- const val change = "2.0.0-SNAPSHOT.118"
-
- /** The version of [Spine.text]. */
- const val text = "2.0.0-SNAPSHOT.5"
-
- /** The version of [Spine.toolBase]. */
- const val toolBase = "2.0.0-SNAPSHOT.171"
-
- /** The version of [Spine.validation]. */
- @Deprecated("Please use `Validation.version` instead.")
- const val validation = Validation.version
-
- /** The version of [Spine.javadocTools]. */
- const val javadocTools = "2.0.0-SNAPSHOT.75"
- }
-
- /** The version of ProtoData to be used in the project. */
- @Deprecated("Please use `ProtoData.version` instead.")
- const val protoDataVersion = ProtoData.version
-
- const val base = "$group:spine-base:${ArtifactVersion.base}"
- const val logging = "$group:spine-logging:${ArtifactVersion.logging}"
- const val loggingContext = "$group:spine-logging-context:${ArtifactVersion.logging}"
- const val loggingBackend = "$group:spine-logging-backend:${ArtifactVersion.logging}"
- const val reflect = "$group:spine-reflect:${ArtifactVersion.reflect}"
- const val baseTypes = "$group:spine-base-types:${ArtifactVersion.baseTypes}"
- const val time = "$group:spine-time:${ArtifactVersion.time}"
- const val change = "$group:spine-change:${ArtifactVersion.change}"
- const val text = "$group:spine-text:${ArtifactVersion.text}"
-
- const val testlib = "$toolsGroup:spine-testlib:${ArtifactVersion.testlib}"
- const val testUtilTime = "$toolsGroup:spine-testutil-time:${ArtifactVersion.time}"
- const val toolBase = "$toolsGroup:spine-tool-base:${ArtifactVersion.toolBase}"
- const val pluginBase = "$toolsGroup:spine-plugin-base:${ArtifactVersion.toolBase}"
- const val pluginTestlib = "$toolsGroup:spine-plugin-testlib:${ArtifactVersion.toolBase}"
- const val modelCompiler = "$toolsGroup:spine-model-compiler:${ArtifactVersion.mc}"
-
- object McJava {
- const val version = ArtifactVersion.mcJava
- const val pluginId = "io.spine.mc-java"
- const val pluginLib = "$toolsGroup:spine-mc-java-plugins:${version}:all"
- }
-
- const val javadocTools = "$toolsGroup::${ArtifactVersion.javadocTools}"
-
- @Deprecated("Please use `validation.runtime`", replaceWith = ReplaceWith("validation.runtime"))
- const val validate = "$group:spine-validate:${ArtifactVersion.base}"
-
- @Deprecated("Please use `Validation` instead.")
- val validation = Validation
-
- @Suppress("MemberVisibilityCanBePrivate")
- @Deprecated("Please use `CoreJava` instead.")
- val coreJava = CoreJava
-
- const val client = CoreJava.client // Added for brevity.
- const val server = CoreJava.server // Added for brevity.
-
- /**
- * Dependencies on `core-java` modules.
- *
- * See [`SpineEventEngine/core-java`](https://github.com/SpineEventEngine/core-java/).
- */
- object CoreJava {
- const val core = "$group:spine-core:${ArtifactVersion.core}"
- const val client = "$group:spine-client:${ArtifactVersion.core}"
- const val server = "$group:spine-server:${ArtifactVersion.core}"
- const val testUtilServer = "$toolsGroup:spine-testutil-server:${ArtifactVersion.core}"
- }
-}
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/protobuf/ProtoTaskExtensions.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/protobuf/ProtoTaskExtensions.kt
deleted file mode 100644
index a3bc6dc..0000000
--- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/protobuf/ProtoTaskExtensions.kt
+++ /dev/null
@@ -1,295 +0,0 @@
-/*
- * 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.gradle.protobuf
-
-import com.google.protobuf.gradle.GenerateProtoTask
-import io.spine.internal.gradle.sourceSets
-import java.io.File
-import org.gradle.api.Project
-import org.gradle.api.file.SourceDirectorySet
-import org.gradle.api.tasks.SourceSet
-import org.gradle.configurationcache.extensions.capitalized
-import org.gradle.kotlin.dsl.get
-import org.gradle.plugins.ide.idea.GenerateIdeaModule
-import org.gradle.plugins.ide.idea.model.IdeaModel
-import org.gradle.plugins.ide.idea.model.IdeaModule
-import org.jetbrains.kotlin.gradle.dsl.KotlinCompile
-
-/**
- * Obtains the name of the `generated` directory under the project root directory.
- */
-private val Project.generatedDir: String
- get() = "${projectDir}/generated"
-
-/**
- * Obtains the `generated` directory for the source set of the task.
- *
- * If [language] is specified returns the subdirectory for this language.
- */
-private fun GenerateProtoTask.generatedDir(language: String = ""): File {
- val path = "${project.generatedDir}/${sourceSet.name}/$language"
- return File(path)
-}
-
-/**
- * Configures protobuf code generation task for the code which cannot use Spine Model Compiler
- * (e.g. the `base` project).
- *
- * The task configuration consists of the following steps:
- *
- * 1. Adding `"kotlin"` to the list of involved `protoc` builtins.
- *
- * 2. Generation of descriptor set file is turned on for each source set.
- * These files are placed under the `build/descriptors` directory.
- *
- * 3. Removing source code generated for `com.google` package for both Java and Kotlin.
- * This is done at the final steps of the code generation.
- *
- * 4. Making `processResource` tasks depend on corresponding `generateProto` tasks.
- * If the source set of the configured task isn't `main`, appropriate infix for
- * the task names is used.
- *
- * The usage of this extension in a module build file would be:
- * ```
- * protobuf {
- * generateProtoTasks {
- * for (task in all()) {
- * task.setup()
- * }
- * }
- * }
- * ```
- * Using the same code under `subprojects` in a root build file does not seem to work because
- * test descriptor set files are not copied to resources. Performing this configuration from
- * a module build script solves the issue.
- *
- * IMPORTANT: In addition to calling `setup`, a submodule must contain a descriptor set reference
- * file (`desc.ref`) files placed under `resources`. The descriptor reference file must contain
- * a reference to the descriptor set file generated by the corresponding `GenerateProtoTask`.
- *
- * For example, for the `test` source set, the reference would be `known_types_test.desc`, and
- * for the `main` source set, the reference would be `known_types_main.desc`.
- *
- * See `io.spine.code.proto.DescriptorReference` and `io.spine.code.proto.FileDescriptors` classes
- * under the `base` project for more details.
- */
-@Suppress("unused")
-fun GenerateProtoTask.setup() {
- builtins.maybeCreate("kotlin")
- setupDescriptorSetFileCreation()
- doLast {
- copyGeneratedFiles()
- }
- excludeProtocOutput()
- setupKotlinCompile()
- dependOnProcessResourcesTask()
- configureIdeaDirs()
-}
-
-/**
- * Tell `protoc` to generate descriptor set files under the project build dir.
- */
-private fun GenerateProtoTask.setupDescriptorSetFileCreation() {
- // Tell `protoc` generate descriptor set file.
- val ssn = sourceSet.name
- generateDescriptorSet = true
- val descriptorsDir = "${project.buildDir}/descriptors/${ssn}"
- with(descriptorSetOptions) {
- path = "$descriptorsDir/known_types_${ssn}.desc"
- includeImports = true
- includeSourceInfo = true
- }
- // Make the descriptor set file included into the resources.
- project.sourceSets.named(ssn) {
- resources.srcDirs(descriptorsDir)
- }
-}
-
-/**
- * Copies files from the [outputBaseDir][GenerateProtoTask.outputBaseDir] into
- * a subdirectory of [generatedDir][Project.generatedDir] for
- * the current [sourceSet][GenerateProtoTask.sourceSet].
- *
- * Also removes sources belonging to the `com.google` package in the target directory.
- */
-private fun GenerateProtoTask.copyGeneratedFiles() {
- project.copy {
- from(outputBaseDir)
- into(generatedDir())
- }
- deleteComGoogle("java")
- deleteComGoogle("kotlin")
-}
-
-/**
- * Remove the code generated for Google Protobuf library types.
- *
- * Java code for the `com.google` package was generated because we wanted
- * to have descriptors for all the types, including those from Google Protobuf library.
- * We want all the descriptors so that they are included into the resources used by
- * the `io.spine.type.KnownTypes` class.
- *
- * Now, as we have the descriptors _and_ excessive Java or Kotlin code, we delete it to avoid
- * classes that duplicate those coming from Protobuf library JARs.
- */
-private fun GenerateProtoTask.deleteComGoogle(language: String) {
- val comDirectory = generatedDir(language).resolve("com")
- val googlePackage = comDirectory.resolve("google")
-
- project.delete(googlePackage)
-
- // If the `com` directory becomes empty, delete it too.
- if (comDirectory.exists() && comDirectory.isDirectory && comDirectory.list()!!.isEmpty()) {
- project.delete(comDirectory)
- }
-}
-
-/**
- * Exclude [GenerateProtoTask.outputBaseDir] from Java source set directories to avoid
- * duplicated source code files.
- */
-private fun GenerateProtoTask.excludeProtocOutput() {
- val protocOutputDir = File(outputBaseDir).parentFile
- val java: SourceDirectorySet = sourceSet.java
-
- // Filter out directories belonging to `build/generated/source/proto`.
- val newSourceDirectories = java.sourceDirectories
- .filter { !it.residesIn(protocOutputDir) }
- .toSet()
- java.setSrcDirs(listOf())
- java.srcDirs(newSourceDirectories)
-
- // Add copied files to the Java source set.
- java.srcDir(generatedDir("java"))
- java.srcDir(generatedDir("kotlin"))
-}
-
-/**
- * Make sure Kotlin compilation explicitly depends on this `GenerateProtoTask` to avoid racing.
- */
-private fun GenerateProtoTask.setupKotlinCompile() {
- val kotlinCompile = project.kotlinCompileFor(sourceSet)
- kotlinCompile?.dependsOn(this)
-}
-
-/**
- * Make the tasks `processResources` depend on `generateProto` tasks explicitly so that:
- * 1) Descriptor set files get into resources, avoiding the racing conditions
- * during the build.
- *
- * 2) We don't have the warning "Execution optimizations have been disabled..." issued
- * by Gradle during the build because Protobuf Gradle Plugin does not set
- * dependencies between `generateProto` and `processResources` tasks.
- */
-private fun GenerateProtoTask.dependOnProcessResourcesTask() {
- val processResources = processResourceTaskName(sourceSet.name)
- project.tasks[processResources].dependsOn(this)
-}
-
-/**
- * Obtains the name of the `processResource` task for the given source set name.
- */
-private fun processResourceTaskName(sourceSetName: String): String {
- val infix = if (sourceSetName == "main") "" else sourceSetName.capitalized()
- return "process${infix}Resources"
-}
-
-/**
- * Attempts to obtain the Kotlin compilation Gradle task for the given source set.
- *
- * Typically, the task is named by a pattern: `compileKotlin`, or just
- * `compileKotlin` if the source set name is `"main"`. If the task does not fit this described
- * pattern, this method will not find it.
- */
-private fun Project.kotlinCompileFor(sourceSet: SourceSet): KotlinCompile<*>? {
- val taskName = sourceSet.getCompileTaskName("Kotlin")
- return tasks.findByName(taskName) as KotlinCompile<*>?
-}
-
-private fun File.residesIn(directory: File): Boolean =
- canonicalFile.startsWith(directory.absolutePath)
-
-private fun GenerateProtoTask.configureIdeaDirs() = project.plugins.withId("idea") {
- val module = project.extensions.findByType(IdeaModel::class.java)!!.module
-
- // Make IDEA forget about sources under `outputBaseDir`.
- val protocOutputDir = File(outputBaseDir).parentFile
- module.generatedSourceDirs.removeIf { dir ->
- dir.residesIn(protocOutputDir)
- }
-
- module.sourceDirs.removeIf { dir ->
- dir.residesIn(protocOutputDir)
- }
-
- val javaDir = generatedDir("java")
- val kotlinDir = generatedDir("kotlin")
-
- // As advised by `Utils.groovy` from Protobuf Gradle plugin:
- // This is required because the IntelliJ IDEA plugin does not allow adding source directories
- // that do not exist. The IntelliJ IDEA config files should be valid from the start even if
- // a user runs './gradlew idea' before running './gradlew generateProto'.
- project.tasks.withType(GenerateIdeaModule::class.java).forEach {
- it.doFirst {
- javaDir.mkdirs()
- kotlinDir.mkdirs()
- }
- }
-
- if (isTest) {
- module.testSources.run {
- from(javaDir)
- from(kotlinDir)
- }
- } else {
- module.sourceDirs.run {
- add(javaDir)
- add(kotlinDir)
- }
- }
-
- module.generatedSourceDirs.run {
- add(javaDir)
- add(kotlinDir)
- }
-}
-
-/**
- * Prints diagnostic output of `sourceDirs` and `generatedSourceDirs` of an [IdeaModule].
- *
- * The warning `"unused"` is suppressed because this function is not used in
- * the production mode.
- */
-@Suppress("unused")
-private fun IdeaModule.printSourceDirectories() {
- println("**** [IDEA] Source directories:")
- sourceDirs.forEach { println(it) }
- println()
- println("**** [IDEA] Generated source directories:")
- generatedSourceDirs.forEach { println(it) }
- println()
-}
diff --git a/buildSrc/src/main/kotlin/jacoco-kmm-jvm.gradle.kts b/buildSrc/src/main/kotlin/jacoco-kotlin-jvm.gradle.kts
similarity index 74%
rename from buildSrc/src/main/kotlin/jacoco-kmm-jvm.gradle.kts
rename to buildSrc/src/main/kotlin/jacoco-kotlin-jvm.gradle.kts
index c3cd026..48fb126 100644
--- a/buildSrc/src/main/kotlin/jacoco-kmm-jvm.gradle.kts
+++ b/buildSrc/src/main/kotlin/jacoco-kotlin-jvm.gradle.kts
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,37 +24,35 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import java.io.File
-import org.gradle.kotlin.dsl.getValue
-import org.gradle.kotlin.dsl.getting
-import org.gradle.kotlin.dsl.jacoco
-import org.gradle.testing.jacoco.tasks.JacocoReport
+import io.spine.gradle.buildDirectory
plugins {
jacoco
}
/**
- * Configures [JacocoReport] task to run in a Kotlin KMM project for `commonMain` and `jvmMain`
- * source sets.
+ * Configures [JacocoReport] task to run in a Kotlin Multiplatform project for
+ * `commonMain` and `jvmMain` source sets.
*
* This script plugin must be applied using the following construct at the end of
* a `build.gradle.kts` file of a module:
*
* ```kotlin
- * apply(plugin="jacoco-kmm-jvm")
+ * apply(plugin="jacoco-kotlin-jvm")
* ```
* Please do not apply this script plugin in the `plugins {}` block because `jacocoTestReport`
* task is not yet available at this stage.
*/
+@Suppress("unused")
private val about = ""
/**
- * Configure Jacoco task with custom input from this KMM project.
+ * Configure Jacoco task with custom input from this Kotlin Multiplatform project.
*/
+@Suppress("unused")
val jacocoTestReport: JacocoReport by tasks.getting(JacocoReport::class) {
- val classFiles = File("${buildDir}/classes/kotlin/jvm/")
+ val classFiles = File("$buildDirectory/classes/kotlin/jvm/")
.walkBottomUp()
.toSet()
classDirectories.setFrom(classFiles)
@@ -65,5 +63,5 @@ val jacocoTestReport: JacocoReport by tasks.getting(JacocoReport::class) {
)
sourceDirectories.setFrom(files(coverageSourceDirs))
- executionData.setFrom(files("${buildDir}/jacoco/jvmTest.exec"))
+ executionData.setFrom(files("$buildDirectory/jacoco/jvmTest.exec"))
}
diff --git a/buildSrc/src/main/kotlin/java-module.gradle.kts b/buildSrc/src/main/kotlin/jvm-module.gradle.kts
similarity index 64%
rename from buildSrc/src/main/kotlin/java-module.gradle.kts
rename to buildSrc/src/main/kotlin/jvm-module.gradle.kts
index e176b8c..c409950 100644
--- a/buildSrc/src/main/kotlin/java-module.gradle.kts
+++ b/buildSrc/src/main/kotlin/jvm-module.gradle.kts
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,22 +24,29 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import io.spine.internal.dependency.CheckerFramework
-import io.spine.internal.dependency.Dokka
-import io.spine.internal.dependency.ErrorProne
-import io.spine.internal.dependency.Flogger
-import io.spine.internal.dependency.Guava
-import io.spine.internal.dependency.JUnit
-import io.spine.internal.dependency.JavaX
-import io.spine.internal.dependency.Protobuf
-import io.spine.internal.gradle.checkstyle.CheckStyleConfig
-import io.spine.internal.gradle.github.pages.updateGitHubPages
-import io.spine.internal.gradle.javac.configureErrorProne
-import io.spine.internal.gradle.javac.configureJavac
-import io.spine.internal.gradle.javadoc.JavadocConfig
-import io.spine.internal.gradle.report.license.LicenseReporter
-import io.spine.internal.gradle.testing.configureLogging
-import io.spine.internal.gradle.testing.registerTestTasks
+import BuildSettings.javaVersion
+import io.spine.dependency.build.CheckerFramework
+import io.spine.dependency.build.Dokka
+import io.spine.dependency.build.ErrorProne
+import io.spine.dependency.lib.Guava
+import io.spine.dependency.lib.JavaX
+import io.spine.dependency.lib.Protobuf
+import io.spine.dependency.local.Logging
+import io.spine.dependency.local.Reflect
+import io.spine.dependency.local.TestLib
+import io.spine.dependency.test.JUnit
+import io.spine.dependency.test.Jacoco
+import io.spine.dependency.test.Kotest
+import io.spine.gradle.checkstyle.CheckStyleConfig
+import io.spine.gradle.github.pages.updateGitHubPages
+import io.spine.gradle.javac.configureErrorProne
+import io.spine.gradle.javac.configureJavac
+import io.spine.gradle.javadoc.JavadocConfig
+import io.spine.gradle.kotlin.applyJvmToolchain
+import io.spine.gradle.kotlin.setFreeCompilerArgs
+import io.spine.gradle.report.license.LicenseReporter
+import io.spine.gradle.testing.configureLogging
+import io.spine.gradle.testing.registerTestTasks
plugins {
`java-library`
@@ -48,6 +55,11 @@ plugins {
id("pmd-settings")
id("project-report")
id("dokka-for-java")
+ kotlin("jvm")
+ id("io.kotest")
+ id("org.jetbrains.kotlinx.kover")
+ id("detekt-code-analysis")
+ id("dokka-for-kotlin")
}
LicenseReporter.generateReportIn(project)
@@ -55,7 +67,8 @@ JavadocConfig.applyTo(project)
CheckStyleConfig.applyTo(project)
project.run {
- configureJava(BuildSettings.javaVersion)
+ configureJava(javaVersion)
+ configureKotlin(javaVersion)
addDependencies()
forceConfigurations()
@@ -81,6 +94,29 @@ fun Module.configureJava(javaVersion: JavaLanguageVersion) {
}
}
+fun Module.configureKotlin(javaVersion: JavaLanguageVersion) {
+ kotlin {
+ applyJvmToolchain(javaVersion.asInt())
+ explicitApi()
+ compilerOptions {
+ jvmTarget.set(BuildSettings.jvmTarget)
+ setFreeCompilerArgs()
+ }
+ }
+
+ kover {
+ useJacoco(version = Jacoco.version)
+ }
+
+ koverReport {
+ defaults {
+ xml {
+ onCheck = true
+ }
+ }
+ }
+}
+
/**
* These dependencies are applied to all subprojects and do not have to
* be included explicitly.
@@ -98,12 +134,18 @@ fun Module.addDependencies() = dependencies {
compileOnlyApi(JavaX.annotations)
ErrorProne.annotations.forEach { compileOnlyApi(it) }
+ implementation(Logging.lib)
+
testImplementation(Guava.testLib)
testImplementation(JUnit.runner)
testImplementation(JUnit.pioneer)
JUnit.api.forEach { testImplementation(it) }
- runtimeOnly(Flogger.Runtime.systemBackend)
+ testImplementation(TestLib.lib)
+ testImplementation(Kotest.frameworkEngine)
+ testImplementation(Kotest.datatest)
+ testImplementation(Kotest.runnerJUnit5Jvm)
+ testImplementation(JUnit.runner)
}
fun Module.forceConfigurations() {
@@ -115,7 +157,8 @@ fun Module.forceConfigurations() {
force(
JUnit.bom,
JUnit.runner,
- Dokka.BasePlugin.lib
+ Dokka.BasePlugin.lib,
+ Reflect.lib,
)
}
}
diff --git a/buildSrc/src/main/kotlin/kotlin-jvm-module.gradle.kts b/buildSrc/src/main/kotlin/kotlin-jvm-module.gradle.kts
deleted file mode 100644
index a5e598b..0000000
--- a/buildSrc/src/main/kotlin/kotlin-jvm-module.gradle.kts
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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.
- */
-
-import io.spine.internal.dependency.Kotest
-import io.spine.internal.dependency.Spine
-import io.spine.internal.dependency.JUnit
-import io.spine.internal.gradle.kotlin.applyJvmToolchain
-import io.spine.internal.gradle.kotlin.setFreeCompilerArgs
-import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
-
-plugins {
- id("java-module")
- kotlin("jvm")
- id("io.kotest")
- id("org.jetbrains.kotlinx.kover")
- id("detekt-code-analysis")
- id("dokka-for-kotlin")
-}
-
-kotlin {
- applyJvmToolchain(BuildSettings.javaVersion.asInt())
- explicitApi()
-}
-
-dependencies {
- testImplementation(Spine.testlib)
- testImplementation(Kotest.frameworkEngine)
- testImplementation(Kotest.datatest)
- testImplementation(Kotest.runnerJUnit5Jvm)
- testImplementation(JUnit.runner)
-}
-
-tasks {
- withType().configureEach {
- kotlinOptions.jvmTarget = BuildSettings.javaVersion.toString()
- setFreeCompilerArgs()
- }
-}
-
-kover {
- useJacocoTool()
-}
-
-koverReport {
- defaults {
- xml {
- onCheck = true
- }
- }
-}
diff --git a/buildSrc/src/main/kotlin/pmd-settings.gradle.kts b/buildSrc/src/main/kotlin/pmd-settings.gradle.kts
index a718b1f..0373ee0 100644
--- a/buildSrc/src/main/kotlin/pmd-settings.gradle.kts
+++ b/buildSrc/src/main/kotlin/pmd-settings.gradle.kts
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import io.spine.internal.dependency.Pmd
+import io.spine.dependency.build.Pmd
plugins {
pmd
diff --git a/buildSrc/src/main/kotlin/write-manifest.gradle.kts b/buildSrc/src/main/kotlin/write-manifest.gradle.kts
index aff1677..b63d327 100644
--- a/buildSrc/src/main/kotlin/write-manifest.gradle.kts
+++ b/buildSrc/src/main/kotlin/write-manifest.gradle.kts
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,7 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import io.spine.internal.gradle.publish.SpinePublishing
+import io.spine.gradle.publish.SpinePublishing
import java.nio.file.Files.createDirectories
import java.nio.file.Files.createFile
import java.text.SimpleDateFormat
@@ -91,7 +91,8 @@ val manifestAttributes = mapOf(
"Build-OS" to buildOs(),
IMPLEMENTATION_TITLE.toString() to implementationTitle(),
IMPLEMENTATION_VERSION.toString() to project.version,
- IMPLEMENTATION_VENDOR.toString() to "TeamDev"
+ IMPLEMENTATION_VENDOR.toString() to "TeamDev",
+ "Bundle-License" to "https://www.apache.org/licenses/LICENSE-2.0.txt"
)
/**
@@ -102,7 +103,7 @@ val manifestAttributes = mapOf(
* when running tests. We cannot depend on the `Jar` from `resources` because it would
* form a circular dependency.
*/
-val exposeManifestForTests by tasks.creating {
+val exposeManifestForTests by tasks.registering {
val outputFile = layout.buildDirectory.file("resources/main/META-INF/MANIFEST.MF")
outputs.file(outputFile).withPropertyName("manifestFile")
@@ -111,7 +112,7 @@ val exposeManifestForTests by tasks.creating {
val manifest = Manifest()
// The manifest version attribute is crucial for writing.
- // It it's absent nothing would be written.
+ // If it's absent, nothing would be written.
manifest.mainAttributes[MANIFEST_VERSION] = "1.0"
manifestAttributes.forEach { entry ->
diff --git a/config b/config
index 7975dfb..5c2820b 160000
--- a/config
+++ b/config
@@ -1 +1 @@
-Subproject commit 7975dfbeb539164728d21b7cd2160e52e5c78390
+Subproject commit 5c2820b2c23596617e9d677d44c3394d6a2b0308
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index 943f0cb..9bbc975 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 5083229..03d6bb7 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,33 @@
+#
+# Copyright 2025, 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
+#
+# https://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.
+#
+
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000
+validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
index 65dcd68..d4b5e0e 100755
--- a/gradlew
+++ b/gradlew
@@ -1,19 +1,29 @@
#!/bin/sh
#
-# Copyright © 2015-2021 the original authors.
+# Copyright 2025, 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
#
-# https://www.apache.org/licenses/LICENSE-2.0
+# https://www.apache.org/licenses/LICENSE-2.0
#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+# 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.
#
##############################################################################
@@ -55,7 +65,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
-# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -83,10 +93,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
-APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
-
-# 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"'
+# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
+APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -133,10 +141,13 @@ location of your Java installation."
fi
else
JAVACMD=java
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+ if ! command -v java >/dev/null 2>&1
+ then
+ die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
+ fi
fi
# Increase the maximum file descriptors if we can.
@@ -144,7 +155,7 @@ 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
@@ -152,7 +163,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
'' | 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
@@ -197,11 +208,15 @@ if "$cygwin" || "$msys" ; then
done
fi
-# 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.
+
+# 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 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" \
diff --git a/gradlew.bat b/gradlew.bat
index 93e3f59..9d21a21 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
+@rem SPDX-License-Identifier: Apache-2.0
+@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
+echo. 1>&2
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
goto fail
@@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
+echo. 1>&2
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
goto fail
diff --git a/journal.log b/journal.log
index 6c0d226..25e18dd 100644
--- a/journal.log
+++ b/journal.log
@@ -7,6 +7,8 @@
#
# Please do not edit this file by hand.
#
+1:32 :: sanders :: 2025-03-09T15:08:08.584716Z :: core:2.0.0-SNAPSHOT.201;ProtoData:0.92.11;Validation:2.0.0-SNAPSHOT.301;mc-java:2.0.0-SNAPSHOT.266
+1:37 :: sanders :: 2025-03-09T15:04:33.724061Z :: core:2.0.0-SNAPSHOT.201;ProtoData:0.92.11;Validation:2.0.0-SNAPSHOT.301;mc-java:2.0.0-SNAPSHOT.266
4:23 :: ddashenkov :: 2023-07-03T09:49:57.699868Z :: core:2.0.0-SNAPSHOT.141;ProtoData:0.8.5;Validation:2.0.0-SNAPSHOT.81;mc-java:2.0.0-SNAPSHOT.151
4:20 :: ddashenkov :: 2023-07-03T08:02:54.834609Z :: core:2.0.0-SNAPSHOT.141;ProtoData:0.8.5;Validation:2.0.0-SNAPSHOT.81;mc-java:2.0.0-SNAPSHOT.151
5:51 :: ddashenkov :: 2023-06-27T12:00:52.733963Z :: core:2.0.0-SNAPSHOT.141;ProtoData:0.8.5;Validation:2.0.0-SNAPSHOT.81;mc-java:2.0.0-SNAPSHOT.151
diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Pmd.kt b/src/main/java/io/spine/buildtool/speed/managementofprojects/TaskMixin.java
similarity index 84%
rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/Pmd.kt
rename to src/main/java/io/spine/buildtool/speed/managementofprojects/TaskMixin.java
index a28eccc..6481402 100644
--- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Pmd.kt
+++ b/src/main/java/io/spine/buildtool/speed/managementofprojects/TaskMixin.java
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -24,9 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-package io.spine.internal.dependency
+package io.spine.buildtool.speed.managementofprojects;
-// https://pmd.github.io/
-object Pmd {
- const val version = "6.55.0"
+public interface TaskMixin {
}
diff --git a/src/main/java/io/spine/buildtool/speed/managementofprojects/package-info.java b/src/main/java/io/spine/buildtool/speed/managementofprojects/package-info.java
new file mode 100644
index 0000000..a610021
--- /dev/null
+++ b/src/main/java/io/spine/buildtool/speed/managementofprojects/package-info.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.
+ */
+
+@CheckReturnValue
+@ParametersAreNonnullByDefault
+package io.spine.buildtool.speed.managementofprojects;
+
+import com.google.errorprone.annotations.CheckReturnValue;
+
+import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/src/main/java/io/spine/buildtool/speed/pm/TaskMixin.java b/src/main/java/io/spine/buildtool/speed/pm/TaskMixin.java
new file mode 100644
index 0000000..4463529
--- /dev/null
+++ b/src/main/java/io/spine/buildtool/speed/pm/TaskMixin.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.buildtool.speed.pm;
+
+public interface TaskMixin {
+}
diff --git a/src/main/java/io/spine/buildtool/speed/pm/package-info.java b/src/main/java/io/spine/buildtool/speed/pm/package-info.java
new file mode 100644
index 0000000..46137e3
--- /dev/null
+++ b/src/main/java/io/spine/buildtool/speed/pm/package-info.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.
+ */
+
+@CheckReturnValue
+@ParametersAreNonnullByDefault
+package io.spine.buildtool.speed.pm;
+
+import com.google.errorprone.annotations.CheckReturnValue;
+
+import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/src/main/java/io/spine/buildtool/speed/pmanag/TaskMixin.java b/src/main/java/io/spine/buildtool/speed/pmanag/TaskMixin.java
new file mode 100644
index 0000000..bc2573b
--- /dev/null
+++ b/src/main/java/io/spine/buildtool/speed/pmanag/TaskMixin.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.buildtool.speed.pmanag;
+
+public interface TaskMixin {
+}
diff --git a/src/main/java/io/spine/buildtool/speed/pmanag/package-info.java b/src/main/java/io/spine/buildtool/speed/pmanag/package-info.java
new file mode 100644
index 0000000..2498e54
--- /dev/null
+++ b/src/main/java/io/spine/buildtool/speed/pmanag/package-info.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.
+ */
+
+@CheckReturnValue
+@ParametersAreNonnullByDefault
+package io.spine.buildtool.speed.pmanag;
+
+import com.google.errorprone.annotations.CheckReturnValue;
+
+import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/src/main/java/io/spine/buildtool/speed/prjcts/TaskMixin.java b/src/main/java/io/spine/buildtool/speed/prjcts/TaskMixin.java
new file mode 100644
index 0000000..ede3daa
--- /dev/null
+++ b/src/main/java/io/spine/buildtool/speed/prjcts/TaskMixin.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.buildtool.speed.prjcts;
+
+public interface TaskMixin {
+}
diff --git a/src/main/java/io/spine/buildtool/speed/prjcts/package-info.java b/src/main/java/io/spine/buildtool/speed/prjcts/package-info.java
new file mode 100644
index 0000000..fdc3f74
--- /dev/null
+++ b/src/main/java/io/spine/buildtool/speed/prjcts/package-info.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.
+ */
+
+@CheckReturnValue
+@ParametersAreNonnullByDefault
+package io.spine.buildtool.speed.prjcts;
+
+import com.google.errorprone.annotations.CheckReturnValue;
+
+import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/src/main/java/io/spine/buildtool/speed/prjmgt/TaskMixin.java b/src/main/java/io/spine/buildtool/speed/prjmgt/TaskMixin.java
new file mode 100644
index 0000000..f30844b
--- /dev/null
+++ b/src/main/java/io/spine/buildtool/speed/prjmgt/TaskMixin.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.buildtool.speed.prjmgt;
+
+public interface TaskMixin {
+}
diff --git a/src/main/java/io/spine/buildtool/speed/prmn/TaskMixin.java b/src/main/java/io/spine/buildtool/speed/prmn/TaskMixin.java
new file mode 100644
index 0000000..8a9ea1a
--- /dev/null
+++ b/src/main/java/io/spine/buildtool/speed/prmn/TaskMixin.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.buildtool.speed.prmn;
+
+public interface TaskMixin {
+}
diff --git a/src/main/java/io/spine/buildtool/speed/prmn/package-info.java b/src/main/java/io/spine/buildtool/speed/prmn/package-info.java
new file mode 100644
index 0000000..c646646
--- /dev/null
+++ b/src/main/java/io/spine/buildtool/speed/prmn/package-info.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.
+ */
+
+@CheckReturnValue
+@ParametersAreNonnullByDefault
+package io.spine.buildtool.speed.prmn;
+
+import com.google.errorprone.annotations.CheckReturnValue;
+
+import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/src/main/java/io/spine/buildtool/speed/projectman/TaskMixin.java b/src/main/java/io/spine/buildtool/speed/projectman/TaskMixin.java
new file mode 100644
index 0000000..b139f3b
--- /dev/null
+++ b/src/main/java/io/spine/buildtool/speed/projectman/TaskMixin.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.buildtool.speed.projectman;
+
+public interface TaskMixin {
+}
diff --git a/src/main/java/io/spine/buildtool/speed/projectman/package-info.java b/src/main/java/io/spine/buildtool/speed/projectman/package-info.java
new file mode 100644
index 0000000..cf09ed8
--- /dev/null
+++ b/src/main/java/io/spine/buildtool/speed/projectman/package-info.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.
+ */
+
+@CheckReturnValue
+@ParametersAreNonnullByDefault
+package io.spine.buildtool.speed.projectman;
+
+import com.google.errorprone.annotations.CheckReturnValue;
+
+import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/src/main/java/io/spine/buildtool/speed/promag/TaskMixin.java b/src/main/java/io/spine/buildtool/speed/promag/TaskMixin.java
new file mode 100644
index 0000000..5796d3f
--- /dev/null
+++ b/src/main/java/io/spine/buildtool/speed/promag/TaskMixin.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.buildtool.speed.promag;
+
+public interface TaskMixin {
+}
diff --git a/src/main/java/io/spine/buildtool/speed/promag/package-info.java b/src/main/java/io/spine/buildtool/speed/promag/package-info.java
new file mode 100644
index 0000000..428f8e0
--- /dev/null
+++ b/src/main/java/io/spine/buildtool/speed/promag/package-info.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2025, 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
+ *
+ * https://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.
+ */
+
+@CheckReturnValue
+@ParametersAreNonnullByDefault
+package io.spine.buildtool.speed.promag;
+
+import com.google.errorprone.annotations.CheckReturnValue;
+
+import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/src/main/proto/spine/buildtool/speed/managementofprojects/my_tasks_view.proto b/src/main/proto/spine/buildtool/speed/managementofprojects/my_tasks_view.proto
index b155e41..a0d9ffd 100644
--- a/src/main/proto/spine/buildtool/speed/managementofprojects/my_tasks_view.proto
+++ b/src/main/proto/spine/buildtool/speed/managementofprojects/my_tasks_view.proto
@@ -1,11 +1,11 @@
/*
- * Copyright 2023, TeamDev. All rights reserved.
+ * Copyright 2025, 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
+ * https://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
@@ -36,7 +36,6 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/managementofprojects/identifiers.proto";
-import "spine/buildtool/speed/managementofprojects/rich_text.proto";
import "spine/buildtool/speed/managementofprojects/task.proto";
import "spine/buildtool/speed/managementofprojects/label.proto";
import "spine/people/person_name.proto";
diff --git a/src/main/proto/spine/buildtool/speed/managementofprojects/project_commands.proto b/src/main/proto/spine/buildtool/speed/managementofprojects/project_commands.proto
index 1d06c66..73c1af3 100644
--- a/src/main/proto/spine/buildtool/speed/managementofprojects/project_commands.proto
+++ b/src/main/proto/spine/buildtool/speed/managementofprojects/project_commands.proto
@@ -36,7 +36,6 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/managementofprojects/identifiers.proto";
-import "spine/buildtool/speed/managementofprojects/roles.proto";
message CreateProject {
diff --git a/src/main/proto/spine/buildtool/speed/managementofprojects/project_events.proto b/src/main/proto/spine/buildtool/speed/managementofprojects/project_events.proto
index 7dc199d..0007299 100644
--- a/src/main/proto/spine/buildtool/speed/managementofprojects/project_events.proto
+++ b/src/main/proto/spine/buildtool/speed/managementofprojects/project_events.proto
@@ -36,7 +36,6 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/managementofprojects/identifiers.proto";
-import "spine/buildtool/speed/managementofprojects/roles.proto";
message ProjectCreated {
diff --git a/src/main/proto/spine/buildtool/speed/managementofprojects/rich_text.proto b/src/main/proto/spine/buildtool/speed/managementofprojects/rich_text.proto
index 1775d19..4cc495c 100644
--- a/src/main/proto/spine/buildtool/speed/managementofprojects/rich_text.proto
+++ b/src/main/proto/spine/buildtool/speed/managementofprojects/rich_text.proto
@@ -67,7 +67,7 @@ message Font {
spine.net.Url ttf_url = 2;
}
- int32 size = 3 [(range) = "[8..32]"];
+ int32 size = 3 [(range).value = "[8..32]"];
}
message Style {
diff --git a/src/main/proto/spine/buildtool/speed/managementofprojects/roles.proto b/src/main/proto/spine/buildtool/speed/managementofprojects/roles.proto
index 1ea7e27..eae3c0c 100644
--- a/src/main/proto/spine/buildtool/speed/managementofprojects/roles.proto
+++ b/src/main/proto/spine/buildtool/speed/managementofprojects/roles.proto
@@ -75,5 +75,9 @@ message Role {
extend google.protobuf.MessageOptions {
// A role required for a user to be able to issue a command.
- Role required_role = 73947;
+ //
+ // See `options.proto` docs for the range of options used by Spine.
+ // Please also coordinate numbers with other `roles.proto` files in this project.
+ //
+ Role required_role = 74999;
}
diff --git a/src/main/proto/spine/buildtool/speed/managementofprojects/task.proto b/src/main/proto/spine/buildtool/speed/managementofprojects/task.proto
index d178207..e1544c4 100644
--- a/src/main/proto/spine/buildtool/speed/managementofprojects/task.proto
+++ b/src/main/proto/spine/buildtool/speed/managementofprojects/task.proto
@@ -40,13 +40,11 @@ import "spine/buildtool/speed/managementofprojects/time.proto";
import "spine/buildtool/speed/managementofprojects/rich_text.proto";
import "spine/time/time.proto";
import "spine/net/url.proto";
-import "google/protobuf/duration.proto";
message Task {
option (entity).kind = AGGREGATE;
option (is) = {
java_type: "TaskMixin"
- generate: true
};
TaskId id = 1;
diff --git a/src/main/proto/spine/buildtool/speed/managementofprojects/task_commands.proto b/src/main/proto/spine/buildtool/speed/managementofprojects/task_commands.proto
index b334054..c0ade26 100644
--- a/src/main/proto/spine/buildtool/speed/managementofprojects/task_commands.proto
+++ b/src/main/proto/spine/buildtool/speed/managementofprojects/task_commands.proto
@@ -43,7 +43,6 @@ import "spine/buildtool/speed/managementofprojects/rich_text.proto";
import "spine/buildtool/speed/managementofprojects/roles.proto";
import "spine/time/time.proto";
import "spine/net/url.proto";
-import "google/protobuf/duration.proto";
message CreateTask {
option (required_role) = {
diff --git a/src/main/proto/spine/buildtool/speed/managementofprojects/task_events.proto b/src/main/proto/spine/buildtool/speed/managementofprojects/task_events.proto
index 13694fd..a95086e 100644
--- a/src/main/proto/spine/buildtool/speed/managementofprojects/task_events.proto
+++ b/src/main/proto/spine/buildtool/speed/managementofprojects/task_events.proto
@@ -5,7 +5,7 @@
* 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
+ * https://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
@@ -43,9 +43,7 @@ import "spine/buildtool/speed/managementofprojects/time.proto";
import "spine/buildtool/speed/managementofprojects/rich_text.proto";
import "spine/buildtool/speed/managementofprojects/roles.proto";
import "spine/time/time.proto";
-import "spine/time_options.proto";
import "spine/net/url.proto";
-import "google/protobuf/duration.proto";
message TaskCreated {
option (required_role) = {
diff --git a/src/main/proto/spine/buildtool/speed/managementofprojects/task_rejections.proto b/src/main/proto/spine/buildtool/speed/managementofprojects/task_rejections.proto
index e8d9178..107b4a3 100644
--- a/src/main/proto/spine/buildtool/speed/managementofprojects/task_rejections.proto
+++ b/src/main/proto/spine/buildtool/speed/managementofprojects/task_rejections.proto
@@ -36,12 +36,6 @@ option java_multiple_files = false;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/managementofprojects/identifiers.proto";
-import "spine/buildtool/speed/managementofprojects/time.proto";
-import "spine/buildtool/speed/managementofprojects/rich_text.proto";
-import "spine/buildtool/speed/managementofprojects/roles.proto";
-import "spine/time/time.proto";
-import "spine/net/url.proto";
-import "google/protobuf/duration.proto";
message CannotCommentClosedTask {
diff --git a/src/main/proto/spine/buildtool/speed/managementofprojects/user_commands.proto b/src/main/proto/spine/buildtool/speed/managementofprojects/user_commands.proto
index 4db9857..453431b 100644
--- a/src/main/proto/spine/buildtool/speed/managementofprojects/user_commands.proto
+++ b/src/main/proto/spine/buildtool/speed/managementofprojects/user_commands.proto
@@ -36,9 +36,7 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/managementofprojects/identifiers.proto";
-import "spine/buildtool/speed/managementofprojects/roles.proto";
import "spine/people/person_name.proto";
-import "spine/time/time.proto";
import "spine/net/email_address.proto";
message SignUp {
diff --git a/src/main/proto/spine/buildtool/speed/managementofprojects/user_events.proto b/src/main/proto/spine/buildtool/speed/managementofprojects/user_events.proto
index a34085d..56a82fd 100644
--- a/src/main/proto/spine/buildtool/speed/managementofprojects/user_events.proto
+++ b/src/main/proto/spine/buildtool/speed/managementofprojects/user_events.proto
@@ -36,9 +36,7 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/managementofprojects/identifiers.proto";
-import "spine/buildtool/speed/managementofprojects/roles.proto";
import "spine/people/person_name.proto";
-import "spine/time/time.proto";
import "spine/net/email_address.proto";
message SignedUp {
diff --git a/src/main/proto/spine/buildtool/speed/managementofprojects/user_rejections.proto b/src/main/proto/spine/buildtool/speed/managementofprojects/user_rejections.proto
index 857a4f7..a7ee02d 100644
--- a/src/main/proto/spine/buildtool/speed/managementofprojects/user_rejections.proto
+++ b/src/main/proto/spine/buildtool/speed/managementofprojects/user_rejections.proto
@@ -36,10 +36,7 @@ option java_multiple_files = false;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/managementofprojects/identifiers.proto";
-import "spine/buildtool/speed/managementofprojects/roles.proto";
import "spine/people/person_name.proto";
-import "spine/time/time.proto";
-import "spine/net/email_address.proto";
message UserAlreadyExists {
diff --git a/src/main/proto/spine/buildtool/speed/pm/my_tasks_view.proto b/src/main/proto/spine/buildtool/speed/pm/my_tasks_view.proto
index 4bc4456..062501b 100644
--- a/src/main/proto/spine/buildtool/speed/pm/my_tasks_view.proto
+++ b/src/main/proto/spine/buildtool/speed/pm/my_tasks_view.proto
@@ -36,7 +36,6 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/pm/identifiers.proto";
-import "spine/buildtool/speed/pm/rich_text.proto";
import "spine/buildtool/speed/pm/task.proto";
import "spine/buildtool/speed/pm/label.proto";
import "spine/people/person_name.proto";
diff --git a/src/main/proto/spine/buildtool/speed/pm/project_commands.proto b/src/main/proto/spine/buildtool/speed/pm/project_commands.proto
index 84c9f79..46cb739 100644
--- a/src/main/proto/spine/buildtool/speed/pm/project_commands.proto
+++ b/src/main/proto/spine/buildtool/speed/pm/project_commands.proto
@@ -36,7 +36,6 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/pm/identifiers.proto";
-import "spine/buildtool/speed/pm/roles.proto";
message CreateProject {
diff --git a/src/main/proto/spine/buildtool/speed/pm/project_events.proto b/src/main/proto/spine/buildtool/speed/pm/project_events.proto
index 1f89046..e9c881b 100644
--- a/src/main/proto/spine/buildtool/speed/pm/project_events.proto
+++ b/src/main/proto/spine/buildtool/speed/pm/project_events.proto
@@ -36,7 +36,6 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/pm/identifiers.proto";
-import "spine/buildtool/speed/pm/roles.proto";
message ProjectCreated {
diff --git a/src/main/proto/spine/buildtool/speed/pm/rich_text.proto b/src/main/proto/spine/buildtool/speed/pm/rich_text.proto
index e4a7111..6fcffb1 100644
--- a/src/main/proto/spine/buildtool/speed/pm/rich_text.proto
+++ b/src/main/proto/spine/buildtool/speed/pm/rich_text.proto
@@ -67,7 +67,7 @@ message Font {
spine.net.Url ttf_url = 2;
}
- int32 size = 3 [(range) = "[8..32]"];
+ int32 size = 3 [(range).value = "[8..32]"];
}
message Style {
diff --git a/src/main/proto/spine/buildtool/speed/pm/roles.proto b/src/main/proto/spine/buildtool/speed/pm/roles.proto
index 15be8f4..a495e25 100644
--- a/src/main/proto/spine/buildtool/speed/pm/roles.proto
+++ b/src/main/proto/spine/buildtool/speed/pm/roles.proto
@@ -75,5 +75,9 @@ message Role {
extend google.protobuf.MessageOptions {
// A role required for a user to be able to issue a command.
- Role required_role = 73947;
+ //
+ // See `options.proto` docs for the range of options used by Spine.
+ // Please also coordinate numbers with other `roles.proto` files in this project.
+ //
+ Role required_role = 74998;
}
diff --git a/src/main/proto/spine/buildtool/speed/pm/task.proto b/src/main/proto/spine/buildtool/speed/pm/task.proto
index 400d192..de90b09 100644
--- a/src/main/proto/spine/buildtool/speed/pm/task.proto
+++ b/src/main/proto/spine/buildtool/speed/pm/task.proto
@@ -40,13 +40,11 @@ import "spine/buildtool/speed/pm/time.proto";
import "spine/buildtool/speed/pm/rich_text.proto";
import "spine/time/time.proto";
import "spine/net/url.proto";
-import "google/protobuf/duration.proto";
message Task {
option (entity).kind = AGGREGATE;
option (is) = {
java_type: "TaskMixin"
- generate: true
};
TaskId id = 1;
diff --git a/src/main/proto/spine/buildtool/speed/pm/task_commands.proto b/src/main/proto/spine/buildtool/speed/pm/task_commands.proto
index a261dce..f5f6fca 100644
--- a/src/main/proto/spine/buildtool/speed/pm/task_commands.proto
+++ b/src/main/proto/spine/buildtool/speed/pm/task_commands.proto
@@ -43,7 +43,6 @@ import "spine/buildtool/speed/pm/rich_text.proto";
import "spine/buildtool/speed/pm/roles.proto";
import "spine/time/time.proto";
import "spine/net/url.proto";
-import "google/protobuf/duration.proto";
message CreateTask {
option (required_role) = {
diff --git a/src/main/proto/spine/buildtool/speed/pm/task_events.proto b/src/main/proto/spine/buildtool/speed/pm/task_events.proto
index c8bf2b8..ee24007 100644
--- a/src/main/proto/spine/buildtool/speed/pm/task_events.proto
+++ b/src/main/proto/spine/buildtool/speed/pm/task_events.proto
@@ -43,9 +43,7 @@ import "spine/buildtool/speed/pm/time.proto";
import "spine/buildtool/speed/pm/rich_text.proto";
import "spine/buildtool/speed/pm/roles.proto";
import "spine/time/time.proto";
-import "spine/time_options.proto";
import "spine/net/url.proto";
-import "google/protobuf/duration.proto";
message TaskCreated {
option (required_role) = {
diff --git a/src/main/proto/spine/buildtool/speed/pm/task_rejections.proto b/src/main/proto/spine/buildtool/speed/pm/task_rejections.proto
index 517d86f..147eef2 100644
--- a/src/main/proto/spine/buildtool/speed/pm/task_rejections.proto
+++ b/src/main/proto/spine/buildtool/speed/pm/task_rejections.proto
@@ -36,12 +36,6 @@ option java_multiple_files = false;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/pm/identifiers.proto";
-import "spine/buildtool/speed/pm/time.proto";
-import "spine/buildtool/speed/pm/rich_text.proto";
-import "spine/buildtool/speed/pm/roles.proto";
-import "spine/time/time.proto";
-import "spine/net/url.proto";
-import "google/protobuf/duration.proto";
message CannotCommentClosedTask {
diff --git a/src/main/proto/spine/buildtool/speed/pm/user_commands.proto b/src/main/proto/spine/buildtool/speed/pm/user_commands.proto
index bfe8452..bd2a889 100644
--- a/src/main/proto/spine/buildtool/speed/pm/user_commands.proto
+++ b/src/main/proto/spine/buildtool/speed/pm/user_commands.proto
@@ -36,9 +36,7 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/pm/identifiers.proto";
-import "spine/buildtool/speed/pm/roles.proto";
import "spine/people/person_name.proto";
-import "spine/time/time.proto";
import "spine/net/email_address.proto";
message SignUp {
diff --git a/src/main/proto/spine/buildtool/speed/pm/user_events.proto b/src/main/proto/spine/buildtool/speed/pm/user_events.proto
index 0c38eab..5df402c 100644
--- a/src/main/proto/spine/buildtool/speed/pm/user_events.proto
+++ b/src/main/proto/spine/buildtool/speed/pm/user_events.proto
@@ -36,9 +36,7 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/pm/identifiers.proto";
-import "spine/buildtool/speed/pm/roles.proto";
import "spine/people/person_name.proto";
-import "spine/time/time.proto";
import "spine/net/email_address.proto";
message SignedUp {
diff --git a/src/main/proto/spine/buildtool/speed/pm/user_rejections.proto b/src/main/proto/spine/buildtool/speed/pm/user_rejections.proto
index 416d620..65b7de9 100644
--- a/src/main/proto/spine/buildtool/speed/pm/user_rejections.proto
+++ b/src/main/proto/spine/buildtool/speed/pm/user_rejections.proto
@@ -36,10 +36,7 @@ option java_multiple_files = false;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/pm/identifiers.proto";
-import "spine/buildtool/speed/pm/roles.proto";
import "spine/people/person_name.proto";
-import "spine/time/time.proto";
-import "spine/net/email_address.proto";
message UserAlreadyExists {
diff --git a/src/main/proto/spine/buildtool/speed/pmanag/my_tasks_view.proto b/src/main/proto/spine/buildtool/speed/pmanag/my_tasks_view.proto
index c8b68dc..c53c407 100644
--- a/src/main/proto/spine/buildtool/speed/pmanag/my_tasks_view.proto
+++ b/src/main/proto/spine/buildtool/speed/pmanag/my_tasks_view.proto
@@ -36,7 +36,6 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/pmanag/identifiers.proto";
-import "spine/buildtool/speed/pmanag/rich_text.proto";
import "spine/buildtool/speed/pmanag/task.proto";
import "spine/buildtool/speed/pmanag/label.proto";
import "spine/people/person_name.proto";
diff --git a/src/main/proto/spine/buildtool/speed/pmanag/project_commands.proto b/src/main/proto/spine/buildtool/speed/pmanag/project_commands.proto
index c7d9378..80b0358 100644
--- a/src/main/proto/spine/buildtool/speed/pmanag/project_commands.proto
+++ b/src/main/proto/spine/buildtool/speed/pmanag/project_commands.proto
@@ -36,7 +36,6 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/pmanag/identifiers.proto";
-import "spine/buildtool/speed/pmanag/roles.proto";
message CreateProject {
diff --git a/src/main/proto/spine/buildtool/speed/pmanag/project_events.proto b/src/main/proto/spine/buildtool/speed/pmanag/project_events.proto
index 765a693..a032c9d 100644
--- a/src/main/proto/spine/buildtool/speed/pmanag/project_events.proto
+++ b/src/main/proto/spine/buildtool/speed/pmanag/project_events.proto
@@ -36,7 +36,6 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/pmanag/identifiers.proto";
-import "spine/buildtool/speed/pmanag/roles.proto";
message ProjectCreated {
diff --git a/src/main/proto/spine/buildtool/speed/pmanag/rich_text.proto b/src/main/proto/spine/buildtool/speed/pmanag/rich_text.proto
index ed96b97..ba4f68a 100644
--- a/src/main/proto/spine/buildtool/speed/pmanag/rich_text.proto
+++ b/src/main/proto/spine/buildtool/speed/pmanag/rich_text.proto
@@ -67,7 +67,7 @@ message Font {
spine.net.Url ttf_url = 2;
}
- int32 size = 3 [(range) = "[8..32]"];
+ int32 size = 3 [(range).value = "[8..32]"];
}
message Style {
diff --git a/src/main/proto/spine/buildtool/speed/pmanag/roles.proto b/src/main/proto/spine/buildtool/speed/pmanag/roles.proto
index 858b0df..510990a 100644
--- a/src/main/proto/spine/buildtool/speed/pmanag/roles.proto
+++ b/src/main/proto/spine/buildtool/speed/pmanag/roles.proto
@@ -75,5 +75,9 @@ message Role {
extend google.protobuf.MessageOptions {
// A role required for a user to be able to issue a command.
- Role required_role = 73947;
+ //
+ // See `options.proto` docs for the range of options used by Spine.
+ // Please also coordinate numbers with other `roles.proto` files in this project.
+ //
+ Role required_role = 74997;
}
diff --git a/src/main/proto/spine/buildtool/speed/pmanag/task.proto b/src/main/proto/spine/buildtool/speed/pmanag/task.proto
index 82b162b..f7ed4ea 100644
--- a/src/main/proto/spine/buildtool/speed/pmanag/task.proto
+++ b/src/main/proto/spine/buildtool/speed/pmanag/task.proto
@@ -40,13 +40,11 @@ import "spine/buildtool/speed/pmanag/time.proto";
import "spine/buildtool/speed/pmanag/rich_text.proto";
import "spine/time/time.proto";
import "spine/net/url.proto";
-import "google/protobuf/duration.proto";
message Task {
option (entity).kind = AGGREGATE;
option (is) = {
java_type: "TaskMixin"
- generate: true
};
TaskId id = 1;
diff --git a/src/main/proto/spine/buildtool/speed/pmanag/task_commands.proto b/src/main/proto/spine/buildtool/speed/pmanag/task_commands.proto
index 09b6a91..bc42f5c 100644
--- a/src/main/proto/spine/buildtool/speed/pmanag/task_commands.proto
+++ b/src/main/proto/spine/buildtool/speed/pmanag/task_commands.proto
@@ -43,7 +43,6 @@ import "spine/buildtool/speed/pmanag/rich_text.proto";
import "spine/buildtool/speed/pmanag/roles.proto";
import "spine/time/time.proto";
import "spine/net/url.proto";
-import "google/protobuf/duration.proto";
message CreateTask {
option (required_role) = {
diff --git a/src/main/proto/spine/buildtool/speed/pmanag/task_events.proto b/src/main/proto/spine/buildtool/speed/pmanag/task_events.proto
index 09c5f83..92ef545 100644
--- a/src/main/proto/spine/buildtool/speed/pmanag/task_events.proto
+++ b/src/main/proto/spine/buildtool/speed/pmanag/task_events.proto
@@ -43,9 +43,7 @@ import "spine/buildtool/speed/pmanag/time.proto";
import "spine/buildtool/speed/pmanag/rich_text.proto";
import "spine/buildtool/speed/pmanag/roles.proto";
import "spine/time/time.proto";
-import "spine/time_options.proto";
import "spine/net/url.proto";
-import "google/protobuf/duration.proto";
message TaskCreated {
option (required_role) = {
diff --git a/src/main/proto/spine/buildtool/speed/pmanag/task_rejections.proto b/src/main/proto/spine/buildtool/speed/pmanag/task_rejections.proto
index 35c5f2e..1c983c2 100644
--- a/src/main/proto/spine/buildtool/speed/pmanag/task_rejections.proto
+++ b/src/main/proto/spine/buildtool/speed/pmanag/task_rejections.proto
@@ -36,12 +36,6 @@ option java_multiple_files = false;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/pmanag/identifiers.proto";
-import "spine/buildtool/speed/pmanag/time.proto";
-import "spine/buildtool/speed/pmanag/rich_text.proto";
-import "spine/buildtool/speed/pmanag/roles.proto";
-import "spine/time/time.proto";
-import "spine/net/url.proto";
-import "google/protobuf/duration.proto";
message CannotCommentClosedTask {
diff --git a/src/main/proto/spine/buildtool/speed/pmanag/user_commands.proto b/src/main/proto/spine/buildtool/speed/pmanag/user_commands.proto
index d2b1d1e..11ca5e2 100644
--- a/src/main/proto/spine/buildtool/speed/pmanag/user_commands.proto
+++ b/src/main/proto/spine/buildtool/speed/pmanag/user_commands.proto
@@ -36,9 +36,7 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/pmanag/identifiers.proto";
-import "spine/buildtool/speed/pmanag/roles.proto";
import "spine/people/person_name.proto";
-import "spine/time/time.proto";
import "spine/net/email_address.proto";
message SignUp {
diff --git a/src/main/proto/spine/buildtool/speed/pmanag/user_events.proto b/src/main/proto/spine/buildtool/speed/pmanag/user_events.proto
index 0dcea08..779ed1e 100644
--- a/src/main/proto/spine/buildtool/speed/pmanag/user_events.proto
+++ b/src/main/proto/spine/buildtool/speed/pmanag/user_events.proto
@@ -36,9 +36,7 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/pmanag/identifiers.proto";
-import "spine/buildtool/speed/pmanag/roles.proto";
import "spine/people/person_name.proto";
-import "spine/time/time.proto";
import "spine/net/email_address.proto";
message SignedUp {
diff --git a/src/main/proto/spine/buildtool/speed/pmanag/user_rejections.proto b/src/main/proto/spine/buildtool/speed/pmanag/user_rejections.proto
index 95753f9..5530178 100644
--- a/src/main/proto/spine/buildtool/speed/pmanag/user_rejections.proto
+++ b/src/main/proto/spine/buildtool/speed/pmanag/user_rejections.proto
@@ -36,10 +36,7 @@ option java_multiple_files = false;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/pmanag/identifiers.proto";
-import "spine/buildtool/speed/pmanag/roles.proto";
import "spine/people/person_name.proto";
-import "spine/time/time.proto";
-import "spine/net/email_address.proto";
message UserAlreadyExists {
diff --git a/src/main/proto/spine/buildtool/speed/prjcts/my_tasks_view.proto b/src/main/proto/spine/buildtool/speed/prjcts/my_tasks_view.proto
index 623356f..2c5cdf0 100644
--- a/src/main/proto/spine/buildtool/speed/prjcts/my_tasks_view.proto
+++ b/src/main/proto/spine/buildtool/speed/prjcts/my_tasks_view.proto
@@ -36,7 +36,6 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/prjcts/identifiers.proto";
-import "spine/buildtool/speed/prjcts/rich_text.proto";
import "spine/buildtool/speed/prjcts/task.proto";
import "spine/buildtool/speed/prjcts/label.proto";
import "spine/people/person_name.proto";
diff --git a/src/main/proto/spine/buildtool/speed/prjcts/project_commands.proto b/src/main/proto/spine/buildtool/speed/prjcts/project_commands.proto
index 1a85e4d..d38afc6 100644
--- a/src/main/proto/spine/buildtool/speed/prjcts/project_commands.proto
+++ b/src/main/proto/spine/buildtool/speed/prjcts/project_commands.proto
@@ -36,7 +36,6 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/prjcts/identifiers.proto";
-import "spine/buildtool/speed/prjcts/roles.proto";
message CreateProject {
diff --git a/src/main/proto/spine/buildtool/speed/prjcts/project_events.proto b/src/main/proto/spine/buildtool/speed/prjcts/project_events.proto
index 3c96033..122756c 100644
--- a/src/main/proto/spine/buildtool/speed/prjcts/project_events.proto
+++ b/src/main/proto/spine/buildtool/speed/prjcts/project_events.proto
@@ -36,7 +36,6 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/prjcts/identifiers.proto";
-import "spine/buildtool/speed/prjcts/roles.proto";
message ProjectCreated {
diff --git a/src/main/proto/spine/buildtool/speed/prjcts/rich_text.proto b/src/main/proto/spine/buildtool/speed/prjcts/rich_text.proto
index 14a4853..ee6421f 100644
--- a/src/main/proto/spine/buildtool/speed/prjcts/rich_text.proto
+++ b/src/main/proto/spine/buildtool/speed/prjcts/rich_text.proto
@@ -67,7 +67,7 @@ message Font {
spine.net.Url ttf_url = 2;
}
- int32 size = 3 [(range) = "[8..32]"];
+ int32 size = 3 [(range).value = "[8..32]"];
}
message Style {
diff --git a/src/main/proto/spine/buildtool/speed/prjcts/roles.proto b/src/main/proto/spine/buildtool/speed/prjcts/roles.proto
index b8eca14..185c1b3 100644
--- a/src/main/proto/spine/buildtool/speed/prjcts/roles.proto
+++ b/src/main/proto/spine/buildtool/speed/prjcts/roles.proto
@@ -75,5 +75,9 @@ message Role {
extend google.protobuf.MessageOptions {
// A role required for a user to be able to issue a command.
- Role required_role = 73947;
+ //
+ // See `options.proto` docs for the range of options used by Spine.
+ // Please also coordinate numbers with other `roles.proto` files in this project.
+ //
+ Role required_role = 74996;
}
diff --git a/src/main/proto/spine/buildtool/speed/prjcts/task.proto b/src/main/proto/spine/buildtool/speed/prjcts/task.proto
index 1a19c2e..99e5616 100644
--- a/src/main/proto/spine/buildtool/speed/prjcts/task.proto
+++ b/src/main/proto/spine/buildtool/speed/prjcts/task.proto
@@ -40,13 +40,11 @@ import "spine/buildtool/speed/prjcts/time.proto";
import "spine/buildtool/speed/prjcts/rich_text.proto";
import "spine/time/time.proto";
import "spine/net/url.proto";
-import "google/protobuf/duration.proto";
message Task {
option (entity).kind = AGGREGATE;
option (is) = {
java_type: "TaskMixin"
- generate: true
};
TaskId id = 1;
diff --git a/src/main/proto/spine/buildtool/speed/prjcts/task_commands.proto b/src/main/proto/spine/buildtool/speed/prjcts/task_commands.proto
index 5fda834..adc85a1 100644
--- a/src/main/proto/spine/buildtool/speed/prjcts/task_commands.proto
+++ b/src/main/proto/spine/buildtool/speed/prjcts/task_commands.proto
@@ -43,7 +43,6 @@ import "spine/buildtool/speed/prjcts/rich_text.proto";
import "spine/buildtool/speed/prjcts/roles.proto";
import "spine/time/time.proto";
import "spine/net/url.proto";
-import "google/protobuf/duration.proto";
message CreateTask {
option (required_role) = {
diff --git a/src/main/proto/spine/buildtool/speed/prjcts/task_events.proto b/src/main/proto/spine/buildtool/speed/prjcts/task_events.proto
index 804e30e..66350ec 100644
--- a/src/main/proto/spine/buildtool/speed/prjcts/task_events.proto
+++ b/src/main/proto/spine/buildtool/speed/prjcts/task_events.proto
@@ -43,9 +43,7 @@ import "spine/buildtool/speed/prjcts/time.proto";
import "spine/buildtool/speed/prjcts/rich_text.proto";
import "spine/buildtool/speed/prjcts/roles.proto";
import "spine/time/time.proto";
-import "spine/time_options.proto";
import "spine/net/url.proto";
-import "google/protobuf/duration.proto";
message TaskCreated {
option (required_role) = {
diff --git a/src/main/proto/spine/buildtool/speed/prjcts/task_rejections.proto b/src/main/proto/spine/buildtool/speed/prjcts/task_rejections.proto
index e920b26..9caf595 100644
--- a/src/main/proto/spine/buildtool/speed/prjcts/task_rejections.proto
+++ b/src/main/proto/spine/buildtool/speed/prjcts/task_rejections.proto
@@ -36,12 +36,6 @@ option java_multiple_files = false;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/prjcts/identifiers.proto";
-import "spine/buildtool/speed/prjcts/time.proto";
-import "spine/buildtool/speed/prjcts/rich_text.proto";
-import "spine/buildtool/speed/prjcts/roles.proto";
-import "spine/time/time.proto";
-import "spine/net/url.proto";
-import "google/protobuf/duration.proto";
message CannotCommentClosedTask {
diff --git a/src/main/proto/spine/buildtool/speed/prjcts/user_commands.proto b/src/main/proto/spine/buildtool/speed/prjcts/user_commands.proto
index dc0fbdf..db526c8 100644
--- a/src/main/proto/spine/buildtool/speed/prjcts/user_commands.proto
+++ b/src/main/proto/spine/buildtool/speed/prjcts/user_commands.proto
@@ -36,9 +36,7 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/prjcts/identifiers.proto";
-import "spine/buildtool/speed/prjcts/roles.proto";
import "spine/people/person_name.proto";
-import "spine/time/time.proto";
import "spine/net/email_address.proto";
message SignUp {
diff --git a/src/main/proto/spine/buildtool/speed/prjcts/user_events.proto b/src/main/proto/spine/buildtool/speed/prjcts/user_events.proto
index 0bc7560..10c1204 100644
--- a/src/main/proto/spine/buildtool/speed/prjcts/user_events.proto
+++ b/src/main/proto/spine/buildtool/speed/prjcts/user_events.proto
@@ -36,9 +36,7 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/prjcts/identifiers.proto";
-import "spine/buildtool/speed/prjcts/roles.proto";
import "spine/people/person_name.proto";
-import "spine/time/time.proto";
import "spine/net/email_address.proto";
message SignedUp {
diff --git a/src/main/proto/spine/buildtool/speed/prjcts/user_rejections.proto b/src/main/proto/spine/buildtool/speed/prjcts/user_rejections.proto
index d1d6e99..7d375bb 100644
--- a/src/main/proto/spine/buildtool/speed/prjcts/user_rejections.proto
+++ b/src/main/proto/spine/buildtool/speed/prjcts/user_rejections.proto
@@ -36,10 +36,7 @@ option java_multiple_files = false;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/prjcts/identifiers.proto";
-import "spine/buildtool/speed/prjcts/roles.proto";
import "spine/people/person_name.proto";
-import "spine/time/time.proto";
-import "spine/net/email_address.proto";
message UserAlreadyExists {
diff --git a/src/main/proto/spine/buildtool/speed/prjmgt/my_tasks_view.proto b/src/main/proto/spine/buildtool/speed/prjmgt/my_tasks_view.proto
index 79ee959..5eed08e 100644
--- a/src/main/proto/spine/buildtool/speed/prjmgt/my_tasks_view.proto
+++ b/src/main/proto/spine/buildtool/speed/prjmgt/my_tasks_view.proto
@@ -36,7 +36,6 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/prjmgt/identifiers.proto";
-import "spine/buildtool/speed/prjmgt/rich_text.proto";
import "spine/buildtool/speed/prjmgt/task.proto";
import "spine/buildtool/speed/prjmgt/label.proto";
import "spine/people/person_name.proto";
diff --git a/src/main/proto/spine/buildtool/speed/prjmgt/project_commands.proto b/src/main/proto/spine/buildtool/speed/prjmgt/project_commands.proto
index 18f3565..b133b33 100644
--- a/src/main/proto/spine/buildtool/speed/prjmgt/project_commands.proto
+++ b/src/main/proto/spine/buildtool/speed/prjmgt/project_commands.proto
@@ -36,7 +36,6 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/prjmgt/identifiers.proto";
-import "spine/buildtool/speed/prjmgt/roles.proto";
message CreateProject {
diff --git a/src/main/proto/spine/buildtool/speed/prjmgt/project_events.proto b/src/main/proto/spine/buildtool/speed/prjmgt/project_events.proto
index 6c20a1b..6452ced 100644
--- a/src/main/proto/spine/buildtool/speed/prjmgt/project_events.proto
+++ b/src/main/proto/spine/buildtool/speed/prjmgt/project_events.proto
@@ -36,7 +36,6 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/prjmgt/identifiers.proto";
-import "spine/buildtool/speed/prjmgt/roles.proto";
message ProjectCreated {
diff --git a/src/main/proto/spine/buildtool/speed/prjmgt/rich_text.proto b/src/main/proto/spine/buildtool/speed/prjmgt/rich_text.proto
index 959af7c..a862b34 100644
--- a/src/main/proto/spine/buildtool/speed/prjmgt/rich_text.proto
+++ b/src/main/proto/spine/buildtool/speed/prjmgt/rich_text.proto
@@ -67,7 +67,7 @@ message Font {
spine.net.Url ttf_url = 2;
}
- int32 size = 3 [(range) = "[8..32]"];
+ int32 size = 3 [(range).value = "[8..32]"];
}
message Style {
diff --git a/src/main/proto/spine/buildtool/speed/prjmgt/roles.proto b/src/main/proto/spine/buildtool/speed/prjmgt/roles.proto
index 5701822..190c9f3 100644
--- a/src/main/proto/spine/buildtool/speed/prjmgt/roles.proto
+++ b/src/main/proto/spine/buildtool/speed/prjmgt/roles.proto
@@ -75,5 +75,9 @@ message Role {
extend google.protobuf.MessageOptions {
// A role required for a user to be able to issue a command.
- Role required_role = 73947;
+ //
+ // See `options.proto` docs for the range of options used by Spine.
+ // Please also coordinate numbers with other `roles.proto` files in this project.
+ //
+ Role required_role = 74995;
}
diff --git a/src/main/proto/spine/buildtool/speed/prjmgt/task.proto b/src/main/proto/spine/buildtool/speed/prjmgt/task.proto
index 2459d43..c838306 100644
--- a/src/main/proto/spine/buildtool/speed/prjmgt/task.proto
+++ b/src/main/proto/spine/buildtool/speed/prjmgt/task.proto
@@ -40,13 +40,11 @@ import "spine/buildtool/speed/prjmgt/time.proto";
import "spine/buildtool/speed/prjmgt/rich_text.proto";
import "spine/time/time.proto";
import "spine/net/url.proto";
-import "google/protobuf/duration.proto";
message Task {
option (entity).kind = AGGREGATE;
option (is) = {
java_type: "TaskMixin"
- generate: true
};
TaskId id = 1;
diff --git a/src/main/proto/spine/buildtool/speed/prjmgt/task_commands.proto b/src/main/proto/spine/buildtool/speed/prjmgt/task_commands.proto
index 2ea0f65..0aff4b6 100644
--- a/src/main/proto/spine/buildtool/speed/prjmgt/task_commands.proto
+++ b/src/main/proto/spine/buildtool/speed/prjmgt/task_commands.proto
@@ -43,7 +43,6 @@ import "spine/buildtool/speed/prjmgt/rich_text.proto";
import "spine/buildtool/speed/prjmgt/roles.proto";
import "spine/time/time.proto";
import "spine/net/url.proto";
-import "google/protobuf/duration.proto";
message CreateTask {
option (required_role) = {
diff --git a/src/main/proto/spine/buildtool/speed/prjmgt/task_events.proto b/src/main/proto/spine/buildtool/speed/prjmgt/task_events.proto
index a2bb83f..0de5ef1 100644
--- a/src/main/proto/spine/buildtool/speed/prjmgt/task_events.proto
+++ b/src/main/proto/spine/buildtool/speed/prjmgt/task_events.proto
@@ -42,9 +42,7 @@ import "spine/buildtool/speed/prjmgt/time.proto";
import "spine/buildtool/speed/prjmgt/rich_text.proto";
import "spine/buildtool/speed/prjmgt/roles.proto";
import "spine/time/time.proto";
-import "spine/time_options.proto";
import "spine/net/url.proto";
-import "google/protobuf/duration.proto";
message TaskCreated {
option (required_role) = {
diff --git a/src/main/proto/spine/buildtool/speed/prjmgt/task_rejections.proto b/src/main/proto/spine/buildtool/speed/prjmgt/task_rejections.proto
index cf3e5e9..3305930 100644
--- a/src/main/proto/spine/buildtool/speed/prjmgt/task_rejections.proto
+++ b/src/main/proto/spine/buildtool/speed/prjmgt/task_rejections.proto
@@ -36,12 +36,6 @@ option java_multiple_files = false;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/prjmgt/identifiers.proto";
-import "spine/buildtool/speed/prjmgt/time.proto";
-import "spine/buildtool/speed/prjmgt/rich_text.proto";
-import "spine/buildtool/speed/prjmgt/roles.proto";
-import "spine/time/time.proto";
-import "spine/net/url.proto";
-import "google/protobuf/duration.proto";
message CannotCommentClosedTask {
diff --git a/src/main/proto/spine/buildtool/speed/prjmgt/user_commands.proto b/src/main/proto/spine/buildtool/speed/prjmgt/user_commands.proto
index faae951..8762da5 100644
--- a/src/main/proto/spine/buildtool/speed/prjmgt/user_commands.proto
+++ b/src/main/proto/spine/buildtool/speed/prjmgt/user_commands.proto
@@ -36,9 +36,7 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/prjmgt/identifiers.proto";
-import "spine/buildtool/speed/prjmgt/roles.proto";
import "spine/people/person_name.proto";
-import "spine/time/time.proto";
import "spine/net/email_address.proto";
message SignUp {
diff --git a/src/main/proto/spine/buildtool/speed/prjmgt/user_events.proto b/src/main/proto/spine/buildtool/speed/prjmgt/user_events.proto
index 209c271..d0c8d0b 100644
--- a/src/main/proto/spine/buildtool/speed/prjmgt/user_events.proto
+++ b/src/main/proto/spine/buildtool/speed/prjmgt/user_events.proto
@@ -36,9 +36,7 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/prjmgt/identifiers.proto";
-import "spine/buildtool/speed/prjmgt/roles.proto";
import "spine/people/person_name.proto";
-import "spine/time/time.proto";
import "spine/net/email_address.proto";
message SignedUp {
diff --git a/src/main/proto/spine/buildtool/speed/prjmgt/user_rejections.proto b/src/main/proto/spine/buildtool/speed/prjmgt/user_rejections.proto
index f2c1e54..65c4b5a 100644
--- a/src/main/proto/spine/buildtool/speed/prjmgt/user_rejections.proto
+++ b/src/main/proto/spine/buildtool/speed/prjmgt/user_rejections.proto
@@ -36,10 +36,7 @@ option java_multiple_files = false;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/prjmgt/identifiers.proto";
-import "spine/buildtool/speed/prjmgt/roles.proto";
import "spine/people/person_name.proto";
-import "spine/time/time.proto";
-import "spine/net/email_address.proto";
message UserAlreadyExists {
diff --git a/src/main/proto/spine/buildtool/speed/prmn/my_tasks_view.proto b/src/main/proto/spine/buildtool/speed/prmn/my_tasks_view.proto
index 81ede4e..af936cc 100644
--- a/src/main/proto/spine/buildtool/speed/prmn/my_tasks_view.proto
+++ b/src/main/proto/spine/buildtool/speed/prmn/my_tasks_view.proto
@@ -36,7 +36,6 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/prmn/identifiers.proto";
-import "spine/buildtool/speed/prmn/rich_text.proto";
import "spine/buildtool/speed/prmn/task.proto";
import "spine/buildtool/speed/prmn/label.proto";
import "spine/people/person_name.proto";
diff --git a/src/main/proto/spine/buildtool/speed/prmn/project_commands.proto b/src/main/proto/spine/buildtool/speed/prmn/project_commands.proto
index 0b2c596..2c90f60 100644
--- a/src/main/proto/spine/buildtool/speed/prmn/project_commands.proto
+++ b/src/main/proto/spine/buildtool/speed/prmn/project_commands.proto
@@ -36,7 +36,6 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/prmn/identifiers.proto";
-import "spine/buildtool/speed/prmn/roles.proto";
message CreateProject {
diff --git a/src/main/proto/spine/buildtool/speed/prmn/project_events.proto b/src/main/proto/spine/buildtool/speed/prmn/project_events.proto
index dfabcae..c70c029 100644
--- a/src/main/proto/spine/buildtool/speed/prmn/project_events.proto
+++ b/src/main/proto/spine/buildtool/speed/prmn/project_events.proto
@@ -36,7 +36,6 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/prmn/identifiers.proto";
-import "spine/buildtool/speed/prmn/roles.proto";
message ProjectCreated {
diff --git a/src/main/proto/spine/buildtool/speed/prmn/rich_text.proto b/src/main/proto/spine/buildtool/speed/prmn/rich_text.proto
index bd56994..5e4bb85 100644
--- a/src/main/proto/spine/buildtool/speed/prmn/rich_text.proto
+++ b/src/main/proto/spine/buildtool/speed/prmn/rich_text.proto
@@ -67,7 +67,7 @@ message Font {
spine.net.Url ttf_url = 2;
}
- int32 size = 3 [(range) = "[8..32]"];
+ int32 size = 3 [(range).value = "[8..32]"];
}
message Style {
diff --git a/src/main/proto/spine/buildtool/speed/prmn/roles.proto b/src/main/proto/spine/buildtool/speed/prmn/roles.proto
index 70e6816..b785d62 100644
--- a/src/main/proto/spine/buildtool/speed/prmn/roles.proto
+++ b/src/main/proto/spine/buildtool/speed/prmn/roles.proto
@@ -75,5 +75,9 @@ message Role {
extend google.protobuf.MessageOptions {
// A role required for a user to be able to issue a command.
- Role required_role = 73947;
+ //
+ // See `options.proto` docs for the range of options used by Spine.
+ // Please also coordinate numbers with other `roles.proto` files in this project.
+ //
+ Role required_role = 74994;
}
diff --git a/src/main/proto/spine/buildtool/speed/prmn/task.proto b/src/main/proto/spine/buildtool/speed/prmn/task.proto
index ab60569..d983ab7 100644
--- a/src/main/proto/spine/buildtool/speed/prmn/task.proto
+++ b/src/main/proto/spine/buildtool/speed/prmn/task.proto
@@ -40,13 +40,11 @@ import "spine/buildtool/speed/prmn/time.proto";
import "spine/buildtool/speed/prmn/rich_text.proto";
import "spine/time/time.proto";
import "spine/net/url.proto";
-import "google/protobuf/duration.proto";
message Task {
option (entity).kind = AGGREGATE;
option (is) = {
java_type: "TaskMixin"
- generate: true
};
TaskId id = 1;
diff --git a/src/main/proto/spine/buildtool/speed/prmn/task_commands.proto b/src/main/proto/spine/buildtool/speed/prmn/task_commands.proto
index 7a27218..361794f 100644
--- a/src/main/proto/spine/buildtool/speed/prmn/task_commands.proto
+++ b/src/main/proto/spine/buildtool/speed/prmn/task_commands.proto
@@ -43,7 +43,6 @@ import "spine/buildtool/speed/prmn/rich_text.proto";
import "spine/buildtool/speed/prmn/roles.proto";
import "spine/time/time.proto";
import "spine/net/url.proto";
-import "google/protobuf/duration.proto";
message CreateTask {
option (required_role) = {
diff --git a/src/main/proto/spine/buildtool/speed/prmn/task_events.proto b/src/main/proto/spine/buildtool/speed/prmn/task_events.proto
index cbdafb2..c8dd220 100644
--- a/src/main/proto/spine/buildtool/speed/prmn/task_events.proto
+++ b/src/main/proto/spine/buildtool/speed/prmn/task_events.proto
@@ -43,9 +43,7 @@ import "spine/buildtool/speed/prmn/time.proto";
import "spine/buildtool/speed/prmn/rich_text.proto";
import "spine/buildtool/speed/prmn/roles.proto";
import "spine/time/time.proto";
-import "spine/time_options.proto";
import "spine/net/url.proto";
-import "google/protobuf/duration.proto";
message TaskCreated {
option (required_role) = {
diff --git a/src/main/proto/spine/buildtool/speed/prmn/task_rejections.proto b/src/main/proto/spine/buildtool/speed/prmn/task_rejections.proto
index 4b4c80e..b24492b 100644
--- a/src/main/proto/spine/buildtool/speed/prmn/task_rejections.proto
+++ b/src/main/proto/spine/buildtool/speed/prmn/task_rejections.proto
@@ -36,12 +36,6 @@ option java_multiple_files = false;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/prmn/identifiers.proto";
-import "spine/buildtool/speed/prmn/time.proto";
-import "spine/buildtool/speed/prmn/rich_text.proto";
-import "spine/buildtool/speed/prmn/roles.proto";
-import "spine/time/time.proto";
-import "spine/net/url.proto";
-import "google/protobuf/duration.proto";
message CannotCommentClosedTask {
diff --git a/src/main/proto/spine/buildtool/speed/prmn/user_commands.proto b/src/main/proto/spine/buildtool/speed/prmn/user_commands.proto
index ac83cb3..c6048d0 100644
--- a/src/main/proto/spine/buildtool/speed/prmn/user_commands.proto
+++ b/src/main/proto/spine/buildtool/speed/prmn/user_commands.proto
@@ -36,9 +36,7 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/prmn/identifiers.proto";
-import "spine/buildtool/speed/prmn/roles.proto";
import "spine/people/person_name.proto";
-import "spine/time/time.proto";
import "spine/net/email_address.proto";
message SignUp {
diff --git a/src/main/proto/spine/buildtool/speed/prmn/user_events.proto b/src/main/proto/spine/buildtool/speed/prmn/user_events.proto
index a19989c..6e537f8 100644
--- a/src/main/proto/spine/buildtool/speed/prmn/user_events.proto
+++ b/src/main/proto/spine/buildtool/speed/prmn/user_events.proto
@@ -36,9 +36,7 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/prmn/identifiers.proto";
-import "spine/buildtool/speed/prmn/roles.proto";
import "spine/people/person_name.proto";
-import "spine/time/time.proto";
import "spine/net/email_address.proto";
message SignedUp {
diff --git a/src/main/proto/spine/buildtool/speed/prmn/user_rejections.proto b/src/main/proto/spine/buildtool/speed/prmn/user_rejections.proto
index cd1eac7..84f9fb7 100644
--- a/src/main/proto/spine/buildtool/speed/prmn/user_rejections.proto
+++ b/src/main/proto/spine/buildtool/speed/prmn/user_rejections.proto
@@ -36,10 +36,7 @@ option java_multiple_files = false;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/prmn/identifiers.proto";
-import "spine/buildtool/speed/prmn/roles.proto";
import "spine/people/person_name.proto";
-import "spine/time/time.proto";
-import "spine/net/email_address.proto";
message UserAlreadyExists {
diff --git a/src/main/proto/spine/buildtool/speed/projectman/my_tasks_view.proto b/src/main/proto/spine/buildtool/speed/projectman/my_tasks_view.proto
index a7edaac..71aa6cf 100644
--- a/src/main/proto/spine/buildtool/speed/projectman/my_tasks_view.proto
+++ b/src/main/proto/spine/buildtool/speed/projectman/my_tasks_view.proto
@@ -36,7 +36,6 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/projectman/identifiers.proto";
-import "spine/buildtool/speed/projectman/rich_text.proto";
import "spine/buildtool/speed/projectman/task.proto";
import "spine/buildtool/speed/projectman/label.proto";
import "spine/people/person_name.proto";
diff --git a/src/main/proto/spine/buildtool/speed/projectman/rich_text.proto b/src/main/proto/spine/buildtool/speed/projectman/rich_text.proto
index 25991b7..3e0b58b 100644
--- a/src/main/proto/spine/buildtool/speed/projectman/rich_text.proto
+++ b/src/main/proto/spine/buildtool/speed/projectman/rich_text.proto
@@ -67,7 +67,7 @@ message Font {
spine.net.Url ttf_url = 2;
}
- int32 size = 3 [(range) = "[8..32]"];
+ int32 size = 3 [(range).value = "[8..32]"];
}
message Style {
diff --git a/src/main/proto/spine/buildtool/speed/projectman/roles.proto b/src/main/proto/spine/buildtool/speed/projectman/roles.proto
index 1f3213f..02d68f8 100644
--- a/src/main/proto/spine/buildtool/speed/projectman/roles.proto
+++ b/src/main/proto/spine/buildtool/speed/projectman/roles.proto
@@ -75,5 +75,9 @@ message Role {
extend google.protobuf.MessageOptions {
// A role required for a user to be able to issue a command.
- Role required_role = 73947;
+ //
+ // See `options.proto` docs for the range of options used by Spine.
+ // Please also coordinate numbers with other `roles.proto` files in this project.
+ //
+ Role required_role = 74993;
}
diff --git a/src/main/proto/spine/buildtool/speed/projectman/task.proto b/src/main/proto/spine/buildtool/speed/projectman/task.proto
index 9877705..708a319 100644
--- a/src/main/proto/spine/buildtool/speed/projectman/task.proto
+++ b/src/main/proto/spine/buildtool/speed/projectman/task.proto
@@ -46,7 +46,6 @@ message Task {
option (entity).kind = AGGREGATE;
option (is) = {
java_type: "TaskMixin"
- generate: true
};
TaskId id = 1;
diff --git a/src/main/proto/spine/buildtool/speed/projectman/task_rejections.proto b/src/main/proto/spine/buildtool/speed/projectman/task_rejections.proto
index a3f45b7..4c4ecee 100644
--- a/src/main/proto/spine/buildtool/speed/projectman/task_rejections.proto
+++ b/src/main/proto/spine/buildtool/speed/projectman/task_rejections.proto
@@ -36,12 +36,6 @@ option java_multiple_files = false;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/projectman/identifiers.proto";
-import "spine/buildtool/speed/projectman/time.proto";
-import "spine/buildtool/speed/projectman/rich_text.proto";
-import "spine/buildtool/speed/projectman/roles.proto";
-import "spine/time/time.proto";
-import "spine/net/url.proto";
-import "google/protobuf/duration.proto";
message CannotCommentClosedTask {
diff --git a/src/main/proto/spine/buildtool/speed/promag/rich_text.proto b/src/main/proto/spine/buildtool/speed/promag/rich_text.proto
index 352f78f..a1f659f 100644
--- a/src/main/proto/spine/buildtool/speed/promag/rich_text.proto
+++ b/src/main/proto/spine/buildtool/speed/promag/rich_text.proto
@@ -67,7 +67,7 @@ message Font {
spine.net.Url ttf_url = 2;
}
- int32 size = 3 [(range) = "[8..32]"];
+ int32 size = 3 [(range).value = "[8..32]"];
}
message Style {
diff --git a/src/main/proto/spine/buildtool/speed/promag/roles.proto b/src/main/proto/spine/buildtool/speed/promag/roles.proto
index 8e1b641..8b0cfc4 100644
--- a/src/main/proto/spine/buildtool/speed/promag/roles.proto
+++ b/src/main/proto/spine/buildtool/speed/promag/roles.proto
@@ -75,5 +75,9 @@ message Role {
extend google.protobuf.MessageOptions {
// A role required for a user to be able to issue a command.
- Role required_role = 73947;
+ //
+ // See `options.proto` docs for the range of options used by Spine.
+ // Please also coordinate numbers with other `roles.proto` files in this project.
+ //
+ Role required_role = 74992;
}
diff --git a/src/main/proto/spine/buildtool/speed/promag/task.proto b/src/main/proto/spine/buildtool/speed/promag/task.proto
index 786f0bf..33efdfb 100644
--- a/src/main/proto/spine/buildtool/speed/promag/task.proto
+++ b/src/main/proto/spine/buildtool/speed/promag/task.proto
@@ -46,7 +46,6 @@ message Task {
option (entity).kind = AGGREGATE;
option (is) = {
java_type: "TaskMixin"
- generate: true
};
TaskId id = 1;
diff --git a/src/main/proto/spine/buildtool/speed/promag/task_rejections.proto b/src/main/proto/spine/buildtool/speed/promag/task_rejections.proto
index 94cf489..46b68de 100644
--- a/src/main/proto/spine/buildtool/speed/promag/task_rejections.proto
+++ b/src/main/proto/spine/buildtool/speed/promag/task_rejections.proto
@@ -36,12 +36,6 @@ option java_multiple_files = false;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/promag/identifiers.proto";
-import "spine/buildtool/speed/promag/time.proto";
-import "spine/buildtool/speed/promag/rich_text.proto";
-import "spine/buildtool/speed/promag/roles.proto";
-import "spine/time/time.proto";
-import "spine/net/url.proto";
-import "google/protobuf/duration.proto";
message CannotCommentClosedTask {
diff --git a/src/main/proto/spine/buildtool/speed/promag/user_commands.proto b/src/main/proto/spine/buildtool/speed/promag/user_commands.proto
index 72a62d9..bdc9d64 100644
--- a/src/main/proto/spine/buildtool/speed/promag/user_commands.proto
+++ b/src/main/proto/spine/buildtool/speed/promag/user_commands.proto
@@ -36,7 +36,6 @@ option java_multiple_files = true;
option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/promag/identifiers.proto";
-import "spine/buildtool/speed/promag/roles.proto";
import "spine/people/person_name.proto";
import "spine/time/time.proto";
import "spine/net/email_address.proto";
diff --git a/src/main/proto/spine/buildtool/speed/promag/user_events.proto b/src/main/proto/spine/buildtool/speed/promag/user_events.proto
index e856c37..b395dc4 100644
--- a/src/main/proto/spine/buildtool/speed/promag/user_events.proto
+++ b/src/main/proto/spine/buildtool/speed/promag/user_events.proto
@@ -38,7 +38,6 @@ option (type_url_prefix) = "type.spine.io";
import "spine/buildtool/speed/promag/identifiers.proto";
import "spine/buildtool/speed/promag/roles.proto";
import "spine/people/person_name.proto";
-import "spine/time/time.proto";
import "spine/net/email_address.proto";
message SignedUp {