From 1dae776ac0d1f370266f9b95fa0f4528bf570a66 Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Thu, 18 Sep 2025 14:49:01 +0100 Subject: [PATCH 01/14] Update `config` --- .agents/_TOC.md | 18 ++ .agents/advanced-safety-rules.md | 6 + .agents/coding-guidelines.md | 39 ++++ .agents/common-tasks.md | 6 + .agents/documentation-guidelines.md | 14 ++ .agents/documentation-tasks.md | 20 ++ .agents/java-kotlin-conversion.md | 43 ++++ .agents/project-overview.md | 8 + .agents/project-structure-expectations.md | 21 ++ .agents/purpose.md | 20 ++ .agents/quick-reference-card.md | 10 + .agents/refactoring-guidelines.md | 3 + .agents/running-builds.md | 18 ++ .agents/safety-rules.md | 7 + .agents/testing.md | 8 + .agents/version-policy.md | 30 +++ .idea/dictionaries/common.xml | 1 + .junie/guidelines.md | 21 ++ AGENTS.md | 5 + buildSrc/build.gradle.kts | 24 +-- buildSrc/quality/checkstyle-suppressions.xml | 42 ++++ buildSrc/quality/checkstyle.xml | 86 ++++++++ buildSrc/quality/detekt-config.yml | 35 +++ buildSrc/quality/pmd.xml | 97 +++++++++ buildSrc/settings.gradle.kts | 37 ++++ buildSrc/src/main/kotlin/BuildExtensions.kt | 6 + buildSrc/src/main/kotlin/DokkaExts.kt | 85 ++++++-- .../kotlin/detekt-code-analysis.gradle.kts | 4 +- .../kotlin/io/spine/dependency/build/Ksp.kt | 30 ++- .../io/spine/dependency/kotlinx/AtomicFu.kt | 54 +++++ .../io/spine/dependency/kotlinx/DateTime.kt | 34 +++ .../io/spine/dependency/kotlinx/KotlinX.kt | 2 +- .../kotlin/io/spine/dependency/lib/Grpc.kt | 1 - .../io/spine/dependency/local/CoreJava.kt | 2 +- .../io/spine/dependency/local/Logging.kt | 2 +- .../io/spine/dependency/local/McJava.kt | 7 +- .../io/spine/dependency/local/ProtoData.kt | 10 +- .../io/spine/dependency/local/ProtoTap.kt | 2 +- .../io/spine/dependency/local/Reflect.kt | 2 +- .../kotlin/io/spine/dependency/local/Time.kt | 2 +- .../io/spine/dependency/local/ToolBase.kt | 17 +- .../io/spine/dependency/local/Validation.kt | 2 +- .../kotlin/io/spine/dependency/test/JUnit.kt | 4 +- .../dependency/test/KotlinCompileTesting.kt | 2 +- .../kotlin/io/spine/gradle/ConfigTester.kt | 2 +- .../main/kotlin/io/spine/gradle/Runtime.kt | 15 +- .../gradle/checkstyle/CheckStyleConfig.kt | 2 +- .../kotlin/io/spine/gradle/java/Linters.kt | 61 ++++++ .../io/spine/gradle/kotlin/KotlinConfig.kt | 6 +- .../gradle/publish/CheckVersionIncrement.kt | 6 +- .../io/spine/gradle/publish/ShadowJarExts.kt | 77 +++++++ .../report/license/ModuleDataExtensions.kt | 1 - .../spine/gradle/report/license/Template.kt | 17 +- .../spine/gradle/report/pom/PomFormatting.kt | 2 +- .../spine/gradle/report/pom/PomGenerator.kt | 5 +- .../spine/gradle/report/pom/PomXmlWriter.kt | 16 +- .../src/main/kotlin/jvm-module.gradle.kts | 27 +-- .../src/main/kotlin/kmp-module.gradle.kts | 189 ++++++++++++++++ .../src/main/kotlin/kmp-publish.gradle.kts | 75 +++++++ .../src/main/kotlin/pmd-settings.gradle.kts | 2 +- .../main/kotlin/uber-jar-module.gradle.kts | 202 ++++++++++++++++++ .../resources/dokka/styles/custom-styles.css | 4 +- config | 2 +- gradle.properties | 22 +- 64 files changed, 1486 insertions(+), 134 deletions(-) create mode 100644 .agents/_TOC.md create mode 100644 .agents/advanced-safety-rules.md create mode 100644 .agents/coding-guidelines.md create mode 100644 .agents/common-tasks.md create mode 100644 .agents/documentation-guidelines.md create mode 100644 .agents/documentation-tasks.md create mode 100644 .agents/java-kotlin-conversion.md create mode 100644 .agents/project-overview.md create mode 100644 .agents/project-structure-expectations.md create mode 100644 .agents/purpose.md create mode 100644 .agents/quick-reference-card.md create mode 100644 .agents/refactoring-guidelines.md create mode 100644 .agents/running-builds.md create mode 100644 .agents/safety-rules.md create mode 100644 .agents/testing.md create mode 100644 .agents/version-policy.md create mode 100644 .junie/guidelines.md create mode 100644 AGENTS.md create mode 100644 buildSrc/quality/checkstyle-suppressions.xml create mode 100644 buildSrc/quality/checkstyle.xml create mode 100644 buildSrc/quality/detekt-config.yml create mode 100644 buildSrc/quality/pmd.xml create mode 100644 buildSrc/settings.gradle.kts create mode 100644 buildSrc/src/main/kotlin/io/spine/dependency/kotlinx/AtomicFu.kt create mode 100644 buildSrc/src/main/kotlin/io/spine/dependency/kotlinx/DateTime.kt create mode 100644 buildSrc/src/main/kotlin/io/spine/gradle/java/Linters.kt create mode 100644 buildSrc/src/main/kotlin/io/spine/gradle/publish/ShadowJarExts.kt create mode 100644 buildSrc/src/main/kotlin/kmp-module.gradle.kts create mode 100644 buildSrc/src/main/kotlin/kmp-publish.gradle.kts create mode 100644 buildSrc/src/main/kotlin/uber-jar-module.gradle.kts diff --git a/.agents/_TOC.md b/.agents/_TOC.md new file mode 100644 index 0000000..cf470cb --- /dev/null +++ b/.agents/_TOC.md @@ -0,0 +1,18 @@ +# Table of Contents + +1. [Quick Reference Card](quick-reference-card.md) +2. [Purpose](purpose.md) +3. [Project overview](project-overview.md) +4. [Coding guidelines](coding-guidelines.md) +5. [Documentation & comments](documentation-guidelines.md) +6. [Documentation typography & structure](documentation-typography-and-structure.md) +7. [Documentation tasks](documentation-tasks.md) +8. [Running builds](running-builds.md) +9. [Version policy](version-policy.md) +10. [Project structure expectations](project-structure-expectations.md) +11. [Testing](testing.md) +12. [Safety rules](safety-rules.md) +13. [Advanced safety rules](advanced-safety-rules.md) +14. [Refactoring guidelines](refactoring-guidelines.md) +15. [Common tasks](common-tasks.md) +16. [Java to Kotlin conversion](java-kotlin-conversion.md) diff --git a/.agents/advanced-safety-rules.md b/.agents/advanced-safety-rules.md new file mode 100644 index 0000000..e410581 --- /dev/null +++ b/.agents/advanced-safety-rules.md @@ -0,0 +1,6 @@ +# ๐Ÿšจ Advanced safety rules + +- Do **not** auto-update external dependencies without explicit request. +- Do **not** inject analytics or telemetry code. +- Flag any usage of unsafe constructs (e.g., reflection, I/O on the main thread). +- Avoid generating blocking calls inside coroutines. diff --git a/.agents/coding-guidelines.md b/.agents/coding-guidelines.md new file mode 100644 index 0000000..3297d8a --- /dev/null +++ b/.agents/coding-guidelines.md @@ -0,0 +1,39 @@ +# ๐Ÿงพ Coding guidelines + +## Core principles + +- Adhere to [Spine Event Engine Documentation][spine-docs] for coding style. +- Generate code that compiles cleanly and passes static analysis. +- Respect existing architecture, naming conventions, and project structure. +- Write clear, incremental commits with descriptive messages. +- Include automated tests for any code change that alters functionality. + +## Kotlin best practices + +### โœ… Prefer +- **Kotlin idioms** over Java-style approaches: + - Extension functions + - `when` expressions + - Smart casts + - Data classes and sealed classes + - Immutable data structures +- **Simple nouns** over composite nouns (`user` > `userAccount`) +- **Generic parameters** over explicit variable types (`val list = mutableList()`) +- **Java interop annotations** only when needed (`@file:JvmName`, `@JvmStatic`) +- **Kotlin DSL** for Gradle files + +### โŒ Avoid +- Mutable data structures +- Java-style verbosity (builders with setters) +- Redundant null checks (`?.let` misuse) +- Using `!!` unless clearly justified +- Type names in variable names (`userObject`, `itemList`) +- String duplication (use constants in companion objects) +- Mixing Groovy and Kotlin DSLs in build logic +- Reflection unless specifically requested + +## Text formatting + - โœ… Remove double empty lines in the code. + - โœ… Remove trailing space characters in the code. + +[spine-docs]: https://github.com/SpineEventEngine/documentation/wiki diff --git a/.agents/common-tasks.md b/.agents/common-tasks.md new file mode 100644 index 0000000..5ee954d --- /dev/null +++ b/.agents/common-tasks.md @@ -0,0 +1,6 @@ +# ๐Ÿ“‹ Common tasks + +- **Adding a new dependency**: Update relevant files in `buildSrc` directory. +- **Creating a new module**: Follow existing module structure patterns. +- **Documentation**: Use KDoc style for public and internal APIs. +- **Testing**: Create comprehensive tests using Kotest assertions. diff --git a/.agents/documentation-guidelines.md b/.agents/documentation-guidelines.md new file mode 100644 index 0000000..914dcc8 --- /dev/null +++ b/.agents/documentation-guidelines.md @@ -0,0 +1,14 @@ +# Documentation & comments + +## Commenting guidelines +- Avoid inline comments in production code unless necessary. +- Inline comments are helpful in tests. +- When using TODO comments, follow the format on the [dedicated page][todo-comments]. +- File and directory names should be formatted as code. + +## Avoid widows, runts, orphans, or rivers + +Agents should **AVOID** text flow patters illustrated +on [this diagram](widow-runt-orphan-river.jpg). + +[todo-comments]: https://github.com/SpineEventEngine/documentation/wiki/TODO-comments diff --git a/.agents/documentation-tasks.md b/.agents/documentation-tasks.md new file mode 100644 index 0000000..8ac4660 --- /dev/null +++ b/.agents/documentation-tasks.md @@ -0,0 +1,20 @@ +# ๐Ÿ“„ Documentation tasks + +1. Ensure all public and internal APIs have KDoc examples. +2. Add in-line code blocks for clarity in tests. +3. Convert inline API comments in Java to KDoc in Kotlin: + ```java + // Literal string to be inlined whenever a placeholder references a non-existent argument. + private final String missingArgumentMessage = "[MISSING ARGUMENT]"; + ``` + transforms to: + ```kotlin + /** + * Literal string to be inlined whenever a placeholder references a non-existent argument. + */ + private val missingArgumentMessage = "[MISSING ARGUMENT]" + ``` + +4. Javadoc -> KDoc conversion tasks: + - Remove `

` tags in the line with text: `"

This"` -> `"This"`. + - Replace `

