From 07b8b6c699025f216994ab0cb1f584298e03dfe5 Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Mon, 9 Sep 2024 16:22:24 +0100 Subject: [PATCH 1/6] Bump version -> `2.0.0-SNAPSHOT.206` --- version.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.gradle.kts b/version.gradle.kts index f34071f4a9..2ef03ce16f 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("2.0.0-SNAPSHOT.205") +val versionToPublish: String by extra("2.0.0-SNAPSHOT.206") From a3f4d59c88ffab215db5b9d9504c00cbcbf6391e Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Mon, 9 Sep 2024 16:22:41 +0100 Subject: [PATCH 2/6] Describe the intent of `GeneratedMixin` annotation --- .../io/spine/annotation/GeneratedMixin.java | 32 +++++++++++++------ 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/src/main/java/io/spine/annotation/GeneratedMixin.java b/src/main/java/io/spine/annotation/GeneratedMixin.java index ef153dd173..3af442725f 100644 --- a/src/main/java/io/spine/annotation/GeneratedMixin.java +++ b/src/main/java/io/spine/annotation/GeneratedMixin.java @@ -1,11 +1,11 @@ /* - * Copyright 2022, TeamDev. All rights reserved. + * Copyright 2024, TeamDev. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * 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 @@ -34,15 +34,29 @@ import java.lang.annotation.Target; /** - * Indicates an interface which is implemented in the generated code. + * Indicates an interface which is implemented in the generated code adding desired behavior + * using default methods declared in the interface. * - *

Such an interface can be used for grouping generated classes under a common base, or - * by adding desired behavior using default methods declared in the mixin interface. + *

Motivation

* - *

In order to generate a class which implements a custom interface: + *

This annotation allows to document the intent of the interface. It also allows to instruct + * IDEs to consider annotated interfaces as implemented before the code generation phase, or + * if the interfaces are used only from projects that depend on the one declaring these interfaces. + * + *

For example, Spine Base project introduces + * the {@link io.spine.base.CommandMessage CommandMessage} interface. + * There are no command messages generated in the Base project because it does not provide any + * backend API. The interface is used by multiple subprojects of the Spine SDK that depend + * on Base, but it is not used withing the project. Annotating the interface + * with {@code GeneratedMixin} addresses the issue. + * + *

Creating a mixin interface

+ * + *

In order to generate a class which implements a custom mixin interface: *

    *
  1. Create the interface and mark it with this annotation. - *
  2. Declare methods of interest following the Protobuf convention for the accessor methods. + *
  3. Declare methods of interest accessing properties of the generated types following + * the Protobuf convention for the accessor methods. * For example, if a message has a property named {@code foo_bar}, the method to declare will * be {@code getFooBar()}. *
  4. Add {@code default} methods. Presumably bodies of these methods will call accessor @@ -53,8 +67,8 @@ * make the generated code implement this interface. *
* - *

The annotation should NOT be used on interfaces that do not provide default methods, - * as implementing classes would not be mixins. + *

The annotation should NOT be used on interfaces that do not provide default methods + * because they will not be mixins. * * @see io.spine.option.IsOption */ From 04108f10961270665b6d2885b8df5f32fb149071 Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Mon, 9 Sep 2024 16:25:59 +0100 Subject: [PATCH 3/6] Update dependency reports --- dependencies.md | 50 ++++++++++++++++++++++++++----------------------- pom.xml | 18 +++++++++--------- 2 files changed, 36 insertions(+), 32 deletions(-) diff --git a/dependencies.md b/dependencies.md index 35c125db8c..a702443fe1 100644 --- a/dependencies.md +++ b/dependencies.md @@ -1,6 +1,6 @@ -# Dependencies of `io.spine:spine-base:2.0.0-SNAPSHOT.205` +# Dependencies of `io.spine:spine-base:2.0.0-SNAPSHOT.206` ## Runtime 1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2. @@ -247,7 +247,7 @@ * **Project URL:** [https://checkstyle.org/](https://checkstyle.org/) * **License:** [LGPL-2.1+](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt) -1. **Group** : com.soywiz.korlibs.korte. **Name** : korte-jvm. **Version** : 2.7.0. +1. **Group** : com.soywiz.korlibs.korte. **Name** : korte-jvm. **Version** : 4.0.10. * **Project URL:** [https://github.com/korlibs/korge-next](https://github.com/korlibs/korge-next) * **License:** [MIT](https://raw.githubusercontent.com/korlibs/korge-next/master/korge/LICENSE.txt) @@ -466,6 +466,10 @@ * **Project URL:** [https://github.com/kotest/kotest](https://github.com/kotest/kotest) * **License:** [Apache-2.0](https://opensource.org/licenses/Apache-2.0) +1. **Group** : it.unimi.dsi. **Name** : fastutil-core. **Version** : 8.5.12. + * **Project URL:** [http://fastutil.di.unimi.it/](http://fastutil.di.unimi.it/) + * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) + 1. **Group** : javax.annotation. **Name** : javax.annotation-api. **Version** : 1.3.2. * **Project URL:** [http://jcp.org/en/jsr/detail?id=250](http://jcp.org/en/jsr/detail?id=250) * **License:** [CDDL + GPLv2 with classpath exception](https://github.com/javaee/javax.annotation/blob/master/LICENSE) @@ -552,7 +556,7 @@ * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) * **License:** [The BSD License](http://www.opensource.org/licenses/bsd-license.php) -1. **Group** : org.freemarker. **Name** : freemarker. **Version** : 2.3.31. +1. **Group** : org.freemarker. **Name** : freemarker. **Version** : 2.3.32. * **Project URL:** [https://freemarker.apache.org/](https://freemarker.apache.org/) * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -586,43 +590,43 @@ * **Project URL:** [https://github.com/JetBrains/java-annotations](https://github.com/JetBrains/java-annotations) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains. **Name** : markdown. **Version** : 0.3.1. +1. **Group** : org.jetbrains. **Name** : markdown. **Version** : 0.5.2. * **Project URL:** [https://github.com/JetBrains/markdown](https://github.com/JetBrains/markdown) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains. **Name** : markdown-jvm. **Version** : 0.3.1. +1. **Group** : org.jetbrains. **Name** : markdown-jvm. **Version** : 0.5.2. * **Project URL:** [https://github.com/JetBrains/markdown](https://github.com/JetBrains/markdown) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.dokka. **Name** : analysis-kotlin-descriptors. **Version** : 1.9.10. +1. **Group** : org.jetbrains.dokka. **Name** : analysis-kotlin-descriptors. **Version** : 1.9.20. * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.dokka. **Name** : analysis-markdown. **Version** : 1.9.10. +1. **Group** : org.jetbrains.dokka. **Name** : analysis-markdown. **Version** : 1.9.20. * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.dokka. **Name** : dokka-base. **Version** : 1.9.10. +1. **Group** : org.jetbrains.dokka. **Name** : dokka-base. **Version** : 1.9.20. * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.dokka. **Name** : dokka-core. **Version** : 1.9.10. +1. **Group** : org.jetbrains.dokka. **Name** : dokka-core. **Version** : 1.9.20. * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.dokka. **Name** : gfm-plugin. **Version** : 1.9.10. +1. **Group** : org.jetbrains.dokka. **Name** : gfm-plugin. **Version** : 1.9.20. * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.dokka. **Name** : javadoc-plugin. **Version** : 1.9.10. +1. **Group** : org.jetbrains.dokka. **Name** : javadoc-plugin. **Version** : 1.9.20. * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.dokka. **Name** : jekyll-plugin. **Version** : 1.9.10. +1. **Group** : org.jetbrains.dokka. **Name** : jekyll-plugin. **Version** : 1.9.20. * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.dokka. **Name** : kotlin-as-java-plugin. **Version** : 1.9.10. +1. **Group** : org.jetbrains.dokka. **Name** : kotlin-as-java-plugin. **Version** : 1.9.20. * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) @@ -698,15 +702,11 @@ * **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) -1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-bom. **Version** : 1.6.3. - * **Project URL:** [https://github.com/Kotlin/kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) - * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) - 1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-bom. **Version** : 1.7.0. * **Project URL:** [https://github.com/Kotlin/kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-core. **Version** : 1.6.3. +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-bom. **Version** : 1.7.3. * **Project URL:** [https://github.com/Kotlin/kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) @@ -714,7 +714,7 @@ * **Project URL:** [https://github.com/Kotlin/kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-core-jvm. **Version** : 1.6.3. +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-core. **Version** : 1.7.3. * **Project URL:** [https://github.com/Kotlin/kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) @@ -722,6 +722,10 @@ * **Project URL:** [https://github.com/Kotlin/kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-core-jvm. **Version** : 1.7.3. + * **Project URL:** [https://github.com/Kotlin/kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + 1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-debug. **Version** : 1.7.0. * **Project URL:** [https://github.com/Kotlin/kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) @@ -738,11 +742,11 @@ * **Project URL:** [https://github.com/Kotlin/kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-html-jvm. **Version** : 0.7.5. +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-html-jvm. **Version** : 0.8.1. * **Project URL:** [https://github.com/Kotlin/kotlinx.html](https://github.com/Kotlin/kotlinx.html) * **License:** [The Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-html-jvm. **Version** : 0.8.1. +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-html-jvm. **Version** : 0.9.1. * **Project URL:** [https://github.com/Kotlin/kotlinx.html](https://github.com/Kotlin/kotlinx.html) * **License:** [The Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) @@ -762,7 +766,7 @@ * **Project URL:** [https://github.com/Kotlin/kotlinx.serialization](https://github.com/Kotlin/kotlinx.serialization) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jsoup. **Name** : jsoup. **Version** : 1.15.3. +1. **Group** : org.jsoup. **Name** : jsoup. **Version** : 1.16.1. * **Project URL:** [https://jsoup.org/](https://jsoup.org/) * **License:** [The MIT License](https://jsoup.org/license) @@ -841,4 +845,4 @@ The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Sat Aug 10 17:15:09 WEST 2024** 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 **Mon Sep 09 16:25:07 WEST 2024** 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 f9e20fdf49..ae06f5ae3e 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ all modules and does not describe the project structure per-subproject. --> io.spine base -2.0.0-SNAPSHOT.205 +2.0.0-SNAPSHOT.206 2015 @@ -56,7 +56,7 @@ all modules and does not describe the project structure per-subproject. io.spine spine-reflect - 2.0.0-SNAPSHOT.184 + 2.0.0-SNAPSHOT.188 compile @@ -221,37 +221,37 @@ all modules and does not describe the project structure per-subproject. org.jetbrains.dokka analysis-kotlin-descriptors - 1.9.10 + 1.9.20 org.jetbrains.dokka dokka-base - 1.9.10 + 1.9.20 org.jetbrains.dokka dokka-core - 1.9.10 + 1.9.20 org.jetbrains.dokka gfm-plugin - 1.9.10 + 1.9.20 org.jetbrains.dokka javadoc-plugin - 1.9.10 + 1.9.20 org.jetbrains.dokka jekyll-plugin - 1.9.10 + 1.9.20 org.jetbrains.dokka kotlin-as-java-plugin - 1.9.10 + 1.9.20 org.jetbrains.kotlin From ff45d0a3fa67a9a4e1f9621e7faada631bd92d8d Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Mon, 9 Sep 2024 16:26:05 +0100 Subject: [PATCH 4/6] Update config --- buildSrc/build.gradle.kts | 8 +-- buildSrc/src/main/kotlin/BuildExtensions.kt | 9 +++ buildSrc/src/main/kotlin/DokkaExts.kt | 57 +++++++++++-------- .../io/spine/internal/dependency/Caffeine.kt | 2 +- .../io/spine/internal/dependency/Dokka.kt | 6 +- .../io/spine/internal/dependency/ProtoData.kt | 4 +- .../io/spine/internal/dependency/Spine.kt | 8 +-- .../spine/internal/dependency/Validation.kt | 14 +---- config | 2 +- 9 files changed, 59 insertions(+), 51 deletions(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 91fb0d8697..aba23be74f 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Redistribution and use in source and/or binary forms, with or without * modification, must retain the above copyright notice and the following @@ -51,8 +51,8 @@ repositories { /** * The version of Jackson used by `buildSrc`. * - * Please keep this value in sync. with `io.spine.internal.dependency.Jackson.version`. - * It's not a requirement, but would be good in terms of consistency. + * Please keep this value in sync with [io.spine.internal.dependency.Jackson.version]. + * It is not a requirement but would be good in terms of consistency. */ val jacksonVersion = "2.15.3" @@ -114,7 +114,7 @@ val protobufPluginVersion = "0.9.4" * @see * Dokka Releases */ -val dokkaVersion = "1.9.10" +val dokkaVersion = "1.9.20" /** * The version of Detekt Gradle Plugin. diff --git a/buildSrc/src/main/kotlin/BuildExtensions.kt b/buildSrc/src/main/kotlin/BuildExtensions.kt index 7ce2194c5e..85c83f8284 100644 --- a/buildSrc/src/main/kotlin/BuildExtensions.kt +++ b/buildSrc/src/main/kotlin/BuildExtensions.kt @@ -185,3 +185,12 @@ fun Project.configureTaskDependencies() { "publishPluginJar".dependOn(createVersionFile) } } + +/** + * Obtains all modules of the root project to which this project belongs that + * do not have `"-tests"` in their names. + * + * By convention such modules are for integration tests and should be treated differently. + */ +val Project.productionModules: Iterable + get() = rootProject.subprojects.filter { !it.name.contains("-tests") } diff --git a/buildSrc/src/main/kotlin/DokkaExts.kt b/buildSrc/src/main/kotlin/DokkaExts.kt index f42f1349a4..c6d619c404 100644 --- a/buildSrc/src/main/kotlin/DokkaExts.kt +++ b/buildSrc/src/main/kotlin/DokkaExts.kt @@ -40,6 +40,8 @@ import org.gradle.kotlin.dsl.DependencyHandlerScope import org.jetbrains.dokka.DokkaConfiguration import org.jetbrains.dokka.base.DokkaBase import org.jetbrains.dokka.base.DokkaBaseConfiguration +import org.jetbrains.dokka.gradle.AbstractDokkaLeafTask +import org.jetbrains.dokka.gradle.AbstractDokkaTask import org.jetbrains.dokka.gradle.DokkaTask import org.jetbrains.dokka.gradle.GradleDokkaSourceSetBuilder @@ -56,7 +58,7 @@ fun DependencyHandlerScope.useDokkaForKotlinAsJava() { /** * To exclude pieces of code annotated with `@Internal` from the documentation - * a custom plugin is added to the Dokka's classpath. + * a custom plugin is added to the Dokka classpath. * * @see * Custom Dokka Plugins @@ -71,12 +73,35 @@ private fun DependencyHandler.dokkaPlugin(dependencyNotation: Any): Dependency? private fun Project.dokkaOutput(language: String): File = buildDir.resolve("docs/dokka${language.capitalized()}") -private fun Project.dokkaConfigFile(file: String): File { +fun Project.dokkaConfigFile(file: String): File { val dokkaConfDir = project.rootDir.resolve("buildSrc/src/main/resources/dokka") return dokkaConfDir.resolve(file) } -private fun DokkaTask.configureFor(language: String) { +/** + * Configures the presentation style, logo, and footer message. + * + * Dokka Base plugin allows setting a few properties to customize the output: + * - `customStyleSheets` property to which CSS files are passed overriding + * styles generated by Dokka; + * - `customAssets` property to provide resources. The image with the name + * "logo-icon.svg" is passed to override the default logo used by Dokka; + * - `separateInheritedMembers` when set to `true`, creates a separate tab in + * type-documentation for inherited members. + * + * @see + * Dokka modifying frontend assets + */ +fun AbstractDokkaTask.configureStyle() { + pluginConfiguration { + customStyleSheets = listOf(project.dokkaConfigFile("styles/custom-styles.css")) + customAssets = listOf(project.dokkaConfigFile("assets/logo-icon.svg")) + separateInheritedMembers = true + footerMessage = "Copyright ${LocalDate.now().year}, TeamDev" + } +} + +private fun AbstractDokkaLeafTask.configureFor(language: String) { dokkaSourceSets.configureEach { /** * Configures links to the external Java documentation. @@ -85,6 +110,8 @@ private fun DokkaTask.configureFor(language: String) { skipEmptyPackages.set(true) + includeNonPublic.set(true) + documentedVisibilities.set( setOf( DokkaConfiguration.Visibility.PUBLIC, @@ -95,38 +122,20 @@ private fun DokkaTask.configureFor(language: String) { outputDirectory.set(project.dokkaOutput(language)) - /** - * Dokka Base plugin allows to set a few properties to customize the output: - * - * - `customStyleSheets` property to which CSS files are passed overriding - * styles generated by Dokka; - * - `customAssets` property to provide resources. The image with the name - * "logo-icon.svg" is passed to override the default logo used by Dokka; - * - `separateInheritedMembers` when set to `true`, creates a separate tab in - * type-documentation for inherited members. - * - * @see - * Dokka modifying frontend assets - */ - pluginConfiguration { - customStyleSheets = listOf(project.dokkaConfigFile("styles/custom-styles.css")) - customAssets = listOf(project.dokkaConfigFile("assets/logo-icon.svg")) - separateInheritedMembers = true - footerMessage = "Copyright ${LocalDate.now().year}, TeamDev" - } + configureStyle() } /** * Configures this [DokkaTask] to accept only Kotlin files. */ -fun DokkaTask.configureForKotlin() { +fun AbstractDokkaLeafTask.configureForKotlin() { configureFor("kotlin") } /** * Configures this [DokkaTask] to accept only Java files. */ -fun DokkaTask.configureForJava() { +fun AbstractDokkaLeafTask.configureForJava() { configureFor("java") } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Caffeine.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Caffeine.kt index 1ad7a6bc35..ae5240e3b6 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Caffeine.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Caffeine.kt @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Redistribution and use in source and/or binary forms, with or without * modification, must retain the above copyright notice and the following diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Dokka.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Dokka.kt index 6158c678eb..d0209d2a08 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Dokka.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Dokka.kt @@ -1,11 +1,11 @@ /* - * Copyright 2023, TeamDev. All rights reserved. + * Copyright 2024, TeamDev. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * 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 @@ -35,7 +35,7 @@ object Dokka { * When changing the version, also change the version used in the * `buildSrc/build.gradle.kts`. */ - const val version = "1.9.10" + const val version = "1.9.20" object GradlePlugin { const val id = "org.jetbrains.dokka" diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/ProtoData.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/ProtoData.kt index 72fa78762b..ae39774acf 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/ProtoData.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/ProtoData.kt @@ -65,7 +65,7 @@ object ProtoData { * The version of ProtoData dependencies. */ val version: String - private const val fallbackVersion = "0.51.0" + private const val fallbackVersion = "0.54.2" /** * The distinct version of ProtoData used by other build tools. @@ -74,7 +74,7 @@ object ProtoData { * transitional dependencies, this is the version used to build the project itself. */ val dogfoodingVersion: String - private const val fallbackDfVersion = "0.51.0" + private const val fallbackDfVersion = "0.54.2" /** * The artifact for the ProtoData Gradle plugin. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Spine.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Spine.kt index bee835865f..3f22dd148f 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Spine.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Spine.kt @@ -45,14 +45,14 @@ object Spine { * * @see spine-base */ - const val base = "2.0.0-SNAPSHOT.203" + const val base = "2.0.0-SNAPSHOT.205" /** * The version of [Spine.reflect]. * * @see spine-reflect */ - const val reflect = "2.0.0-SNAPSHOT.184" + const val reflect = "2.0.0-SNAPSHOT.188" /** * The version of [Spine.Logging]. @@ -89,7 +89,7 @@ object Spine { * * @see spine-mc-java */ - const val mcJava = "2.0.0-SNAPSHOT.206" + const val mcJava = "2.0.0-SNAPSHOT.217" /** * The version of [Spine.baseTypes]. @@ -124,7 +124,7 @@ object Spine { * * @see spine-tool-base */ - const val toolBase = "2.0.0-SNAPSHOT.215" + const val toolBase = "2.0.0-SNAPSHOT.223" /** * The version of [Spine.javadocTools]. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Validation.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Validation.kt index ab1a825909..f7c73a1788 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Validation.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Validation.kt @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * https://www.apache.org/licenses/LICENSE-2.0 * * Redistribution and use in source and/or binary forms, with or without * modification, must retain the above copyright notice and the following @@ -36,17 +36,7 @@ object Validation { /** * The version of the Validation library artifacts. */ - const val version = "2.0.0-SNAPSHOT.133" - - /** - * The distinct version of the Validation library used by build tools during - * the transition from a previous version when breaking API changes are introduced. - * - * When Validation is used both for building the project and as a part of the project's - * transitional dependencies, this is the version used to build the project itself to - * avoid errors caused by incompatible API changes. - */ - const val dogfoodingVersion = "2.0.0-SNAPSHOT.133" + const val version = "2.0.0-SNAPSHOT.154" const val group = "io.spine.validation" private const val prefix = "spine-validation" diff --git a/config b/config index e9b1946c5f..838f9a02bc 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit e9b1946c5fa79609242ef47aef44f2166de1c44d +Subproject commit 838f9a02bceda313f01536e90b2cc30341539d7b From 51b2066f6a2c5fa9b77dc0a361ebdf58e502567e Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Mon, 9 Sep 2024 16:31:06 +0100 Subject: [PATCH 5/6] Remove deprecated class --- src/main/java/io/spine/string/Registrar.java | 63 -------------------- 1 file changed, 63 deletions(-) delete mode 100644 src/main/java/io/spine/string/Registrar.java diff --git a/src/main/java/io/spine/string/Registrar.java b/src/main/java/io/spine/string/Registrar.java deleted file mode 100644 index fb4ca8265d..0000000000 --- a/src/main/java/io/spine/string/Registrar.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2022, TeamDev. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package io.spine.string; - -import com.google.common.collect.ImmutableList; - -import static com.google.common.base.Preconditions.checkArgument; -import static com.google.common.base.Preconditions.checkNotNull; - -/** - * Registers passed stringifiers at the {@link StringifierRegistry}. - * - * @deprecated please use {@link StringifierRegistry#register(Stringifier, Stringifier[])} - */ -@Deprecated -public final class Registrar { - - private final ImmutableList> stringifiers; - - /** - * Creates an instance for registering passed stringifiers. - */ - public Registrar(Iterable> stringifiers) { - checkNotNull(stringifiers); - this.stringifiers = ImmutableList.copyOf(stringifiers); - checkArgument(this.stringifiers.size() > 0, "At least one stringifier must be provided."); - } - - /** - * Registers stringifiers. - * - * @deprecated please use {@link StringifierRegistry#register(Stringifier, Stringifier[])} - */ - @Deprecated - public void register() { - var registry = StringifierRegistry.instance(); - stringifiers.forEach(registry::register); - } -} From a38b247aca597e79f2b2214bc097b75108a1396b Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Mon, 9 Sep 2024 16:31:41 +0100 Subject: [PATCH 6/6] Annotate `UuidValue` as `GeneratedMixin` ... because it recently got static method `checkValid()`. --- src/main/java/io/spine/base/UuidValue.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/spine/base/UuidValue.java b/src/main/java/io/spine/base/UuidValue.java index 0b04a7a84d..6e8ffb2442 100644 --- a/src/main/java/io/spine/base/UuidValue.java +++ b/src/main/java/io/spine/base/UuidValue.java @@ -27,6 +27,7 @@ package io.spine.base; import com.google.errorprone.annotations.Immutable; +import io.spine.annotation.GeneratedMixin; import io.spine.type.KnownMessage; import java.util.UUID; @@ -51,8 +52,8 @@ * } * */ -@SuppressWarnings("InterfaceNeverImplemented") // Used by the Protobuf Compiler plugin. @Immutable +@GeneratedMixin public interface UuidValue extends KnownMessage { /**