` with empty line if the tag is the only text in the line. diff --git a/.agents/java-kotlin-conversion.md b/.agents/java-kotlin-conversion.md new file mode 100644 index 0000000..95cf929 --- /dev/null +++ b/.agents/java-kotlin-conversion.md @@ -0,0 +1,43 @@ +# ๐Ÿช„ Converting Java code to Kotlin + +* Java code API comments are Javadoc format. +* Kotlin code API comments are in KDoc format. + +## Javadoc to KDoc conversion + +* The wording of original Javadoc comments must be preserved. + +## Treating nullability + +* Use nullable Kotlin type only if the type in Java is annotated as `@Nullable`. + +## Efficient Conversion Workflow + +* First, analyze the entire Java file structure before beginning conversion to understand dependencies and class relationships. +* Convert Java code to Kotlin systematically: imports first, followed by class definitions, methods, and finally expressions. +* Preserve all existing functionality and behavior during conversion. +* Maintain original code structure and organization to ensure readability. + +## Common Java to Kotlin Patterns + +* Convert Java getters/setters to Kotlin properties with appropriate visibility modifiers. +* Transform Java static methods to companion object functions or top-level functions as appropriate. +* Replace Java anonymous classes with Kotlin lambda expressions when possible. +* Convert Java interfaces with default methods to Kotlin interfaces with implementations. +* Transform Java builders to Kotlin DSL patterns when appropriate. + +## Error Prevention + +* Pay special attention to Java's checked exceptions versus Kotlin's unchecked exceptions. +* Be cautious with Java wildcards (`? extends`, `? super`) conversion to Kotlin's `out` and `in` type parameters. +* Ensure proper handling of Java static initialization blocks in Kotlin companion objects. +* Verify that Java overloaded methods convert correctly with appropriate default parameter values in Kotlin. +* Remember that Kotlin has smart casts which can eliminate explicit type casting needed in Java. + +## Documentation Conversion + +* Convert `@param` to `@param` with the same description. +* Convert `@return` to `@return` with the same description. +* Convert `@throws` to `@throws` with the same description. +* Convert `{@link}` to `[name][fully.qualified.Name]` format. +* Convert `{@code}` to inline code with backticks (`). diff --git a/.agents/project-overview.md b/.agents/project-overview.md new file mode 100644 index 0000000..69c58eb --- /dev/null +++ b/.agents/project-overview.md @@ -0,0 +1,8 @@ +# ๐Ÿ› ๏ธ Project overview + +- **Languages**: Kotlin (primary), Java (secondary). +- **Build tool**: Gradle with Kotlin DSL. +- **Architecture**: Event-driven Command Query Responsibility Segregation (CQRS). +- **Static analysis**: detekt, ErrorProne, Checkstyle, PMD. +- **Testing**: JUnit 5, Kotest Assertions, Codecov. +- **Tools used**: Gradle plugins, IntelliJ IDEA Platform, KSP, KotlinPoet, Dokka. diff --git a/.agents/project-structure-expectations.md b/.agents/project-structure-expectations.md new file mode 100644 index 0000000..1362a51 --- /dev/null +++ b/.agents/project-structure-expectations.md @@ -0,0 +1,21 @@ +# ๐Ÿ“ Project structure expectations + +```yaml +.github +buildSrc/ + + src/ + โ”œโ”€โ”€ main/ + โ”‚ โ”œโ”€โ”€ kotlin/ # Kotlin source files + โ”‚ โ””โ”€โ”€ java/ # Legacy Java code + โ”œโ”€โ”€ test/ + โ”‚ โ””โ”€โ”€ kotlin/ # Unit and integration tests + build.gradle.kts # Kotlin-based build configuration + + +build.gradle.kts # Kotlin-based build configuration +settings.gradle.kts # Project structure and settings +README.md # Project overview +AGENTS.md # LLM agent instructions (this file) +version.gradle.kts # Declares the project version. +``` diff --git a/.agents/purpose.md b/.agents/purpose.md new file mode 100644 index 0000000..fb86526 --- /dev/null +++ b/.agents/purpose.md @@ -0,0 +1,20 @@ +# ๐Ÿง  Purpose + +> **EXECUTIVE SUMMARY**: This guide outlines how AI agents (ChatGPT, Codex, Junie, Claude, Gemini) +> collaborate on our Kotlin/Java project. It defines responsibilities, coding standards, +> and workflows to maintain high code quality and architectural integrity. + +It outlines: + +- Agent responsibilities (who does what). +- Coding and architectural guidelines agents must follow. +- Instructions for creating and testing agent-generated outputs. + +Whether you are a developer, tester, or contributor, this guide helps you collaborate +with AI to maintain a high-quality codebase. + +## Terminology +- **LLM**: Refers to the general category of language models (e.g., ChatGPT, Codex, Claude, Junie). +- **Agents**: A broader term for LLMs collaborating on this project. +- Use specific names (**ChatGPT**, **Codex**) when they excel at different tasks + (e.g., scaffolding versus explanation). diff --git a/.agents/quick-reference-card.md b/.agents/quick-reference-card.md new file mode 100644 index 0000000..6c25b9a --- /dev/null +++ b/.agents/quick-reference-card.md @@ -0,0 +1,10 @@ +# ๐Ÿ“ Quick Reference Card + +``` +๐Ÿ”‘ Key Information: +- Kotlin/Java project with CQRS architecture +- Use ChatGPT for documentation, Codex for code generation, GPT-4o for complex analysis +- Follow coding guidelines in Spine Event Engine docs +- Always include tests with code changes +- Version bump required for all PRs +``` diff --git a/.agents/refactoring-guidelines.md b/.agents/refactoring-guidelines.md new file mode 100644 index 0000000..818a13f --- /dev/null +++ b/.agents/refactoring-guidelines.md @@ -0,0 +1,3 @@ +# โš™๏ธ Refactoring guidelines + +- Do not replace Kotest assertions with standard Kotlin's Built-In Test Assertions. diff --git a/.agents/running-builds.md b/.agents/running-builds.md new file mode 100644 index 0000000..db0338d --- /dev/null +++ b/.agents/running-builds.md @@ -0,0 +1,18 @@ +# Running builds + +1. When modifying code, run: + ```bash + ./gradlew build + ``` + +2. If Protobuf (`.proto`) files are modified run: + ```bash + ./gradlew clean build + ``` + +3. Documentation-only changes in Kotlin or Java sources run: + ```bash + ./gradlew dokka + ``` + +4. Documentation-only changes do not require running tests! diff --git a/.agents/safety-rules.md b/.agents/safety-rules.md new file mode 100644 index 0000000..08e9b33 --- /dev/null +++ b/.agents/safety-rules.md @@ -0,0 +1,7 @@ +# Safety rules + +- โœ… All code must compile and pass static analysis. +- โœ… Do not auto-update external dependencies. +- โŒ Never use reflection or unsafe code without an explicit approval. +- โŒ No analytics or telemetry code. +- โŒ No blocking calls inside coroutines. diff --git a/.agents/testing.md b/.agents/testing.md new file mode 100644 index 0000000..f81bdbf --- /dev/null +++ b/.agents/testing.md @@ -0,0 +1,8 @@ +# ๐Ÿงช Testing + +- Do not use mocks, use stubs. +- Prefer [Kotest assertions][kotest-assertions] over assertions from JUnit or Google Truth. +- Generate unit tests for APIs (handles edge cases/scenarios). +- Supply scaffolds for typical Kotlin patterns (`when`, sealed classes). + +[kotest-assertions]: https://kotest.io/docs/assertions/assertions.html diff --git a/.agents/version-policy.md b/.agents/version-policy.md new file mode 100644 index 0000000..65dc457 --- /dev/null +++ b/.agents/version-policy.md @@ -0,0 +1,30 @@ +# Version policy + +## We use semver +The version of the project is kept in the `version.gradle.kts` file in the root of the project. + +The version numbers in these files follow the conventions of +[Semantic Versioning 2.0.0](https://semver.org/). + +## Quick checklist for versioning +1. Increment the patch version in `version.gradle.kts`. + Retain zero-padding if applicable: + - Example: `"2.0.0-SNAPSHOT.009"` โ†’ `"2.0.0-SNAPSHOT.010"` +2. Commit the version bump separately with this comment: + ```text + Bump version โ†’ `$newVersion` + ``` +3. Rebuild using `./gradlew clean build`. +4. Update `pom.xml`, `dependencies.md` and commit changes with: `Update dependency reports` + +Remember: PRs without version bumps will fail CI (conflict resolution detailed above). + +## Resolving conflicts in `version.gradle.kts` +A branch conflict over the version number should be resolved as described below. + * If a merged branch has a number which is less than that of the current branch, the version of + the current branch stays. + * If the merged branch has the number which is greater or equal to that of the current branch, + the number should be increased by one. + +## When to bump the version? + - When a new branch is created. diff --git a/.idea/dictionaries/common.xml b/.idea/dictionaries/common.xml index 5e2d460..d1c3a7b 100644 --- a/.idea/dictionaries/common.xml +++ b/.idea/dictionaries/common.xml @@ -25,6 +25,7 @@ hohpe idempotency jspecify + kotest lempira liskov melnik diff --git a/.junie/guidelines.md b/.junie/guidelines.md new file mode 100644 index 0000000..3e95e29 --- /dev/null +++ b/.junie/guidelines.md @@ -0,0 +1,21 @@ +# Guidelines for Junie and AI Agent from JetBrains + +Read the `../.agents/_TOC.md` file at the root of the project to understand: + - the agent responsibilities, + - project overview, + - coding guidelines, + - other relevant topics. + +Also follow the Junie-specific rules described below. + +## Junie Assistance Tips + +When working with Junie AI on the Spine Tool-Base project: + +1. **Project Navigation**: Use `search_project` to find relevant files and code segments. +2. **Code Understanding**: Request file structure with `get_file_structure` before editing. +3. **Code Editing**: Make minimal changes with `search_replace` to maintain project consistency. +4. **Testing**: Verify changes with `run_test` on relevant test files. +5. **Documentation**: Follow KDoc style for documentation. +6. **Kotlin Idioms**: Prefer Kotlin-style solutions over Java-style approaches. +7. **Version Updates**: Remember to update `version.gradle.kts` for PRs. diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..142af98 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,5 @@ +# ๐Ÿ‘‹ Welcome, Agents! + +For detailed agent guidelines and documentation, please see: + +**[Agent Documentation](./.agents/_TOC.md)** diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index ed4561d..b41bfb4 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -24,8 +24,6 @@ * 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`. @@ -127,6 +125,11 @@ val detektVersion = "1.23.8" */ val kotestJvmPluginVersion = "0.4.10" +/** + * @see [io.spine.dependency.test.Kotest.MultiplatformGradlePlugin] + */ +val kotestMultiplatformPluginVersion = "5.9.1" + /** * @see [io.spine.dependency.test.Kover] */ @@ -139,7 +142,7 @@ val koverVersion = "0.9.1" * * @see Shadow Plugin releases */ -val shadowVersion = "7.1.2" +val shadowVersion = "8.3.6" configurations.all { resolutionStrategy { @@ -155,16 +158,6 @@ configurations.all { } } -java { - toolchain.languageVersion.set(JavaLanguageVersion.of(17)) -} - -kotlin { - compilerOptions { - jvmTarget.set(JvmTarget.JVM_17) - } -} - dependencies { api("com.github.jk1:gradle-license-report:$licenseReportVersion") api(platform("org.jetbrains.kotlin:kotlin-bom:$kotlinEmbeddedVersion")) @@ -176,15 +169,16 @@ dependencies { "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", + "com.gradleup.shadow:shadow-gradle-plugin:$shadowVersion", "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$detektVersion", "io.kotest:kotest-gradle-plugin:$kotestJvmPluginVersion", + "io.kotest:kotest-framework-multiplatform-plugin-gradle:$kotestMultiplatformPluginVersion", // 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.dokka:dokka-gradle-plugin:$dokkaVersion", "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinEmbeddedVersion", "org.jetbrains.kotlin:kotlin-reflect:$kotlinEmbeddedVersion", "org.jetbrains.kotlinx:kover-gradle-plugin:$koverVersion" diff --git a/buildSrc/quality/checkstyle-suppressions.xml b/buildSrc/quality/checkstyle-suppressions.xml new file mode 100644 index 0000000..54756a7 --- /dev/null +++ b/buildSrc/quality/checkstyle-suppressions.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + diff --git a/buildSrc/quality/checkstyle.xml b/buildSrc/quality/checkstyle.xml new file mode 100644 index 0000000..61c5e72 --- /dev/null +++ b/buildSrc/quality/checkstyle.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/buildSrc/quality/detekt-config.yml b/buildSrc/quality/detekt-config.yml new file mode 100644 index 0000000..dd89be3 --- /dev/null +++ b/buildSrc/quality/detekt-config.yml @@ -0,0 +1,35 @@ +naming: + ClassNaming: + excludes: &testFiles # Allows ticks-named nested test and spec suites. + - "**/*Test.kt" + - "**/*Spec.kt" + MatchingDeclarationName: + excludes: *testFiles # Allows ticks-named top-level test and spec suites. + +style: + UnusedPrivateMember: + allowedNames: '(_|ignored|expected|serialVersionUID|about|ABOUT)' + MagicNumber: + ignoreNumbers: + - '-1' + - '0' + - '1' + - '2' + - '3' + MaxLineLength: + maxLineLength: 100 + excludeCommentStatements: true + ForbiddenComment: + allowedPatterns: 'TODO:' + +complexity: + TooManyFunctions: + excludes: + - '**/*Exts.kt' + - '**/*Extensions.kt' + - '**/*View.kt' + - '**/*Projection.kt' + - '**/*Test.kt' + - '**/*Spec.kt' + LongMethod: + excludes: *testFiles # Allows long names for test and spec methods. diff --git a/buildSrc/quality/pmd.xml b/buildSrc/quality/pmd.xml new file mode 100644 index 0000000..1d78b5b --- /dev/null +++ b/buildSrc/quality/pmd.xml @@ -0,0 +1,97 @@ + + + + + + + + A set of PMD rules applied to Spine Event Engine projects. + + + + .*/generated/.* + .*/generated-proto/.* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/buildSrc/settings.gradle.kts b/buildSrc/settings.gradle.kts new file mode 100644 index 0000000..4110254 --- /dev/null +++ b/buildSrc/settings.gradle.kts @@ -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. + */ + +pluginManagement { + repositories { + gradlePluginPortal() + mavenLocal() + mavenCentral() + } +} + +plugins { + id("org.gradle.toolchains.foojay-resolver-convention") //.version("1.0.0") +} diff --git a/buildSrc/src/main/kotlin/BuildExtensions.kt b/buildSrc/src/main/kotlin/BuildExtensions.kt index 4f0443d..4654e36 100644 --- a/buildSrc/src/main/kotlin/BuildExtensions.kt +++ b/buildSrc/src/main/kotlin/BuildExtensions.kt @@ -73,6 +73,12 @@ fun ScriptHandlerScope.standardSpineSdkRepositories() { repositories.standardToSpineSdk() } +/** + * Shortcut to [Protobuf] dependency object for using under `buildScript`. + */ +val ScriptHandlerScope.protobuf: Protobuf + get() = Protobuf + /** * Shortcut to [McJava] dependency object for using under `buildScript`. */ diff --git a/buildSrc/src/main/kotlin/DokkaExts.kt b/buildSrc/src/main/kotlin/DokkaExts.kt index b141a22..03a6e03 100644 --- a/buildSrc/src/main/kotlin/DokkaExts.kt +++ b/buildSrc/src/main/kotlin/DokkaExts.kt @@ -40,6 +40,7 @@ import org.jetbrains.dokka.gradle.AbstractDokkaTask import org.jetbrains.dokka.gradle.DokkaExtension import org.jetbrains.dokka.gradle.DokkaTask import org.jetbrains.dokka.gradle.GradleDokkaSourceSetBuilder +import org.jetbrains.dokka.gradle.engine.parameters.DokkaSourceSetSpec import org.jetbrains.dokka.gradle.engine.parameters.VisibilityModifier import org.jetbrains.dokka.gradle.engine.plugins.DokkaHtmlPluginParameters @@ -103,44 +104,82 @@ fun DokkaHtmlPluginParameters.configureStyle(project: Project) { private fun DokkaExtension.configureFor( project: Project, language: String, - sourceLinkRemoveUrl: String + sourceLinkRemoteUrl: String ) { - dokkaPublications.named("html") { + dokkaPublications.named("html").configure { suppressInheritedMembers.set(true) failOnWarning.set(true) } - dokkaSourceSets.named("main") { - val moduleDoc = "Module.md" - if (project.file(moduleDoc).exists()) { - includes.from(moduleDoc) - } + val commonMain = "commonMain" + val jvmMain = "jvmMain" - // Please see Dokka docs for more details: - // https://kotlinlang.org/docs/dokka-gradle.html#source-link-configuration - sourceLink { - localDirectory.set(project.file("src/main/${language.lowercase()}")) - remoteUrl(sourceLinkRemoveUrl) - remoteLineSuffix.set(DocumentationSettings.SourceLink.lineSuffix) - } + val commonMainDir = project.file("src/$commonMain") + val jvmMainDir = project.file("src/$jvmMain") + val isKmp = commonMainDir.exists() || jvmMainDir.exists() - // Configures links to the external Java documentation. - jdkVersion.set(BuildSettings.javaVersion.asInt()) - skipEmptyPackages.set(true) + if (isKmp) { + if (commonMainDir.exists()) { + dokkaSourceSets.named(commonMain).configure { + configureSourceSet( + SourceSetConfig(commonMainDir, sourceLinkRemoteUrl) + ) + } + } - documentedVisibilities.set( - setOf( - VisibilityModifier.Public, - VisibilityModifier.Protected + if (jvmMainDir.exists()) { + dokkaSourceSets.named(jvmMain).configure { + configureSourceSet( + SourceSetConfig(jvmMainDir, sourceLinkRemoteUrl, null) + ) + } + } + } else { + dokkaSourceSets.named("main").configure { + configureSourceSet( + SourceSetConfig( + sourceDir = project.file("src/main/${language.lowercase()}"), + sourceLinkRemoteUrl = sourceLinkRemoteUrl, + ) ) - ) + } } - pluginsConfiguration.named("html") { this as DokkaHtmlPluginParameters + pluginsConfiguration.named("html").configure { this as DokkaHtmlPluginParameters configureStyle(project) } } +private data class SourceSetConfig( + val sourceDir: File, + val sourceLinkRemoteUrl: String, + val moduleDoc: String? = "Module.md" +) + +private fun DokkaSourceSetSpec.configureSourceSet(config: SourceSetConfig) { + config.moduleDoc?.let { doc -> + if (File(doc).exists()) { + this@configureSourceSet.includes.from(doc) + } + } + + sourceLink { + localDirectory.set(config.sourceDir) + remoteUrl(config.sourceLinkRemoteUrl) + remoteLineSuffix.set(DocumentationSettings.SourceLink.lineSuffix) + } + + jdkVersion.set(BuildSettings.javaVersion.asInt()) + skipEmptyPackages.set(true) + + documentedVisibilities.set( + setOf( + VisibilityModifier.Public, + VisibilityModifier.Protected + ) + ) +} + /** * Configures this [DokkaTask] to accept only Kotlin files. */ diff --git a/buildSrc/src/main/kotlin/detekt-code-analysis.gradle.kts b/buildSrc/src/main/kotlin/detekt-code-analysis.gradle.kts index 7b0ffd1..9e231aa 100644 --- a/buildSrc/src/main/kotlin/detekt-code-analysis.gradle.kts +++ b/buildSrc/src/main/kotlin/detekt-code-analysis.gradle.kts @@ -29,7 +29,7 @@ import io.gitlab.arturbosch.detekt.Detekt /** * This script-plugin sets up Kotlin code analyzing with Detekt. * - * After applying, Detekt is configured to use `${rootDir}/config/quality/detekt-config.yml` file. + * After applying, Detekt is configured to use `${rootDir}/buildSrc/quality/detekt-config.yml` file. * Projects can append their own config files to override some parts of the default one or drop * it at all in a favor of their own one. * @@ -69,7 +69,7 @@ plugins { detekt { buildUponDefaultConfig = true - config.from(files("${rootDir}/config/quality/detekt-config.yml")) + config.from(files("${rootDir}/buildSrc/quality/detekt-config.yml")) } tasks { diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/build/Ksp.kt b/buildSrc/src/main/kotlin/io/spine/dependency/build/Ksp.kt index cb570a0..662a94e 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/build/Ksp.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/build/Ksp.kt @@ -26,19 +26,31 @@ package io.spine.dependency.build +import io.spine.dependency.Dependency + /** * Kotlin Symbol Processing API. * * @see KSP GitHub repository */ -@Suppress("ConstPropertyName", "unused") -object Ksp { - const val version = "2.1.20-2.0.0" +@Suppress("unused") +object Ksp : Dependency() { + override val version = "2.1.21-2.0.2" + override val group = "com.google.devtools.ksp" + 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" - const val gradlePlugin = "$group:symbol-processing-gradle-plugin:$version" + + val symbolProcessingApi = "$group:symbol-processing-api" + val symbolProcessing = "$group:symbol-processing" + val symbolProcessingAaEmb = "$group:symbol-processing-aa-embeddable" + val symbolProcessingCommonDeps = "$group:symbol-processing-common-deps" + val gradlePlugin = "$group:symbol-processing-gradle-plugin" + + override val modules = listOf( + symbolProcessingApi, + symbolProcessing, + symbolProcessingAaEmb, + symbolProcessingCommonDeps, + gradlePlugin, + ) } diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/kotlinx/AtomicFu.kt b/buildSrc/src/main/kotlin/io/spine/dependency/kotlinx/AtomicFu.kt new file mode 100644 index 0000000..a245bcb --- /dev/null +++ b/buildSrc/src/main/kotlin/io/spine/dependency/kotlinx/AtomicFu.kt @@ -0,0 +1,54 @@ +/* + * 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.kotlinx + +import io.spine.dependency.Dependency + +/** + * Kotlin/Multiplatform AtomicFU library. + * + * https://github.com/Kotlin/kotlinx.atomicfu + */ +object AtomicFu : Dependency() { + + override val version: String = "0.29.0" + + override val group: String = KotlinX.group + + @Suppress("ConstPropertyName") // https://bit.ly/kotlin-prop-names + const val module = "atomicfu" + + /** + * The base artifact without platform classifier. + */ + val std = "$group:$module" + + override val modules: List = listOf(std) + + /** Convenience: full coordinates with the version for the standard artifact. */ + val lib: String get() = artifact(std) +} diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/kotlinx/DateTime.kt b/buildSrc/src/main/kotlin/io/spine/dependency/kotlinx/DateTime.kt new file mode 100644 index 0000000..bb267d8 --- /dev/null +++ b/buildSrc/src/main/kotlin/io/spine/dependency/kotlinx/DateTime.kt @@ -0,0 +1,34 @@ +/* + * 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.kotlinx + +// https://github.com/Kotlin/kotlinx-datetime +@Suppress("ConstPropertyName", "unused") +object DateTime { + const val group = KotlinX.group + const val lib = "$group:kotlinx-datetime:0.7.1" +} diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/kotlinx/KotlinX.kt b/buildSrc/src/main/kotlin/io/spine/dependency/kotlinx/KotlinX.kt index fa34b0f..097b916 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/kotlinx/KotlinX.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/kotlinx/KotlinX.kt @@ -26,7 +26,7 @@ package io.spine.dependency.kotlinx -@Suppress("ConstPropertyName") // https://bit.ly/kotlin-prop-names +@Suppress("ConstPropertyName", "unused") // https://bit.ly/kotlin-prop-names object KotlinX { const val group = "org.jetbrains.kotlinx" } diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/lib/Grpc.kt b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Grpc.kt index 435d6b4..48e70f4 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/lib/Grpc.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/lib/Grpc.kt @@ -62,7 +62,6 @@ object Grpc : DependencyWithBom() { nettyShaded ) - object ProtocPlugin { const val id = "grpc" @Deprecated( diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJava.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJava.kt index ba0e7dc..27506d4 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJava.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJava.kt @@ -34,7 +34,7 @@ package io.spine.dependency.local @Suppress("ConstPropertyName", "unused") object CoreJava { const val group = Spine.group - const val version = "2.0.0-SNAPSHOT.301" + const val version = "2.0.0-SNAPSHOT.316" const val coreArtifact = "spine-core" const val clientArtifact = "spine-client" diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/Logging.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/Logging.kt index 3bb1140..989369e 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/local/Logging.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/Logging.kt @@ -33,7 +33,7 @@ package io.spine.dependency.local */ @Suppress("ConstPropertyName", "unused") object Logging { - const val version = "2.0.0-SNAPSHOT.411" + const val version = "2.0.0-SNAPSHOT.410" const val group = Spine.group const val loggingArtifact = "spine-logging" diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/McJava.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/McJava.kt index 5327ed4..6ab0a95 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/local/McJava.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/McJava.kt @@ -26,9 +26,6 @@ package io.spine.dependency.local -import io.spine.dependency.local.McJava.dogfoodingVersion -import io.spine.dependency.local.McJava.version - /** * Dependencies on Spine Model Compiler for Java. * @@ -45,12 +42,12 @@ object McJava { /** * The version used to in the build classpath. */ - const val dogfoodingVersion = "2.0.0-SNAPSHOT.310" + const val dogfoodingVersion = "2.0.0-SNAPSHOT.320" /** * The version to be used for integration tests. */ - const val version = "2.0.0-SNAPSHOT.310" + const val version = "2.0.0-SNAPSHOT.320" /** * The ID of the Gradle plugin. diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/ProtoData.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/ProtoData.kt index 813c6e4..c4f06c8 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/local/ProtoData.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/ProtoData.kt @@ -72,7 +72,7 @@ object ProtoData { * The version of ProtoData dependencies. */ val version: String - private const val fallbackVersion = "0.94.0" + private const val fallbackVersion = "0.96.4" /** * The distinct version of ProtoData used by other build tools. @@ -81,7 +81,7 @@ object ProtoData { * transitional dependencies, this is the version used to build the project itself. */ val dogfoodingVersion: String - private const val fallbackDfVersion = "0.94.0" + private const val fallbackDfVersion = "0.96.4" /** * The artifact for the ProtoData Gradle plugin. @@ -163,10 +163,10 @@ object 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. + + To reset the versions, erase the `$$VERSION_ENV` and `$$DF_VERSION_ENV` environment variables. """.trimIndent()) } else { diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/ProtoTap.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/ProtoTap.kt index c811e58..b1f3d8c 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/local/ProtoTap.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/ProtoTap.kt @@ -38,7 +38,7 @@ package io.spine.dependency.local ) object ProtoTap { const val group = "io.spine.tools" - const val version = "0.9.1" + const val version = "0.12.0" const val gradlePluginId = "io.spine.prototap" const val api = "$group:prototap-api:$version" const val gradlePlugin = "$group:prototap-gradle-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 index fbf37f1..12f58a3 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/local/Reflect.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/Reflect.kt @@ -33,7 +33,7 @@ package io.spine.dependency.local */ @Suppress("ConstPropertyName") object Reflect { - const val version = "2.0.0-SNAPSHOT.191" + const val version = "2.0.0-SNAPSHOT.200" 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/Time.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/Time.kt index 567cd45..289adee 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/local/Time.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/Time.kt @@ -33,7 +33,7 @@ package io.spine.dependency.local */ @Suppress("ConstPropertyName") object Time { - const val version = "2.0.0-SNAPSHOT.202" + const val version = "2.0.0-SNAPSHOT.203" const val group = Spine.group const val artifact = "spine-time" const val lib = "$group:$artifact:$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 index a0c8040..7d001cf 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/local/ToolBase.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/ToolBase.kt @@ -29,20 +29,27 @@ package io.spine.dependency.local /** * Artifacts of the `tool-base` module. * - * @see spine-tool-base + * @see tool-base */ @Suppress("ConstPropertyName", "unused") object ToolBase { const val group = Spine.toolsGroup - const val version = "2.0.0-SNAPSHOT.350" + const val version = "2.0.0-SNAPSHOT.341" const val lib = "$group:tool-base:$version" const val pluginBase = "$group:plugin-base:$version" - const val jvmTools = "$group:jvm-tools:$version" - const val jvmToolPlugins = "$group:jvm-tool-plugins:$version" const val pluginTestlib = "$group:plugin-testlib:$version" + const val intellijPlatform = "$group:intellij-platform:$version" const val intellijPlatformJava = "$group:intellij-platform-java:$version" - const val psiJava = "$group:spine-psi-java:$version" + const val psi = "$group:psi:$version" + const val psiJava = "$group:psi-java:$version" + + const val gradleRootPlugin = "$group:gradle-root-plugin:$version" + const val gradlePluginApi = "$group:gradle-plugin-api:$version" + const val gradlePluginApiTestFixtures = "$group:gradle-plugin-api-test-fixtures:$version" + + const val jvmTools = "$group:jvm-tools:$version" + const val jvmToolPlugins = "$group:jvm-tool-all-plugins:$version" } diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/Validation.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/Validation.kt index eddf9ba..7326ced 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/local/Validation.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/Validation.kt @@ -36,7 +36,7 @@ object Validation { /** * The version of the Validation library artifacts. */ - const val version = "2.0.0-SNAPSHOT.332" + const val version = "2.0.0-SNAPSHOT.340" const val group = "io.spine.validation" private const val prefix = "spine-validation" diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/test/JUnit.kt b/buildSrc/src/main/kotlin/io/spine/dependency/test/JUnit.kt index 813c7ff..b07849f 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/test/JUnit.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/test/JUnit.kt @@ -33,7 +33,7 @@ import io.spine.dependency.DependencyWithBom @Suppress("unused", "ConstPropertyName") object JUnit : DependencyWithBom() { - override val version = "5.12.2" + override val version = "5.13.2" override val group: String = "org.junit" /** @@ -105,7 +105,7 @@ object JUnit : DependencyWithBom() { * So when we use JUnit as a platform, this property should be picked up * for the dependencies automatically. */ - override val version: String = "1.12.2" + override val version: String = "1.13.2" override val group = "org.junit.platform" private const val infix = "junit-platform" diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/test/KotlinCompileTesting.kt b/buildSrc/src/main/kotlin/io/spine/dependency/test/KotlinCompileTesting.kt index 0e9110b..bde365a 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/test/KotlinCompileTesting.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/test/KotlinCompileTesting.kt @@ -33,7 +33,7 @@ package io.spine.dependency.test */ @Suppress("unused", "ConstPropertyName") object KotlinCompileTesting { - private const val version = "0.7.0" + private const val version = "0.7.1" 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/gradle/ConfigTester.kt b/buildSrc/src/main/kotlin/io/spine/gradle/ConfigTester.kt index 3de99c4..e5c3007 100644 --- a/buildSrc/src/main/kotlin/io/spine/gradle/ConfigTester.kt +++ b/buildSrc/src/main/kotlin/io/spine/gradle/ConfigTester.kt @@ -195,7 +195,7 @@ class GitRepository( * to the specified [destinationFolder]. * * The source code is put to the sub-folder named after the repository. - * E.g. for `https://github.com/acme-org/foobar` the code is placed under + * E.g., for `https://github.com/acme-org/foobar` the code is placed under * the `destinationFolder/foobar` folder. * * If the supplied folder does not exist, it is created. diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/Runtime.kt b/buildSrc/src/main/kotlin/io/spine/gradle/Runtime.kt index c5b5f54..fb4efaf 100644 --- a/buildSrc/src/main/kotlin/io/spine/gradle/Runtime.kt +++ b/buildSrc/src/main/kotlin/io/spine/gradle/Runtime.kt @@ -24,6 +24,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +@file:Suppress("unused") + package io.spine.gradle import java.io.File @@ -48,13 +50,14 @@ class Cli(private val workingFolder: File) { /** * Executes the given terminal command and retrieves the command output. * - *

{@link Runtime#exec(String[], String[], File) Executes} the given {@code String} array as - * a CLI command. If the execution is successful, returns the command output. Throws - * an {@link IllegalStateException} otherwise. + * [Executes][Runtime.exec] the given `String` array as a CLI command. + * + * If the execution is successful, returns the command output. + * Throws an {@link IllegalStateException} otherwise. * - * @param command the command to execute - * @return the command line output - * @throws IllegalStateException upon an execution error + * @param command the command to execute. + * @return the command line output. + * @throws IllegalStateException if the execution fails. */ fun execute(vararg command: String): String { val outWriter = StringWriter() diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/checkstyle/CheckStyleConfig.kt b/buildSrc/src/main/kotlin/io/spine/gradle/checkstyle/CheckStyleConfig.kt index 122a604..bb2a181 100644 --- a/buildSrc/src/main/kotlin/io/spine/gradle/checkstyle/CheckStyleConfig.kt +++ b/buildSrc/src/main/kotlin/io/spine/gradle/checkstyle/CheckStyleConfig.kt @@ -56,7 +56,7 @@ object CheckStyleConfig { plugin(CheckstylePlugin::class.java) } - val configDir = project.rootDir.resolve("config/quality/") + val configDir = project.rootDir.resolve("buildSrc/quality/") with(project.the()) { toolVersion = CheckStyle.version diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/java/Linters.kt b/buildSrc/src/main/kotlin/io/spine/gradle/java/Linters.kt new file mode 100644 index 0000000..fc00555 --- /dev/null +++ b/buildSrc/src/main/kotlin/io/spine/gradle/java/Linters.kt @@ -0,0 +1,61 @@ +/* + * 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.java + +import net.ltgt.gradle.errorprone.errorprone +import org.gradle.api.Project +import org.gradle.api.tasks.compile.JavaCompile +import org.gradle.kotlin.dsl.invoke +import org.gradle.kotlin.dsl.named + +/** + * Disables Java linters in this [Project]. + * + * In particular, the following linters will be disabled: + * + * 1. CheckStyle. + * 2. PMD. + * 3. ErrorProne. + * + * Apply this configuration for modules that have original Flogger sources, + * which have not been migrated to Kotlin yet. They produce a lot of + * errors/warnings failing the build. + * + * Our own sources are mostly in Kotlin (as for `spine-logging` repo), + * so this action seems quite safe. + */ +// TODO:2023-09-22:yevhenii.nadtochii: Remove this piece of configuration. +// See issue: https://github.com/SpineEventEngine/logging/issues/56 +fun Project.disableLinters() { + tasks { + named("checkstyleMain") { enabled = false } + named("pmdMain") { enabled = false } + named("compileJava") { + options.errorprone.isEnabled.set(false) + } + } +} diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/kotlin/KotlinConfig.kt b/buildSrc/src/main/kotlin/io/spine/gradle/kotlin/KotlinConfig.kt index 65cdebd..ea47967 100644 --- a/buildSrc/src/main/kotlin/io/spine/gradle/kotlin/KotlinConfig.kt +++ b/buildSrc/src/main/kotlin/io/spine/gradle/kotlin/KotlinConfig.kt @@ -27,7 +27,7 @@ package io.spine.gradle.kotlin import org.gradle.jvm.toolchain.JavaLanguageVersion -import org.jetbrains.kotlin.gradle.dsl.KotlinJvmCompilerOptions +import org.jetbrains.kotlin.gradle.dsl.KotlinCommonCompilerOptions import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension /** @@ -52,12 +52,14 @@ fun KotlinJvmProjectExtension.applyJvmToolchain(version: String) = * Opts-in to experimental features that we use in our codebase. */ @Suppress("unused") -fun KotlinJvmCompilerOptions.setFreeCompilerArgs() { +fun KotlinCommonCompilerOptions.setFreeCompilerArgs() { freeCompilerArgs.addAll( listOf( "-Xskip-prerelease-check", "-Xjvm-default=all", "-Xinline-classes", + "-Xexpect-actual-classes", + "-Xcontext-receivers", "-opt-in=" + "kotlin.contracts.ExperimentalContracts," + "kotlin.io.path.ExperimentalPathApi," + diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/publish/CheckVersionIncrement.kt b/buildSrc/src/main/kotlin/io/spine/gradle/publish/CheckVersionIncrement.kt index 56245ff..e47edae 100644 --- a/buildSrc/src/main/kotlin/io/spine/gradle/publish/CheckVersionIncrement.kt +++ b/buildSrc/src/main/kotlin/io/spine/gradle/publish/CheckVersionIncrement.kt @@ -75,9 +75,9 @@ open class CheckVersionIncrement : DefaultTask() { """ The version `$version` is already published to the Maven repository `$repoUrl`. Try incrementing the library version. - All available versions are: ${versions?.joinToString(separator = ", ")}. - - To disable this check, run Gradle with `-x $name`. + All available versions are: ${versions?.joinToString(separator = ", ")}. + + To disable this check, run Gradle with `-x $name`. """.trimIndent() ) } diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/publish/ShadowJarExts.kt b/buildSrc/src/main/kotlin/io/spine/gradle/publish/ShadowJarExts.kt new file mode 100644 index 0000000..e2e67e0 --- /dev/null +++ b/buildSrc/src/main/kotlin/io/spine/gradle/publish/ShadowJarExts.kt @@ -0,0 +1,77 @@ +/* + * 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.publish + +import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar + +/** + * Calls [ShadowJar.mergeServiceFiles] for the files we use in the Spine SDK. + */ +fun ShadowJar.handleMergingServiceFiles() { + ServiceFiles.all.forEach { + mergeServiceFiles(it) + } +} + +@Suppress("ConstPropertyName") +private object ServiceFiles { + + /** + * Files containing references to descriptor set files. + */ + private const val descriptorSetReferences = "desc.ref" + + private const val servicesDir = "META-INF/services" + /** + * Providers of custom Protobuf options introduced by the libraries. + */ + private const val optionProviders = "$servicesDir/io.spine.option.OptionsProvider" + + /** + * KSP symbol processor provider. + */ + private const val kspSymbolProcessorProviders = + "$servicesDir/com.google.devtools.ksp.KspSymbolProcessorProvider" + + /** + * Message routing setup classes generated by the Compiler for JVM. + */ + private const val routeSetupPackage = "io.spine.server.route.setup" + private const val routeSetupPrefix = "$servicesDir/$routeSetupPackage" + private const val commandRoutingSetupClasses = "$routeSetupPrefix.CommandRoutingSetup" + private const val eventRoutingSetupClasses = "$routeSetupPrefix.EventRoutingSetup" + private const val stateRoutingSetupClasses = "$routeSetupPrefix.StateRoutingSetup" + + val all = arrayOf( + descriptorSetReferences, + optionProviders, + kspSymbolProcessorProviders, + commandRoutingSetupClasses, + eventRoutingSetupClasses, + stateRoutingSetupClasses + ) +} diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/report/license/ModuleDataExtensions.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/license/ModuleDataExtensions.kt index 0aca30f..91247e2 100644 --- a/buildSrc/src/main/kotlin/io/spine/gradle/report/license/ModuleDataExtensions.kt +++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/license/ModuleDataExtensions.kt @@ -91,7 +91,6 @@ private fun MarkdownDocument.print( return this } - /** * Prints the URL to the project which provides the dependency. * diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/report/license/Template.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/license/Template.kt index adda37b..15bd24d 100644 --- a/buildSrc/src/main/kotlin/io/spine/gradle/report/license/Template.kt +++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/license/Template.kt @@ -28,7 +28,7 @@ package io.spine.gradle.report.license import io.spine.docs.MarkdownDocument import io.spine.gradle.artifactId -import java.util.* +import java.util.Date import org.gradle.api.Project /** @@ -40,32 +40,33 @@ internal class Template( ) { private companion object { + @Suppress("ConstPropertyName") private const val longBreak = "\n\n" } - internal fun writeHeader() { + internal fun writeHeader() = with(project) { out.nl() - .h1( - "Dependencies of " + - "`${project.group}:${project.artifactId}:${project.version}`" - ) - .nl() + .h1("Dependencies of `$group:$artifactId:$version`") + .nl() } internal fun writeFooter() { + val currentTime = Date() out.text(longBreak) .text("The dependencies distributed under several licenses, ") .text("are used according their commercial-use-friendly license.") .text(longBreak) .text("This report was generated on ") - .bold("${Date()}") + .bold("$currentTime") .text(" using ") + .nl() .link( "Gradle-License-Report plugin", "https://github.com/jk1/Gradle-License-Report" ) .text(" by Evgeny Naumenko, ") .text("licensed under ") + .nl() .link( "Apache 2.0 License", "https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE" diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/PomFormatting.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/PomFormatting.kt index ba673bb..a29d0a4 100644 --- a/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/PomFormatting.kt +++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/PomFormatting.kt @@ -92,7 +92,7 @@ internal object PomFormatting { * Writes the specified lines using the specified [destination], dividing them * by platform-specific line separator. * - * The written lines are also padded with platform's line separator from both sides + * The written lines are also padded with the platform's line separator from both sides. */ internal fun writeBlocks(destination: StringWriter, vararg lines: String) { lines.iterator().forEach { diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/PomGenerator.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/PomGenerator.kt index 9a40725..e26c738 100644 --- a/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/PomGenerator.kt +++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/PomGenerator.kt @@ -57,7 +57,8 @@ import org.gradle.api.plugins.BasePlugin * * By default, those values are taken from the `project` object, which may or may not include * them. If the project does not have these values, and they are not specified in the `ext` - * block, the resulting `pom.xml` file is going to contain empty blocks, e.g. ``. + * block, the resulting `pom.xml` file is going to contain empty blocks, + * e.g., ``. */ @Suppress("unused") object PomGenerator { @@ -68,7 +69,7 @@ object PomGenerator { fun applyTo(project: Project) { /** - * In some cases, the `base` plugin, which by default is added by e.g. `java`, + * In some cases, the `base` plugin, which by default is added by e.g., `java`, * is not yet added. * * The `base` plugin defines the `build` task. diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/PomXmlWriter.kt b/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/PomXmlWriter.kt index 5312219..a0b1ade 100644 --- a/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/PomXmlWriter.kt +++ b/buildSrc/src/main/kotlin/io/spine/gradle/report/pom/PomXmlWriter.kt @@ -35,9 +35,9 @@ import java.io.StringWriter /** * Writes the dependencies of a Gradle project and its subprojects as a `pom.xml` file. * - * The resulting file is not usable for `maven` build tasks, but serves rather as a description - * of the first-level dependencies for each project/subproject. Their transitive dependencies - * are not included into the result. + * The resulting file is not usable for `maven` build tasks but serves as a description + * of the first-level dependencies for each project or subproject. + * Their transitive dependencies are not included in the result. */ internal class PomXmlWriter internal constructor( @@ -51,12 +51,10 @@ internal constructor( *

If a file with the specified location exists, its contents will be substituted * with a new `pom.xml`. * - * @param file a file to write `pom.xml` contents to + * @param file a file to write `pom.xml` contents to. */ fun writeTo(file: File) { - val fileWriter = FileWriter(file) val out = StringWriter() - writeStart(out) writeBlocks( out, @@ -67,8 +65,9 @@ internal constructor( ) PomFormatting.writeEnd(out) - fileWriter.write(out.toString()) - fileWriter.close() + FileWriter(file).use { + it.write(out.toString()) + } } /** @@ -83,4 +82,3 @@ internal constructor( return destination.toString() } } - diff --git a/buildSrc/src/main/kotlin/jvm-module.gradle.kts b/buildSrc/src/main/kotlin/jvm-module.gradle.kts index b1587a7..b3d6ef0 100644 --- a/buildSrc/src/main/kotlin/jvm-module.gradle.kts +++ b/buildSrc/src/main/kotlin/jvm-module.gradle.kts @@ -24,7 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -import BuildSettings.javaVersion +import io.spine.dependency.boms.BomsPlugin import io.spine.dependency.build.CheckerFramework import io.spine.dependency.build.Dokka import io.spine.dependency.build.ErrorProne @@ -38,7 +38,6 @@ 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 @@ -50,18 +49,19 @@ plugins { id("dokka-for-java") kotlin("jvm") id("io.kotest") - id("org.jetbrains.kotlinx.kover") id("detekt-code-analysis") id("dokka-for-kotlin") + id("org.jetbrains.kotlinx.kover") + id("module-testing") } - +apply() LicenseReporter.generateReportIn(project) JavadocConfig.applyTo(project) CheckStyleConfig.applyTo(project) project.run { - configureJava(javaVersion) - configureKotlin(javaVersion) + configureJava() + configureKotlin() addDependencies() forceConfigurations() @@ -73,9 +73,10 @@ project.run { typealias Module = Project -fun Module.configureJava(javaVersion: JavaLanguageVersion) { +fun Module.configureJava() { java { - toolchain.languageVersion.set(javaVersion) + sourceCompatibility = BuildSettings.javaVersionCompat + targetCompatibility = BuildSettings.javaVersionCompat } tasks { @@ -86,9 +87,8 @@ fun Module.configureJava(javaVersion: JavaLanguageVersion) { } } -fun Module.configureKotlin(javaVersion: JavaLanguageVersion) { +fun Module.configureKotlin() { kotlin { - applyJvmToolchain(javaVersion.asInt()) explicitApi() compilerOptions { jvmTarget.set(BuildSettings.jvmTarget) @@ -96,13 +96,6 @@ fun Module.configureKotlin(javaVersion: JavaLanguageVersion) { } } - // See: - // https://github.com/Kotlin/kotlinx-kover?tab=readme-ov-file#to-create-report-combining-coverage-info-from-different-gradle-projects - // https://github.com/Kotlin/kotlinx-kover/blob/main/kover-gradle-plugin/examples/jvm/merged/build.gradle.kts - rootProject.dependencies { - kover(this@configureKotlin) - } - kover { useJacoco(version = Jacoco.version) reports { diff --git a/buildSrc/src/main/kotlin/kmp-module.gradle.kts b/buildSrc/src/main/kotlin/kmp-module.gradle.kts new file mode 100644 index 0000000..b23dc02 --- /dev/null +++ b/buildSrc/src/main/kotlin/kmp-module.gradle.kts @@ -0,0 +1,189 @@ +/* + * 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. + */ + +import io.spine.dependency.boms.BomsPlugin +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.javac.configureJavac +import io.spine.gradle.kotlin.setFreeCompilerArgs +import io.spine.gradle.publish.IncrementGuard +import io.spine.gradle.report.license.LicenseReporter + +/** + * Configures this [Project] as a Kotlin Multiplatform module. + * + * By its nature, this script plugin is similar to `jvm-module`. It performs + * the basic module configuration. + * + * `jvm-module` is based on a mix of Java and Kotlin Gradle plugins. It allows + * usage of Kotlin and Java in a single module that is built for JVM. + * Whereas `kmp-module` is based on a Kotlin Multiplatform plugin. This plugin + * supports different compilation targets within a single module: JVM, IOS, + * Desktop, JS, etc. Also, it allows having some common sources in Kotlin + * that can be shared with target-specific code. They are located in + * `commonMain` and `commonTest` source sets. Each concrete target implicitly + * depends on them. + * + * As for now, this script configures only JVM target, but other targets + * will be added further. + * + * ### JVM target + * + * Sources for this target are placed in `jvmMain` and `jvmTest` directories. + * Java is allowed to be used in `jvm` sources, but Kotlin is a preference. + * Use Java only as a fall-back option where Kotlin is insufficient. + * Due to this, Java linters are not even configured by `kmp-module`. + * + * @see Kotlin Multiplatform docs + */ +@Suppress("unused") +val about = "" + +plugins { + kotlin("multiplatform") + id("detekt-code-analysis") + id("io.kotest.multiplatform") + id("org.jetbrains.kotlinx.kover") + `project-report` +} +apply() +apply() + +project.forceConfigurations() + +fun Project.forceConfigurations() { + with(configurations) { + forceVersions() + all { + resolutionStrategy { + force( + Reflect.lib + ) + } + } + } +} + +/** + * Configures Kotlin Multiplatform plugin. + * + * Please note, this extension DOES NOT configure Kotlin for JVM. + * It configures KMP, in which Kotlin for JVM is only one of + * possible targets. + */ +@Suppress("UNUSED_VARIABLE") // Avoid warnings for source set vars. +kotlin { + // Enables explicit API mode for any Kotlin sources within the module. + explicitApi() + + compilerOptions { + setFreeCompilerArgs() + } + + // Enables and configures JVM target. + jvm { + compilerOptions { + jvmTarget.set(BuildSettings.jvmTarget) + } + } + + // Dependencies are specified per-target. + // Please note, common sources are implicitly available in all targets. + @Suppress("unused") // source set `val`s are used implicitly. + sourceSets { + val commonTest by getting { + dependencies { + implementation(kotlin("test-common")) + implementation(kotlin("test-annotations-common")) + implementation(Kotest.assertions) + implementation(Kotest.frameworkEngine) + implementation(Kotest.datatest) + } + } + val jvmTest by getting { + dependencies { + implementation(dependencies.enforcedPlatform(JUnit.bom)) + implementation(TestLib.lib) + implementation(JUnit.Jupiter.engine) + implementation(Kotest.runnerJUnit5Jvm) + } + } + } +} + +java { + sourceCompatibility = BuildSettings.javaVersionCompat + targetCompatibility = BuildSettings.javaVersionCompat +} + + +/** + * Performs the standard task's configuration. + * + * Here's no difference with `jvm-module`, which does the same. + * + * Kotlin here is configured for both common and JVM-specific sources. + * Java is for JVM only. + * + * Also, Kotlin and Java share the same test executor (JUnit), so tests + * configuration is for both. + */ +tasks { + withType().configureEach { + configureJavac() + } +} + +/** + * Overrides the default location of Kotlin sources. + * + * The default configuration of Detekt assumes presence of Kotlin sources + * in `src/main/kotlin`, which is not the case for KMP. + */ +detekt { + source.setFrom( + "src/commonMain", + "src/jvmMain" + ) +} + +kover { + useJacoco(version = Jacoco.version) + reports { + total { + xml { + onCheck = true + } + } + } +} + +LicenseReporter.generateReportIn(project) +CheckStyleConfig.applyTo(project) diff --git a/buildSrc/src/main/kotlin/kmp-publish.gradle.kts b/buildSrc/src/main/kotlin/kmp-publish.gradle.kts new file mode 100644 index 0000000..53b0a21 --- /dev/null +++ b/buildSrc/src/main/kotlin/kmp-publish.gradle.kts @@ -0,0 +1,75 @@ +/* + * 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. + */ + +import org.gradle.api.publish.maven.MavenPublication +import org.gradle.kotlin.dsl.`maven-publish` +import org.gradle.kotlin.dsl.named + +/** + * Configures publications for `kmp-module`. + * + * As for now, [spinePublishing][io.spine.gradle.publish.spinePublishing] + * doesn't support Kotlin Multiplatform modules. So, their publications are + * configured by this script plugin. Other publishing-related configuration + * is still performed by the extension. + * + * To publish a KMP module, one still needs to open and configure + * `spinePublishing` extension. Make sure `spinePublishing.customPublishing` + * property is set to `true`, and this script plugin is applied. + * + * For example: + * + * ``` + * plugins { + * `kmp-module` + * `kmp-publish` + * } + * + * spinePublishing { + * destinations = setOf(...) + * customPublishing = true + * } + * ``` + */ +@Suppress("unused") +val about = "" + +plugins { + `maven-publish` + id("dokka-for-kotlin") +} + +publishing.publications { + named("kotlinMultiplatform") { + // Although, the "common artifact" can't be used independently + // of target artifacts, it is published with documentation. + artifact(project.dokkaKotlinJar()) + } + named("jvm") { + // Includes Kotlin (JVM + common) and Java documentation. + artifact(project.dokkaKotlinJar()) + } +} diff --git a/buildSrc/src/main/kotlin/pmd-settings.gradle.kts b/buildSrc/src/main/kotlin/pmd-settings.gradle.kts index 0373ee0..938a764 100644 --- a/buildSrc/src/main/kotlin/pmd-settings.gradle.kts +++ b/buildSrc/src/main/kotlin/pmd-settings.gradle.kts @@ -42,7 +42,7 @@ pmd { ruleSets = listOf() // Load PMD settings. - val pmdSettings = file("$rootDir/config/quality/pmd.xml") + val pmdSettings = file("$rootDir/buildSrc/quality/pmd.xml") val textResource: TextResource = resources.text.fromFile(pmdSettings) ruleSetConfig = textResource diff --git a/buildSrc/src/main/kotlin/uber-jar-module.gradle.kts b/buildSrc/src/main/kotlin/uber-jar-module.gradle.kts new file mode 100644 index 0000000..29dba3c --- /dev/null +++ b/buildSrc/src/main/kotlin/uber-jar-module.gradle.kts @@ -0,0 +1,202 @@ +/* + * 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("UnstableApiUsage") // `configurations` block. + +import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar +import io.spine.gradle.publish.IncrementGuard +import io.spine.gradle.publish.SpinePublishing +import io.spine.gradle.publish.spinePublishing +import io.spine.gradle.report.license.LicenseReporter + +plugins { + `java-library` + `maven-publish` + id("com.gradleup.shadow") + id("write-manifest") + `project-report` + idea +} +apply() +LicenseReporter.generateReportIn(project) + +spinePublishing { + artifactPrefix = "" + destinations = rootProject.the().destinations + customPublishing = true +} + +/** The ID of the far JAR artifact. */ +private val projectArtifact = project.name.replace(":", "") + +publishing { + val groupName = project.group.toString() + val versionName = project.version.toString() + + publications { + create("fatJar", MavenPublication::class) { + groupId = groupName + artifactId = projectArtifact + version = versionName + artifact(tasks.shadowJar) + } + } +} + +/** + * Declare dependency explicitly to address the Gradle error. + */ +@Suppress("unused") +val publishFatJarPublicationToMavenLocal: Task by tasks.getting { + dependsOn(tasks.shadowJar) +} + +// Disable the `jar` task to free up the name of the resulting archive. +tasks.jar { + enabled = false +} + +tasks.publish { + dependsOn(tasks.shadowJar) +} + +tasks.shadowJar { + excludeFiles() + setZip64(true) /* The archive has way too many items. So using the Zip64 mode. */ + archiveClassifier.set("") /** To prevent Gradle setting something like `osx-x86_64`. */ +} + +/** + * Exclude unwanted directories. + */ +@Suppress("LongMethod") +private fun ShadowJar.excludeFiles() { + exclude( + /* + Exclude IntelliJ Platform images and other resources associated with IntelliJ UI. + We do not call the UI, so they won't be used. + */ + "actions/**", + "chooser/**", + "codeStyle/**", + "codeStylePreview/**", + "codeWithMe/**", + "darcula/**", + "debugger/**", + "diff/**", + "duplicates/**", + "expui/**", + "extensions/**", + "fileTemplates/**", + "fileTypes/**", + "general/**", + "graph/**", + "gutter/**", + "hierarchy/**", + "icons/**", + "ide/**", + "idea/**", + "inlayProviders/**", + "inspectionDescriptions/**", + "inspectionReport/**", + "intentionDescriptions/**", + "javadoc/**", + "javaee/**", + "json/**", + "liveTemplates/**", + "mac/**", + "modules/**", + "nodes/**", + "objectBrowser/**", + "plugins/**", + "postfixTemplates/**", + "preferences/**", + "process/**", + "providers/**", + "runConfigurations/**", + "scope/**", + "search/**", + "toolbar/**", + "toolbarDecorator/**", + "toolwindows/**", + "vcs/**", + "webreferences/**", + "welcome/**", + "windows/**", + "xml/**", + + /* + Exclude `https://github.com/JetBrains/pty4j`. + We don't need the terminal. + */ + "resources/com/pti4j/**", + + /* Exclude the IntelliJ fork of + `http://www.sparetimelabs.com/purejavacomm/purejavacomm.php`. + It is the part of the IDEA's terminal implementation. + */ + "purejavacomm/**", + + /* Exclude IDEA project templates. */ + "resources/projectTemplates/**", + + /* + Exclude dynamic libraries. Should the tool users need them, + they would add them explicitly. + */ + "bin/**", + + /* + Exclude Google Protobuf definitions to avoid duplicates. + */ + "google/**", + "src/google/**", + + /** + * Exclude Spine Protobuf definitions to avoid duplications. + */ + "spine/**", + + /** + * Exclude Kotlin runtime because it will be provided. + */ + "kotlin/**", + "kotlinx/**", + + /** + * Exclude native libraries related to debugging. + */ + "win32-x86/**", + "win32-x86-64/**", + + /** + * Exclude the Windows process management (WinP) libraries. + * See: `https://github.com/jenkinsci/winp`. + */ + "winp.dll", + "winp.x64.dll", + ) +} diff --git a/buildSrc/src/main/resources/dokka/styles/custom-styles.css b/buildSrc/src/main/resources/dokka/styles/custom-styles.css index 8c442fe..ca629f9 100644 --- a/buildSrc/src/main/resources/dokka/styles/custom-styles.css +++ b/buildSrc/src/main/resources/dokka/styles/custom-styles.css @@ -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 diff --git a/config b/config index 2f5df41..b5018d3 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit 2f5df41794137014e87ee8fd4b8b1f2d4fbbdeaa +Subproject commit b5018d34de546b6adc69cfd77f5bb45828926c9e diff --git a/gradle.properties b/gradle.properties index 7f9174c..93bcb69 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,9 +1,23 @@ +# Allow Gradle to auto-detect installed JDKs. +org.gradle.java.installations.auto-detect=true + +# Optional: Allow Gradle to download JDKs if needed. +org.gradle.java.installations.auto-download=true + +# Use parallel builds for better performance. +org.gradle.parallel=true +#org.gradle.caching=true + # Dokka plugin eats more memory than usual. Therefore, all builds should have enough. -org.gradle.jvmargs=-Xmx8g -Xms256m -XX:MaxMetaspaceSize=1512m -XX:+UseParallelGC +org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=1024m -XX:+UseParallelGC -org.gradle.daemon=false -org.gradle.parallel=false -org.gradle.workers.max=1 +# suppress inspection "UnusedProperty" +# The below property enables generation of XML reports for tests. +# If this flag is false, it causes `KotlinTestReport` task to replace these reports with one +# consolidated HTML report. +# See: https://github.com/JetBrains/kotlin/blob/9fd05632f0d7f074b6544527e73eb0fbb2fb1ef2/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/testing/internal/KotlinTestReport.kt#L20 +# See: https://youtrack.jetbrains.com/issue/KT-32608 +kotlin.tests.individualTaskReports=true # Enables the Dokka migration mode from v1 to v2. # For details please see: From a6147278ed2241f8b249bc3d2acbddca77955b70 Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Thu, 18 Sep 2025 14:50:09 +0100 Subject: [PATCH 02/14] Update dependency objects --- buildSrc/src/main/kotlin/io/spine/dependency/local/Base.kt | 6 +++--- .../src/main/kotlin/io/spine/dependency/local/BaseTypes.kt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/local/Base.kt b/buildSrc/src/main/kotlin/io/spine/dependency/local/Base.kt index 09dbf6d..e8e51f2 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/local/Base.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/Base.kt @@ -31,14 +31,14 @@ package io.spine.dependency.local * * @see spine-base */ -@Suppress("ConstPropertyName") +@Suppress("ConstPropertyName", "unused") object Base { const val version = "2.0.0-SNAPSHOT.360" const val versionForBuildScript = "2.0.0-SNAPSHOT.360" const val group = Spine.group const val artifact = "spine-base" const val lib = "$group:$artifact:$version" - const val annotations = "$group:base-annotations:$version" - const val format = "$group:base-format:$version" + const val annotations = "$group:spine-annotations:$version" + const val format = "$group:spine-format:$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 index adaaa79..b0b534d 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/local/BaseTypes.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/local/BaseTypes.kt @@ -33,7 +33,7 @@ package io.spine.dependency.local */ @Suppress("ConstPropertyName") object BaseTypes { - const val version = "2.0.0-SNAPSHOT.200" + const val version = "2.0.0-SNAPSHOT.210" const val group = Spine.group const val artifact = "spine-base-types" const val lib = "$group:$artifact:$version" From bc4b2f3324d65f4df05141b05f5560fa0bc91d35 Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Thu, 18 Sep 2025 14:50:17 +0100 Subject: [PATCH 03/14] Update `config` --- .gitignore | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.gitignore b/.gitignore index df543ce..48de9f2 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,9 @@ # # Therefore, instructions below are superset of instructions required for all the projects. +# Temporary output of AI agents. +.output + # `jenv` local configuration. .java-version @@ -55,12 +58,18 @@ !.idea/codeStyles/ !.idea/copyright/ +# Ignore IDEA config files under `tests` +/tests/.idea/** + # Gradle interim configs **/.gradle/** # Temp directory for Gradle TestKit runners **/.gradle-test-kit/** +# Integration test log files +/tests/_out/** + # Generated source code **/generated/** **/*.pb.dart @@ -68,6 +77,9 @@ **/*.pbserver.dart **/*.pbjson.dart +# Generated source code with custom path under `tests` +/tests/**/proto-gen/** + # Gradle build files **/build/** !**/src/**/build/** From 85fc84cfe8400fb92dfed5b45eb03bdb13ded943 Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Thu, 18 Sep 2025 14:50:23 +0100 Subject: [PATCH 04/14] Update build time --- dependencies.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dependencies.md b/dependencies.md index bf9506b..8a0581a 100644 --- a/dependencies.md +++ b/dependencies.md @@ -743,7 +743,7 @@ The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Sep 18 13:00:27 WEST 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). +This report was generated on **Thu Sep 18 14:43:08 WEST 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). @@ -1619,7 +1619,7 @@ This report was generated on **Thu Sep 18 13:00:27 WEST 2025** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Sep 18 13:00:27 WEST 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). +This report was generated on **Thu Sep 18 14:43:11 WEST 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). @@ -2367,4 +2367,4 @@ This report was generated on **Thu Sep 18 13:00:27 WEST 2025** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Sep 18 13:00:28 WEST 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). \ No newline at end of file +This report was generated on **Thu Sep 18 14:43:11 WEST 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). \ No newline at end of file From 76cbb8f86d75ce9a8d323c0eb9fdd86cf6e20374 Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Thu, 18 Sep 2025 14:50:31 +0100 Subject: [PATCH 05/14] Add trailing new line --- .idea/kotlinc.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml index c515672..740d6a9 100644 --- a/.idea/kotlinc.xml +++ b/.idea/kotlinc.xml @@ -6,4 +6,4 @@ - \ No newline at end of file + From 75765f4db537e2650f1a53336c1c398b382ae97a Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Thu, 18 Sep 2025 14:50:58 +0100 Subject: [PATCH 06/14] Bump version -> `0.13.0` --- version.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.gradle.kts b/version.gradle.kts index 46def04..ff12ac0 100644 --- a/version.gradle.kts +++ b/version.gradle.kts @@ -24,4 +24,4 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -val versionToPublish: String by extra("0.12.0") +val versionToPublish: String by extra("0.13.0") From 3d61e7cd3311a9c9bfe14e4ceb5df99b97fa01ec Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Thu, 18 Sep 2025 15:37:52 +0100 Subject: [PATCH 07/14] Migrate to new Shadow plugin --- gradle-plugin/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle-plugin/build.gradle.kts b/gradle-plugin/build.gradle.kts index d27ffe5..407add7 100644 --- a/gradle-plugin/build.gradle.kts +++ b/gradle-plugin/build.gradle.kts @@ -40,7 +40,7 @@ plugins { `version-to-resources` `write-manifest` id("com.gradle.plugin-publish") version "1.2.1" - id("com.github.johnrengelman.shadow") + id("com.gradleup.shadow") } forceConfigurations() From 5b877dbe3bbed8bc241e96bfa053b9fe6b50ecaa Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Thu, 18 Sep 2025 15:38:03 +0100 Subject: [PATCH 08/14] Update dependency reports --- dependencies.md | 154 ++++++++++++++++++------------------------------ pom.xml | 18 +++--- 2 files changed, 65 insertions(+), 107 deletions(-) diff --git a/dependencies.md b/dependencies.md index 8a0581a..27210c8 100644 --- a/dependencies.md +++ b/dependencies.md @@ -1,6 +1,6 @@ -# Dependencies of `io.spine.tools:prototap-api:0.12.0` +# Dependencies of `io.spine.tools:prototap-api:0.13.0` ## Runtime 1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2. @@ -58,14 +58,6 @@ * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk7. **Version** : 2.1.21. - * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) - * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) - -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk8. **Version** : 2.1.21. - * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) - * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) - 1. **Group** : org.jetbrains.kotlinx. **Name** : atomicfu. **Version** : 0.29.0. * **Project URL:** [https://github.com/Kotlin/kotlinx.atomicfu](https://github.com/Kotlin/kotlinx.atomicfu) * **License:** [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) @@ -576,18 +568,10 @@ * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk7. **Version** : 2.1.21. - * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) - * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) - 1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk8. **Version** : 2.0.21. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk8. **Version** : 2.1.21. - * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) - * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) - 1. **Group** : org.jetbrains.kotlinx. **Name** : atomicfu. **Version** : 0.23.1. * **Project URL:** [https://github.com/Kotlin/kotlinx.atomicfu](https://github.com/Kotlin/kotlinx.atomicfu) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) @@ -660,36 +644,36 @@ * **Project URL:** [http://jspecify.org/](http://jspecify.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.junit. **Name** : junit-bom. **Version** : 5.12.2. - * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) +1. **Group** : org.junit. **Name** : junit-bom. **Version** : 5.13.2. + * **Project URL:** [https://junit.org/](https://junit.org/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) 1. **Group** : org.junit-pioneer. **Name** : junit-pioneer. **Version** : 2.3.0. * **Project URL:** [https://junit-pioneer.org/](https://junit-pioneer.org/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-api. **Version** : 5.12.2. - * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) +1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-api. **Version** : 5.13.2. + * **Project URL:** [https://junit.org/](https://junit.org/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-engine. **Version** : 5.12.2. - * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) +1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-engine. **Version** : 5.13.2. + * **Project URL:** [https://junit.org/](https://junit.org/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-params. **Version** : 5.12.2. - * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) +1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-params. **Version** : 5.13.2. + * **Project URL:** [https://junit.org/](https://junit.org/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.platform. **Name** : junit-platform-commons. **Version** : 1.12.2. - * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) +1. **Group** : org.junit.platform. **Name** : junit-platform-commons. **Version** : 1.13.2. + * **Project URL:** [https://junit.org/](https://junit.org/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.platform. **Name** : junit-platform-engine. **Version** : 1.12.2. - * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) +1. **Group** : org.junit.platform. **Name** : junit-platform-engine. **Version** : 1.13.2. + * **Project URL:** [https://junit.org/](https://junit.org/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.platform. **Name** : junit-platform-launcher. **Version** : 1.12.2. - * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) +1. **Group** : org.junit.platform. **Name** : junit-platform-launcher. **Version** : 1.13.2. + * **Project URL:** [https://junit.org/](https://junit.org/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) 1. **Group** : org.opentest4j. **Name** : opentest4j. **Version** : 1.3.0. @@ -743,12 +727,14 @@ The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Sep 18 14:43:08 WEST 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). +This report was generated on **Thu Sep 18 15:36:54 WEST 2025** using +[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under +[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:prototap-gradle-plugin:0.12.0` +# Dependencies of `io.spine.tools:prototap-gradle-plugin:0.13.0` ## Runtime 1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2. @@ -838,14 +824,6 @@ This report was generated on **Thu Sep 18 14:43:08 WEST 2025** using [Gradle-Lic * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk7. **Version** : 2.1.21. - * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) - * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) - -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk8. **Version** : 2.1.21. - * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) - * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) - 1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-tooling-core. **Version** : 2.1.21. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -1432,18 +1410,10 @@ This report was generated on **Thu Sep 18 14:43:08 WEST 2025** using [Gradle-Lic * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk7. **Version** : 2.1.21. - * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) - * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) - 1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk8. **Version** : 2.0.21. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk8. **Version** : 2.1.21. - * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) - * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) - 1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-tooling-core. **Version** : 2.1.21. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -1532,40 +1502,40 @@ This report was generated on **Thu Sep 18 14:43:08 WEST 2025** using [Gradle-Lic * **Project URL:** [http://jspecify.org/](http://jspecify.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.junit. **Name** : junit-bom. **Version** : 5.12.2. - * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) +1. **Group** : org.junit. **Name** : junit-bom. **Version** : 5.13.2. + * **Project URL:** [https://junit.org/](https://junit.org/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) 1. **Group** : org.junit-pioneer. **Name** : junit-pioneer. **Version** : 2.3.0. * **Project URL:** [https://junit-pioneer.org/](https://junit-pioneer.org/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.jupiter. **Name** : junit-jupiter. **Version** : 5.12.2. - * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) +1. **Group** : org.junit.jupiter. **Name** : junit-jupiter. **Version** : 5.13.2. + * **Project URL:** [https://junit.org/](https://junit.org/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-api. **Version** : 5.12.2. - * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) +1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-api. **Version** : 5.13.2. + * **Project URL:** [https://junit.org/](https://junit.org/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-engine. **Version** : 5.12.2. - * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) +1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-engine. **Version** : 5.13.2. + * **Project URL:** [https://junit.org/](https://junit.org/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-params. **Version** : 5.12.2. - * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) +1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-params. **Version** : 5.13.2. + * **Project URL:** [https://junit.org/](https://junit.org/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.platform. **Name** : junit-platform-commons. **Version** : 1.12.2. - * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) +1. **Group** : org.junit.platform. **Name** : junit-platform-commons. **Version** : 1.13.2. + * **Project URL:** [https://junit.org/](https://junit.org/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.platform. **Name** : junit-platform-engine. **Version** : 1.12.2. - * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) +1. **Group** : org.junit.platform. **Name** : junit-platform-engine. **Version** : 1.13.2. + * **Project URL:** [https://junit.org/](https://junit.org/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.platform. **Name** : junit-platform-launcher. **Version** : 1.12.2. - * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) +1. **Group** : org.junit.platform. **Name** : junit-platform-launcher. **Version** : 1.13.2. + * **Project URL:** [https://junit.org/](https://junit.org/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) 1. **Group** : org.opentest4j. **Name** : opentest4j. **Version** : 1.3.0. @@ -1619,12 +1589,14 @@ This report was generated on **Thu Sep 18 14:43:08 WEST 2025** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Sep 18 14:43:11 WEST 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). +This report was generated on **Thu Sep 18 15:36:54 WEST 2025** using +[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under +[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). -# Dependencies of `io.spine.tools:prototap-protoc-plugin:0.12.0` +# Dependencies of `io.spine.tools:prototap-protoc-plugin:0.13.0` ## Runtime 1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2. @@ -1682,14 +1654,6 @@ This report was generated on **Thu Sep 18 14:43:11 WEST 2025** using [Gradle-Lic * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk7. **Version** : 2.1.21. - * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) - * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) - -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk8. **Version** : 2.1.21. - * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) - * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) - 1. **Group** : org.jetbrains.kotlinx. **Name** : atomicfu. **Version** : 0.29.0. * **Project URL:** [https://github.com/Kotlin/kotlinx.atomicfu](https://github.com/Kotlin/kotlinx.atomicfu) * **License:** [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) @@ -2200,18 +2164,10 @@ This report was generated on **Thu Sep 18 14:43:11 WEST 2025** using [Gradle-Lic * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk7. **Version** : 2.1.21. - * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) - * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) - 1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk8. **Version** : 2.0.21. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk8. **Version** : 2.1.21. - * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) - * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) - 1. **Group** : org.jetbrains.kotlinx. **Name** : atomicfu. **Version** : 0.23.1. * **Project URL:** [https://github.com/Kotlin/kotlinx.atomicfu](https://github.com/Kotlin/kotlinx.atomicfu) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) @@ -2284,36 +2240,36 @@ This report was generated on **Thu Sep 18 14:43:11 WEST 2025** using [Gradle-Lic * **Project URL:** [http://jspecify.org/](http://jspecify.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.junit. **Name** : junit-bom. **Version** : 5.12.2. - * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) +1. **Group** : org.junit. **Name** : junit-bom. **Version** : 5.13.2. + * **Project URL:** [https://junit.org/](https://junit.org/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) 1. **Group** : org.junit-pioneer. **Name** : junit-pioneer. **Version** : 2.3.0. * **Project URL:** [https://junit-pioneer.org/](https://junit-pioneer.org/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-api. **Version** : 5.12.2. - * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) +1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-api. **Version** : 5.13.2. + * **Project URL:** [https://junit.org/](https://junit.org/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-engine. **Version** : 5.12.2. - * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) +1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-engine. **Version** : 5.13.2. + * **Project URL:** [https://junit.org/](https://junit.org/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-params. **Version** : 5.12.2. - * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) +1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-params. **Version** : 5.13.2. + * **Project URL:** [https://junit.org/](https://junit.org/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.platform. **Name** : junit-platform-commons. **Version** : 1.12.2. - * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) +1. **Group** : org.junit.platform. **Name** : junit-platform-commons. **Version** : 1.13.2. + * **Project URL:** [https://junit.org/](https://junit.org/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.platform. **Name** : junit-platform-engine. **Version** : 1.12.2. - * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) +1. **Group** : org.junit.platform. **Name** : junit-platform-engine. **Version** : 1.13.2. + * **Project URL:** [https://junit.org/](https://junit.org/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.platform. **Name** : junit-platform-launcher. **Version** : 1.12.2. - * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) +1. **Group** : org.junit.platform. **Name** : junit-platform-launcher. **Version** : 1.13.2. + * **Project URL:** [https://junit.org/](https://junit.org/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) 1. **Group** : org.opentest4j. **Name** : opentest4j. **Version** : 1.3.0. @@ -2367,4 +2323,6 @@ This report was generated on **Thu Sep 18 14:43:11 WEST 2025** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Sep 18 14:43:11 WEST 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). \ No newline at end of file +This report was generated on **Thu Sep 18 15:36:54 WEST 2025** using +[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under +[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). \ No newline at end of file diff --git a/pom.xml b/pom.xml index bfd1d3d..45ecc7a 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ all modules and does not describe the project structure per-subproject. --> io.spine.tools ProtoTap -0.12.0 +0.13.0 2015 @@ -38,13 +38,13 @@ all modules and does not describe the project structure per-subproject. io.spine.tools jvm-tools - 2.0.0-SNAPSHOT.350 + 2.0.0-SNAPSHOT.341 compile io.spine.tools plugin-base - 2.0.0-SNAPSHOT.350 + 2.0.0-SNAPSHOT.341 compile @@ -92,7 +92,7 @@ all modules and does not describe the project structure per-subproject. io.spine.tools plugin-testlib - 2.0.0-SNAPSHOT.350 + 2.0.0-SNAPSHOT.341 test @@ -110,7 +110,7 @@ all modules and does not describe the project structure per-subproject. org.junit junit-bom - 5.12.2 + 5.13.2 test @@ -122,25 +122,25 @@ all modules and does not describe the project structure per-subproject. org.junit.jupiter junit-jupiter - 5.12.2 + 5.13.2 test org.junit.jupiter junit-jupiter-api - 5.12.2 + 5.13.2 test org.junit.jupiter junit-jupiter-engine - 5.12.2 + 5.13.2 test org.junit.jupiter junit-jupiter-params - 5.12.2 + 5.13.2 test From ccf52ab96946facbb54945622f4528a2c73fbba6 Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Thu, 18 Sep 2025 15:38:35 +0100 Subject: [PATCH 09/14] Stop using Foojay plugins --- buildSrc/settings.gradle.kts | 4 ---- settings.gradle.kts | 5 ----- 2 files changed, 9 deletions(-) diff --git a/buildSrc/settings.gradle.kts b/buildSrc/settings.gradle.kts index 4110254..9b0e617 100644 --- a/buildSrc/settings.gradle.kts +++ b/buildSrc/settings.gradle.kts @@ -31,7 +31,3 @@ pluginManagement { mavenCentral() } } - -plugins { - id("org.gradle.toolchains.foojay-resolver-convention") //.version("1.0.0") -} diff --git a/settings.gradle.kts b/settings.gradle.kts index 8db2405..c7bff5e 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -42,11 +42,6 @@ include( "gradle-plugin" ) -plugins { - // https://github.com/gradle/foojay-toolchains - id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" -} - dependencyResolutionManagement { repositories { mavenLocal() From 0271cf33d66629ad2ed79b25463348a18882ec4d Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Thu, 18 Sep 2025 15:39:42 +0100 Subject: [PATCH 10/14] Use in-place constant for Protobuf plugin --- .../src/main/kotlin/io/spine/tools/prototap/gradle/Plugin.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gradle-plugin/src/main/kotlin/io/spine/tools/prototap/gradle/Plugin.kt b/gradle-plugin/src/main/kotlin/io/spine/tools/prototap/gradle/Plugin.kt index 22e0af4..cf22ede 100644 --- a/gradle-plugin/src/main/kotlin/io/spine/tools/prototap/gradle/Plugin.kt +++ b/gradle-plugin/src/main/kotlin/io/spine/tools/prototap/gradle/Plugin.kt @@ -34,10 +34,8 @@ package io.spine.tools.prototap.gradle import com.google.common.annotations.VisibleForTesting import com.google.protobuf.gradle.GenerateProtoTask import com.google.protobuf.gradle.id -import io.spine.tools.version.Version import io.spine.tools.gradle.Artifact import io.spine.tools.gradle.artifact -import io.spine.tools.gradle.protobuf.ProtobufDependencies import io.spine.tools.gradle.protobuf.protobufExtension import io.spine.tools.prototap.Names.GRADLE_EXTENSION_NAME import io.spine.tools.prototap.Names.PROTOC_PLUGIN_CLASSIFIER @@ -47,6 +45,7 @@ import io.spine.tools.prototap.Paths.COMPILED_PROTOS_FILE import io.spine.tools.prototap.Paths.DESCRIPTOR_SET_FILE import io.spine.tools.prototap.Paths.TARGET_DIR import io.spine.tools.prototap.Paths.interimDir +import io.spine.tools.version.Version import java.io.File import java.nio.file.Path import java.util.* @@ -64,7 +63,7 @@ public class Plugin : Plugin { override fun apply(project: Project): Unit = with(project) { createExtension() - pluginManager.withPlugin(ProtobufDependencies.gradlePlugin.id) { + pluginManager.withPlugin("com.google.protobuf") { tapProtobuf() } } From fb3e42a6b99c75e67c6ccdfaace650e909753516 Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Thu, 18 Sep 2025 15:40:14 +0100 Subject: [PATCH 11/14] Update build time --- dependencies.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dependencies.md b/dependencies.md index 27210c8..59a15ab 100644 --- a/dependencies.md +++ b/dependencies.md @@ -727,7 +727,7 @@ The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Sep 18 15:36:54 WEST 2025** using +This report was generated on **Thu Sep 18 15:39:45 WEST 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). @@ -1589,7 +1589,7 @@ This report was generated on **Thu Sep 18 15:36:54 WEST 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Sep 18 15:36:54 WEST 2025** using +This report was generated on **Thu Sep 18 15:39:45 WEST 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). @@ -2323,6 +2323,6 @@ This report was generated on **Thu Sep 18 15:36:54 WEST 2025** using The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Thu Sep 18 15:36:54 WEST 2025** using +This report was generated on **Thu Sep 18 15:39:45 WEST 2025** using [Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under [Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE). \ No newline at end of file From b2c9e5d2dc264b654af58ed0ef3eadba41fdf8cd Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Thu, 18 Sep 2025 15:42:40 +0100 Subject: [PATCH 12/14] Update (c) headers --- buildSrc/quality/checkstyle-suppressions.xml | 4 ++-- buildSrc/quality/checkstyle.xml | 4 ++-- buildSrc/quality/pmd.xml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/buildSrc/quality/checkstyle-suppressions.xml b/buildSrc/quality/checkstyle-suppressions.xml index 54756a7..a761fca 100644 --- a/buildSrc/quality/checkstyle-suppressions.xml +++ b/buildSrc/quality/checkstyle-suppressions.xml @@ -1,13 +1,13 @@