From 9965d105b4b7d2ef5f8b807e2cfc1a7486db5ba6 Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Tue, 23 Jun 2020 18:37:20 +0300 Subject: [PATCH 1/9] Define the annotation and test data --- .../java/io/spine/server/entity/Friends.java | 27 +++++++++++ .../server/test/friends/package-info.java | 33 +++++++++++++ .../spine/test/server/friends/commands.proto | 43 +++++++++++++++++ .../spine/test/server/friends/entities.proto | 47 +++++++++++++++++++ .../spine/test/server/friends/events.proto | 43 +++++++++++++++++ .../test/server/friends/identifiers.proto | 33 +++++++++++++ version.gradle.kts | 2 +- 7 files changed, 227 insertions(+), 1 deletion(-) create mode 100644 server/src/main/java/io/spine/server/entity/Friends.java create mode 100644 server/src/test/java/io/spine/server/test/friends/package-info.java create mode 100644 server/src/test/proto/spine/test/server/friends/commands.proto create mode 100644 server/src/test/proto/spine/test/server/friends/entities.proto create mode 100644 server/src/test/proto/spine/test/server/friends/events.proto create mode 100644 server/src/test/proto/spine/test/server/friends/identifiers.proto diff --git a/server/src/main/java/io/spine/server/entity/Friends.java b/server/src/main/java/io/spine/server/entity/Friends.java new file mode 100644 index 00000000000..e6b896e5bd3 --- /dev/null +++ b/server/src/main/java/io/spine/server/entity/Friends.java @@ -0,0 +1,27 @@ +/* + * Copyright 2020, TeamDev. All rights reserved. + * + * 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.server.entity; + +import io.spine.server.command.CommandHandlingEntity; + +public @interface Friends { + Class> entities(); +} diff --git a/server/src/test/java/io/spine/server/test/friends/package-info.java b/server/src/test/java/io/spine/server/test/friends/package-info.java new file mode 100644 index 00000000000..097de50945e --- /dev/null +++ b/server/src/test/java/io/spine/server/test/friends/package-info.java @@ -0,0 +1,33 @@ +/* + * Copyright 2020, TeamDev. All rights reserved. + * + * Redistribution and use in source and/or binary forms, with or without + * modification, must retain the above copyright notice and the following + * disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * This package tests the {@link io.spine.server.entity.Friends Friends} annotation + * which allows {@linkplain io.spine.server.command.CommandHandlingEntity command handling entities} + * to load states of other entities. + */ + +@CheckReturnValue +@ParametersAreNonnullByDefault +package io.spine.server.test.friends; + +import com.google.errorprone.annotations.CheckReturnValue; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/server/src/test/proto/spine/test/server/friends/commands.proto b/server/src/test/proto/spine/test/server/friends/commands.proto new file mode 100644 index 00000000000..f753da7fa29 --- /dev/null +++ b/server/src/test/proto/spine/test/server/friends/commands.proto @@ -0,0 +1,43 @@ +/* + * Copyright 2020, TeamDev. All rights reserved. + * + * 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. + */ +syntax = "proto3"; + +package spine.test.server.friends; + +import "spine/options.proto"; + +option (type_url_prefix) = "type.spine.io"; +option java_package = "io.spine.server.test.friends.command"; +option java_outer_classname = "CommandsProto"; +option java_multiple_files = true; + +import "spine/test/server/friends/identifiers.proto"; + +message CreateTask { + TaskId id = 1; + string title = 2 [(required) = true]; +} + +message LogWork { + TaskId task = 1; + + // For simplicity of the test we assume work is in man-hours. Must be a positive value. + int32 work = 2 [(required) = true, (min).value = "1"]; +} diff --git a/server/src/test/proto/spine/test/server/friends/entities.proto b/server/src/test/proto/spine/test/server/friends/entities.proto new file mode 100644 index 00000000000..789887a7030 --- /dev/null +++ b/server/src/test/proto/spine/test/server/friends/entities.proto @@ -0,0 +1,47 @@ +/* + * Copyright 2020, TeamDev. All rights reserved. + * + * 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. + */ +syntax = "proto3"; + +package spine.test.server.friends; + +import "spine/options.proto"; + +option (type_url_prefix) = "type.spine.io"; +option java_package = "io.spine.server.test.friends"; +option java_outer_classname = "EntitiesProto"; +option java_multiple_files = true; + +import "spine/test/server/friends/identifiers.proto"; + +message Task { + TaskId id = 1; + string title = 2 [(required) = true]; +} + +message WorkLog { + TaskId task = 1; + + // For simplicity of the test we simply accumulate values. + // A real-world log would have a repeated field of a `Record` type. + repeated int32 record = 2; + + // The total work done. + int32 total = 3; +} diff --git a/server/src/test/proto/spine/test/server/friends/events.proto b/server/src/test/proto/spine/test/server/friends/events.proto new file mode 100644 index 00000000000..86c647eb225 --- /dev/null +++ b/server/src/test/proto/spine/test/server/friends/events.proto @@ -0,0 +1,43 @@ +/* + * Copyright 2020, TeamDev. All rights reserved. + * + * 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. + */ +syntax = "proto3"; + +package spine.test.server.friends; + +import "spine/options.proto"; + +option (type_url_prefix) = "type.spine.io"; +option java_package = "io.spine.server.test.friends.event"; +option java_outer_classname = "EventsProto"; +option java_multiple_files = true; + +import "spine/test/server/friends/identifiers.proto"; + +message TaskCreated { + TaskId id = 1; + string title = 2 [(required) = true]; +} + +message WorkLogged { + TaskId task = 1; + + // For simplicity of the test we assume work is in man-hours. Must be a positive value. + int32 work = 2 [(required) = true, (min).value = "1"]; +} diff --git a/server/src/test/proto/spine/test/server/friends/identifiers.proto b/server/src/test/proto/spine/test/server/friends/identifiers.proto new file mode 100644 index 00000000000..824388b78dd --- /dev/null +++ b/server/src/test/proto/spine/test/server/friends/identifiers.proto @@ -0,0 +1,33 @@ +/* + * Copyright 2020, TeamDev. All rights reserved. + * + * 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. + */ +syntax = "proto3"; + +package spine.test.server.friends; + +import "spine/options.proto"; + +option (type_url_prefix) = "type.spine.io"; +option java_package = "io.spine.server.test.friends"; +option java_outer_classname = "IdentifiersProto"; +option java_multiple_files = true; + +message TaskId { + string uuid = 1; +} diff --git a/version.gradle.kts b/version.gradle.kts index e6036e8ebf6..8dd1cb1fc7b 100644 --- a/version.gradle.kts +++ b/version.gradle.kts @@ -27,4 +27,4 @@ val spineBaseVersion: String by extra("1.5.12") val spineTimeVersion: String by extra("1.5.12") -val versionToPublish: String by extra("1.5.14") +val versionToPublish: String by extra("2.0.0-alfa-001") From 8377d4d3aff255004a0e7632c0377ef47f6fa01b Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Tue, 23 Jun 2020 18:37:36 +0300 Subject: [PATCH 2/9] Update config --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index d9223f98f58..47048aed2a2 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit d9223f98f58cca6a6c91d3339f0fa6c366e3a00c +Subproject commit 47048aed2a242a17c959577515b0548eb58fb984 From 1c53a91d7ba60c40ff00b9e00f3274208cf4b5c2 Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Tue, 23 Jun 2020 18:51:53 +0300 Subject: [PATCH 3/9] Define test entities --- license-report.md | 32 ++++++------- pom.xml | 2 +- .../java/io/spine/server/entity/Friends.java | 2 +- .../test/friends/TaskDefinitionAggregate.java | 43 +++++++++++++++++ .../server/test/friends/WorkLogAggregate.java | 46 +++++++++++++++++++ .../spine/test/server/friends/entities.proto | 2 + 6 files changed, 109 insertions(+), 18 deletions(-) create mode 100644 server/src/test/java/io/spine/server/test/friends/TaskDefinitionAggregate.java create mode 100644 server/src/test/java/io/spine/server/test/friends/WorkLogAggregate.java diff --git a/license-report.md b/license-report.md index 6fcb012b680..344bf3c38fd 100644 --- a/license-report.md +++ b/license-report.md @@ -1,6 +1,6 @@ -# Dependencies of `io.spine:spine-client:1.5.14` +# Dependencies of `io.spine:spine-client:2.0.0-alfa-001` ## Runtime 1. **Group:** com.google.android **Name:** annotations **Version:** 4.1.1.4 @@ -405,12 +405,12 @@ The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri May 29 20:11:30 EEST 2020** 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 **Tue Jun 23 18:45:31 EEST 2020** 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:spine-core:1.5.14` +# Dependencies of `io.spine:spine-core:2.0.0-alfa-001` ## Runtime 1. **Group:** com.google.code.findbugs **Name:** jsr305 **Version:** 3.0.2 @@ -775,12 +775,12 @@ This report was generated on **Fri May 29 20:11:30 EEST 2020** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri May 29 20:11:38 EEST 2020** 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 **Tue Jun 23 18:45:31 EEST 2020** 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:spine-model-assembler:1.5.14` +# Dependencies of `io.spine.tools:spine-model-assembler:2.0.0-alfa-001` ## Runtime 1. **Group:** com.google.android **Name:** annotations **Version:** 4.1.1.4 @@ -1180,12 +1180,12 @@ This report was generated on **Fri May 29 20:11:38 EEST 2020** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri May 29 20:12:07 EEST 2020** 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 **Tue Jun 23 18:45:31 EEST 2020** 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:spine-model-verifier:1.5.14` +# Dependencies of `io.spine.tools:spine-model-verifier:2.0.0-alfa-001` ## Runtime 1. **Group:** com.google.android **Name:** annotations **Version:** 4.1.1.4 @@ -1645,12 +1645,12 @@ This report was generated on **Fri May 29 20:12:07 EEST 2020** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri May 29 20:12:22 EEST 2020** 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 **Tue Jun 23 18:45:32 EEST 2020** 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:spine-server:1.5.14` +# Dependencies of `io.spine:spine-server:2.0.0-alfa-001` ## Runtime 1. **Group:** com.google.android **Name:** annotations **Version:** 4.1.1.4 @@ -2067,12 +2067,12 @@ This report was generated on **Fri May 29 20:12:22 EEST 2020** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri May 29 20:13:27 EEST 2020** 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 **Tue Jun 23 18:45:32 EEST 2020** 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:spine-testutil-client:1.5.14` +# Dependencies of `io.spine:spine-testutil-client:2.0.0-alfa-001` ## Runtime 1. **Group:** com.google.android **Name:** annotations **Version:** 4.1.1.4 @@ -2526,12 +2526,12 @@ This report was generated on **Fri May 29 20:13:27 EEST 2020** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri May 29 20:13:33 EEST 2020** 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 **Tue Jun 23 18:45:33 EEST 2020** 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:spine-testutil-core:1.5.14` +# Dependencies of `io.spine:spine-testutil-core:2.0.0-alfa-001` ## Runtime 1. **Group:** com.google.android **Name:** annotations **Version:** 4.1.1.4 @@ -2993,12 +2993,12 @@ This report was generated on **Fri May 29 20:13:33 EEST 2020** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri May 29 20:13:36 EEST 2020** 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 **Tue Jun 23 18:45:34 EEST 2020** 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:spine-testutil-server:1.5.14` +# Dependencies of `io.spine:spine-testutil-server:2.0.0-alfa-001` ## Runtime 1. **Group:** com.google.android **Name:** annotations **Version:** 4.1.1.4 @@ -3496,4 +3496,4 @@ This report was generated on **Fri May 29 20:13:36 EEST 2020** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri May 29 20:13:47 EEST 2020** 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 **Tue Jun 23 18:45:36 EEST 2020** 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 5889a5e07ee..aeb72b3ba5e 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ all modules and does not describe the project structure per-subproject. io.spine spine-core-java -1.5.14 +2.0.0-alfa-001 2015 diff --git a/server/src/main/java/io/spine/server/entity/Friends.java b/server/src/main/java/io/spine/server/entity/Friends.java index e6b896e5bd3..4c26b77eead 100644 --- a/server/src/main/java/io/spine/server/entity/Friends.java +++ b/server/src/main/java/io/spine/server/entity/Friends.java @@ -23,5 +23,5 @@ import io.spine.server.command.CommandHandlingEntity; public @interface Friends { - Class> entities(); + Class>[] entities(); } diff --git a/server/src/test/java/io/spine/server/test/friends/TaskDefinitionAggregate.java b/server/src/test/java/io/spine/server/test/friends/TaskDefinitionAggregate.java new file mode 100644 index 00000000000..5bb24a81834 --- /dev/null +++ b/server/src/test/java/io/spine/server/test/friends/TaskDefinitionAggregate.java @@ -0,0 +1,43 @@ +/* + * Copyright 2020, TeamDev. All rights reserved. + * + * 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.server.test.friends; + +import io.spine.server.aggregate.Aggregate; +import io.spine.server.aggregate.Apply; +import io.spine.server.command.Assign; +import io.spine.server.test.friends.command.CreateTask; +import io.spine.server.test.friends.event.TaskCreated; + +final class TaskDefinitionAggregate extends Aggregate { + + @Assign + TaskCreated handle(CreateTask c) { + return TaskCreated.newBuilder() + .setId(id()) + .setTitle(c.getTitle()) + .vBuild(); + } + + @Apply + void event(TaskCreated e) { + builder().setTitle(e.getTitle()); + } +} diff --git a/server/src/test/java/io/spine/server/test/friends/WorkLogAggregate.java b/server/src/test/java/io/spine/server/test/friends/WorkLogAggregate.java new file mode 100644 index 00000000000..ea3e0b6c4ab --- /dev/null +++ b/server/src/test/java/io/spine/server/test/friends/WorkLogAggregate.java @@ -0,0 +1,46 @@ +/* + * Copyright 2020, TeamDev. All rights reserved. + * + * 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.server.test.friends; + +import io.spine.server.aggregate.Aggregate; +import io.spine.server.aggregate.Apply; +import io.spine.server.command.Assign; +import io.spine.server.entity.Friends; +import io.spine.server.test.friends.command.LogWork; +import io.spine.server.test.friends.event.WorkLogged; + +@Friends(entities = TaskDefinitionAggregate.class) +final class WorkLogAggregate extends Aggregate { + + @Assign + WorkLogged handle(LogWork c) { + return WorkLogged.newBuilder() + .setTask(c.getTask()) + .setWork(c.getWork()) + .vBuild(); + } + + @Apply + void event(WorkLogged e) { + builder().setTotal(state().getTotal() + e.getWork()) + .addRecord(e.getWork()); + } +} diff --git a/server/src/test/proto/spine/test/server/friends/entities.proto b/server/src/test/proto/spine/test/server/friends/entities.proto index 789887a7030..a251dab0d9d 100644 --- a/server/src/test/proto/spine/test/server/friends/entities.proto +++ b/server/src/test/proto/spine/test/server/friends/entities.proto @@ -31,11 +31,13 @@ option java_multiple_files = true; import "spine/test/server/friends/identifiers.proto"; message Task { + option (entity).kind = AGGREGATE; TaskId id = 1; string title = 2 [(required) = true]; } message WorkLog { + option (entity).kind = AGGREGATE; TaskId task = 1; // For simplicity of the test we simply accumulate values. From 927c958d3e571a0cb2fef47f6f9310bf902fc4c7 Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Wed, 24 Jun 2020 14:39:53 +0300 Subject: [PATCH 4/9] Improve readability via static imports --- core/src/main/java/io/spine/core/BoundedContext.java | 9 +++++---- .../src/main/java/io/spine/server/aggregate/Apply.java | 9 +++++---- server/src/main/java/io/spine/server/command/Assign.java | 9 +++++---- server/src/main/java/io/spine/server/event/React.java | 9 +++++---- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/core/src/main/java/io/spine/core/BoundedContext.java b/core/src/main/java/io/spine/core/BoundedContext.java index 578a3bd9288..6ca21c1ce6f 100644 --- a/core/src/main/java/io/spine/core/BoundedContext.java +++ b/core/src/main/java/io/spine/core/BoundedContext.java @@ -21,11 +21,12 @@ package io.spine.core; import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import static java.lang.annotation.ElementType.PACKAGE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + /** * Marks a package as one belonging to a Bounded Context with * the {@linkplain #value() specified name}. @@ -49,8 +50,8 @@ *

Packages that do not have a common “parent” but annotated with the same name belong * to the same Bounded Context. */ -@Target(ElementType.PACKAGE) -@Retention(RetentionPolicy.RUNTIME) +@Target(PACKAGE) +@Retention(RUNTIME) @Documented public @interface BoundedContext { diff --git a/server/src/main/java/io/spine/server/aggregate/Apply.java b/server/src/main/java/io/spine/server/aggregate/Apply.java index 1e8693efcae..7ba2c12e9d1 100644 --- a/server/src/main/java/io/spine/server/aggregate/Apply.java +++ b/server/src/main/java/io/spine/server/aggregate/Apply.java @@ -20,11 +20,12 @@ package io.spine.server.aggregate; -import java.lang.annotation.ElementType; import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + /** * Marks a method of an aggregate as one that modifies the state of the aggregate with data * from the passed event. @@ -47,8 +48,8 @@ * {@code true}, the aggregate can receive incoming events as if they were produced * by the aggregate. */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.METHOD) +@Retention(RUNTIME) +@Target(METHOD) public @interface Apply { /** diff --git a/server/src/main/java/io/spine/server/command/Assign.java b/server/src/main/java/io/spine/server/command/Assign.java index 96a83a0fcd9..d8744cc4d15 100644 --- a/server/src/main/java/io/spine/server/command/Assign.java +++ b/server/src/main/java/io/spine/server/command/Assign.java @@ -20,11 +20,12 @@ package io.spine.server.command; -import java.lang.annotation.ElementType; import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + /** * Marks a method as command handler. * @@ -133,7 +134,7 @@ * @see io.spine.server.tuple.Either Returning One of Event Messages * @see io.spine.server.command.Command Transforming Commands */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.METHOD) +@Retention(RUNTIME) +@Target(METHOD) public @interface Assign { } diff --git a/server/src/main/java/io/spine/server/event/React.java b/server/src/main/java/io/spine/server/event/React.java index 27fd7f7b5ff..91cc8c5d7ab 100644 --- a/server/src/main/java/io/spine/server/event/React.java +++ b/server/src/main/java/io/spine/server/event/React.java @@ -23,11 +23,12 @@ import io.spine.core.AcceptsExternal; import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + /** * Marks a method of an entity as one that may modify the state of the entity in * response to some domain event. @@ -150,8 +151,8 @@ *

If the annotation is applied to a method which does not satisfy either of these requirements, * this method will not be registering for receiving events. */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.METHOD) +@Retention(RUNTIME) +@Target(METHOD) @Documented @AcceptsExternal public @interface React { From fc4bfb4c37f5309d6e1bbf804398e54839bfa2c9 Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Wed, 24 Jun 2020 14:41:07 +0300 Subject: [PATCH 5/9] Use singular for names To 1) match C++ 2) not encourage multiple friends. --- .../entity/{Friends.java => Friend.java} | 22 +++++++++++++++++-- .../server/test/friends/WorkLogAggregate.java | 4 ++-- .../server/test/friends/package-info.java | 2 +- 3 files changed, 23 insertions(+), 5 deletions(-) rename server/src/main/java/io/spine/server/entity/{Friends.java => Friend.java} (62%) diff --git a/server/src/main/java/io/spine/server/entity/Friends.java b/server/src/main/java/io/spine/server/entity/Friend.java similarity index 62% rename from server/src/main/java/io/spine/server/entity/Friends.java rename to server/src/main/java/io/spine/server/entity/Friend.java index 4c26b77eead..a2f6f72f06c 100644 --- a/server/src/main/java/io/spine/server/entity/Friends.java +++ b/server/src/main/java/io/spine/server/entity/Friend.java @@ -22,6 +22,24 @@ import io.spine.server.command.CommandHandlingEntity; -public @interface Friends { - Class>[] entities(); +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +/** + * Specifies classes of entities, such as {@link io.spine.server.aggregate.Aggregate Aggregate} + * or {@link io.spine.server.procman.ProcessManager ProcessManager}, that can load the state + * of the annotated entity. + */ +@Target(TYPE) +@Retention(RUNTIME) +public @interface Friend { + + /** + * Enumerates classes of command-handling entities that can load the state of + * the annotated entity. + */ + Class>[] entity(); } diff --git a/server/src/test/java/io/spine/server/test/friends/WorkLogAggregate.java b/server/src/test/java/io/spine/server/test/friends/WorkLogAggregate.java index ea3e0b6c4ab..e2abcc49c9e 100644 --- a/server/src/test/java/io/spine/server/test/friends/WorkLogAggregate.java +++ b/server/src/test/java/io/spine/server/test/friends/WorkLogAggregate.java @@ -23,11 +23,11 @@ import io.spine.server.aggregate.Aggregate; import io.spine.server.aggregate.Apply; import io.spine.server.command.Assign; -import io.spine.server.entity.Friends; +import io.spine.server.entity.Friend; import io.spine.server.test.friends.command.LogWork; import io.spine.server.test.friends.event.WorkLogged; -@Friends(entities = TaskDefinitionAggregate.class) +@Friend(entity = TaskDefinitionAggregate.class) final class WorkLogAggregate extends Aggregate { @Assign diff --git a/server/src/test/java/io/spine/server/test/friends/package-info.java b/server/src/test/java/io/spine/server/test/friends/package-info.java index 097de50945e..a38ccbba6c6 100644 --- a/server/src/test/java/io/spine/server/test/friends/package-info.java +++ b/server/src/test/java/io/spine/server/test/friends/package-info.java @@ -19,7 +19,7 @@ */ /** - * This package tests the {@link io.spine.server.entity.Friends Friends} annotation + * This package tests the {@link io.spine.server.entity.Friend Friend} annotation * which allows {@linkplain io.spine.server.command.CommandHandlingEntity command handling entities} * to load states of other entities. */ From 8b7465cff4781213a5f4e0abb659e8dd850918ab Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Wed, 24 Jun 2020 14:58:16 +0300 Subject: [PATCH 6/9] Improve Javadoc --- server/src/main/java/io/spine/server/entity/Friend.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/src/main/java/io/spine/server/entity/Friend.java b/server/src/main/java/io/spine/server/entity/Friend.java index a2f6f72f06c..de56f15cb64 100644 --- a/server/src/main/java/io/spine/server/entity/Friend.java +++ b/server/src/main/java/io/spine/server/entity/Friend.java @@ -38,8 +38,10 @@ public @interface Friend { /** - * Enumerates classes of command-handling entities that can load the state of - * the annotated entity. + * Enumerates classes of command-handling entities, such as + * {@link io.spine.server.aggregate.Aggregate Aggregate} or + * {@link io.spine.server.procman.ProcessManager ProcessManager}, + * that can load the state of the annotated entity. */ Class>[] entity(); } From 61d4c24cff8ffc6614089fb204ae13fa6097fbca Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Thu, 16 Jul 2020 19:36:53 +0300 Subject: [PATCH 7/9] Update config --- buildSrc/build.gradle.kts | 4 +- .../gradle/internal/CheckVersionIncrement.kt | 31 +++++++++----- .../spine/gradle/internal/IncrementGuard.kt | 6 +-- .../io/spine/gradle/internal/RunBuild.kt | 6 ++- .../kotlin/io/spine/gradle/internal/deps.kt | 40 ++++++++++--------- config | 2 +- 6 files changed, 51 insertions(+), 38 deletions(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 7dc929afcaa..60e0fb21da7 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -19,9 +19,7 @@ */ plugins { - // Use Kotlin for `buildSrc`. - // https://kotlinlang.org/docs/reference/using-gradle.html#targeting-the-jvm - kotlin("jvm").version("1.3.72") + `kotlin-dsl` } repositories { diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/internal/CheckVersionIncrement.kt b/buildSrc/src/main/kotlin/io/spine/gradle/internal/CheckVersionIncrement.kt index 60709874e88..8f33cde905c 100644 --- a/buildSrc/src/main/kotlin/io/spine/gradle/internal/CheckVersionIncrement.kt +++ b/buildSrc/src/main/kotlin/io/spine/gradle/internal/CheckVersionIncrement.kt @@ -22,18 +22,19 @@ package io.spine.gradle.internal import com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES import com.fasterxml.jackson.dataformat.xml.XmlMapper +import org.gradle.api.DefaultTask import org.gradle.api.GradleException import org.gradle.api.Project -import org.gradle.api.internal.AbstractTask import org.gradle.api.tasks.Input import org.gradle.api.tasks.TaskAction +import java.io.FileNotFoundException import java.net.URL /** * A task which verifies that the current version of the library has not been published to the given * Maven repository yet. */ -open class CheckVersionIncrement : AbstractTask() { +open class CheckVersionIncrement : DefaultTask() { /** * The Maven repository in which to look for published artifacts. @@ -45,20 +46,20 @@ open class CheckVersionIncrement : AbstractTask() { lateinit var repository: Repository @Input - private val version: String = project.version as String + val version: String = project.version as String @TaskAction private fun fetchAndCheck() { val artifact = "${project.artifactPath()}/${MavenMetadata.FILE_NAME}" val repoUrl = repository.releases val metadata = fetch(repoUrl, artifact) - val versions = metadata.versioning.versions - val versionExists = versions.contains(version) + val versions = metadata?.versioning?.versions + val versionExists = versions?.contains(version) ?: false if (versionExists) { throw GradleException(""" Version `$version` is already published to maven repository `$repoUrl`. Try incrementing the library version. - All available versions are: ${versions.joinToString(separator = ", ")}. + All available versions are: ${versions?.joinToString(separator = ", ")}. To disable this check, run Gradle with `-x $name`. """.trimIndent() @@ -66,7 +67,7 @@ open class CheckVersionIncrement : AbstractTask() { } } - private fun fetch(repository: String, artifact: String): MavenMetadata { + private fun fetch(repository: String, artifact: String): MavenMetadata? { val url = URL("$repository/$artifact") return MavenMetadata.fetchAndParse(url) } @@ -94,9 +95,19 @@ private data class MavenMetadata(var versioning: Versioning = Versioning()) { mapper.configure(FAIL_ON_UNKNOWN_PROPERTIES, false) } - fun fetchAndParse(url: URL): MavenMetadata { - val metadata = mapper.readValue(url, MavenMetadata::class.java) - return metadata + /** + * Fetches the metadata for the repository and parses the document. + * + *

If the document could not be found, assumes that the module was never + * released and thus has no metadata. + */ + fun fetchAndParse(url: URL): MavenMetadata? { + return try { + val metadata = mapper.readValue(url, MavenMetadata::class.java) + metadata + } catch (e: FileNotFoundException) { + null + } } } } diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/internal/IncrementGuard.kt b/buildSrc/src/main/kotlin/io/spine/gradle/internal/IncrementGuard.kt index c227f49889f..39190d211d4 100644 --- a/buildSrc/src/main/kotlin/io/spine/gradle/internal/IncrementGuard.kt +++ b/buildSrc/src/main/kotlin/io/spine/gradle/internal/IncrementGuard.kt @@ -37,10 +37,10 @@ class IncrementGuard : Plugin { override fun apply(target: Project) { val tasks = target.tasks tasks.register(taskName, CheckVersionIncrement::class.java) { - it.repository = PublishingRepos.cloudRepo - tasks.getByName("check").dependsOn(it) + repository = PublishingRepos.cloudRepo + tasks.getByName("check").dependsOn(this) - it.shouldRunAfter("test") + shouldRunAfter("test") } } } diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/internal/RunBuild.kt b/buildSrc/src/main/kotlin/io/spine/gradle/internal/RunBuild.kt index c083ad952a9..48dd298ef5d 100644 --- a/buildSrc/src/main/kotlin/io/spine/gradle/internal/RunBuild.kt +++ b/buildSrc/src/main/kotlin/io/spine/gradle/internal/RunBuild.kt @@ -20,8 +20,9 @@ package io.spine.gradle.internal +import org.gradle.api.DefaultTask import org.gradle.api.GradleException -import org.gradle.api.internal.AbstractTask +import org.gradle.api.tasks.Internal import org.gradle.api.tasks.TaskAction import org.gradle.internal.os.OperatingSystem import java.io.File @@ -35,11 +36,12 @@ import java.io.File * The build writes verbose log into `$directory/build/debug-out.txt`. The error output is written * into `$directory/build/error-out.txt`. */ -open class RunBuild : AbstractTask() { +open class RunBuild : DefaultTask() { /** * Path to the directory which contains a Gradle wrapper script. */ + @Internal lateinit var directory: String @TaskAction diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/internal/deps.kt b/buildSrc/src/main/kotlin/io/spine/gradle/internal/deps.kt index 2636036af29..163234f79f4 100644 --- a/buildSrc/src/main/kotlin/io/spine/gradle/internal/deps.kt +++ b/buildSrc/src/main/kotlin/io/spine/gradle/internal/deps.kt @@ -70,8 +70,8 @@ object Versions { val checkerFramework = "3.3.0" val errorProne = "2.3.4" val errorProneJavac = "9+181-r4173-1" // taken from here: https://github.com/tbroyer/gradle-errorprone-plugin/blob/v0.8/build.gradle.kts - val errorPronePlugin = "1.1.1" - val pmd = "6.20.0" + val errorPronePlugin = "1.2.1" + val pmd = "6.24.0" val checkstyle = "8.29" val protobufPlugin = "0.8.12" val appengineApi = "1.9.79" @@ -94,14 +94,15 @@ object Versions { val javaPoet = "1.12.1" val autoService = "1.0-rc6" val autoCommon = "0.10" - val jackson = "2.9.10.4" + val jackson = "2.9.10.5" val animalSniffer = "1.18" val apiguardian = "1.1.0" + val javaxAnnotation = "1.3.2" /** * Version of the SLF4J library. * - * Spine used to log with SLF4J. Now we use Flogger. Whenever a coice comes up, we recommend to + * Spine used to log with SLF4J. Now we use Flogger. Whenever a choice comes up, we recommend to * use the latter. * * Some third-party libraries may clash with different versions of the library. Thus, we specify @@ -163,7 +164,8 @@ object Build { } object Gen { - val javaPoet = "com.squareup:javapoet:${Versions.javaPoet}" + val javaPoet = "com.squareup:javapoet:${Versions.javaPoet}" + val javaxAnnotation = "javax.annotation:javax.annotation-api:${Versions.javaxAnnotation}" } object Grpc { @@ -227,7 +229,7 @@ object Test { "com.google.truth.extensions:truth-proto-extension:${Versions.truth}" ) @Deprecated("Use Flogger over SLF4J.", - replaceWith = ReplaceWith("Deps.runtime.floggerSystemBackend")) + replaceWith = ReplaceWith("Deps.runtime.floggerSystemBackend")) @Suppress("DEPRECATION") // Version of SLF4J. val slf4j = "org.slf4j:slf4j-jdk14:${Versions.slf4j}" } @@ -278,12 +280,12 @@ object Deps { object DependencyResolution { fun forceConfiguration(configurations: ConfigurationContainer) { - configurations.all { config -> - config.resolutionStrategy { strategy -> - strategy.failOnVersionConflict() - strategy.cacheChangingModulesFor(0, "seconds") + configurations.all { + resolutionStrategy { + failOnVersionConflict() + cacheChangingModulesFor(0, "seconds") @Suppress("DEPRECATION") // Force SLF4J version. - strategy.force( + force( Deps.build.slf4j, Deps.build.errorProneAnnotations, Deps.build.jsr305Annotations, @@ -329,17 +331,17 @@ object DependencyResolution { fun defaultRepositories(repositories: RepositoryHandler) { repositories.mavenLocal() - repositories.maven { repository -> - repository.url = URI(Repos.spine) - repository.content { descriptor -> - descriptor.includeGroup("io.spine") - descriptor.includeGroup("io.spine.tools") - descriptor.includeGroup("io.spine.gcloud") + repositories.maven { + url = URI(Repos.spine) + content { + includeGroup("io.spine") + includeGroup("io.spine.tools") + includeGroup("io.spine.gcloud") } } repositories.jcenter() - repositories.maven { repository -> - repository.url = URI(Repos.gradlePlugins) + repositories.maven { + url = URI(Repos.gradlePlugins) } } } diff --git a/config b/config index 47048aed2a2..aaaa4f34d02 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit 47048aed2a242a17c959577515b0548eb58fb984 +Subproject commit aaaa4f34d02e466b54257eac3f48eb02edb6e892 From 678f8a9f53388db825d2d5fe123c873b808dced6 Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Fri, 7 Aug 2020 17:20:50 +0300 Subject: [PATCH 8/9] Update dependency reports --- license-report.md | 43 +++++++++++++++++++++++++++---------------- pom.xml | 22 +++++++++++----------- 2 files changed, 38 insertions(+), 27 deletions(-) diff --git a/license-report.md b/license-report.md index f5a2b03bc0a..f19dba5580b 100644 --- a/license-report.md +++ b/license-report.md @@ -1,6 +1,6 @@ -# Dependencies of `io.spine:spine-client:1.5.20` +# Dependencies of `io.spine:spine-client:2.0.0-alfa-001` ## Runtime 1. **Group:** com.google.android **Name:** annotations **Version:** 4.1.1.4 @@ -324,6 +324,7 @@ 1. **Group:** org.jacoco **Name:** org.jacoco.report **Version:** 0.8.5 * **POM License: Eclipse Public License 2.0** - [https://www.eclipse.org/legal/epl-2.0/](https://www.eclipse.org/legal/epl-2.0/) +1. **Group:** org.junit **Name:** junit-bom **Version:** 5.6.2 **No license information found** 1. **Group:** org.junit.jupiter **Name:** junit-jupiter-api **Version:** 5.6.2 * **POM Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **POM License: Eclipse Public License v2.0** - [https://www.eclipse.org/legal/epl-v20.html](https://www.eclipse.org/legal/epl-v20.html) @@ -405,12 +406,12 @@ The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Jun 19 14:07:39 EEST 2020** 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 **Fri Aug 07 17:07:07 EEST 2020** 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:spine-core:1.5.20` +# Dependencies of `io.spine:spine-core:2.0.0-alfa-001` ## Runtime 1. **Group:** com.google.code.findbugs **Name:** jsr305 **Version:** 3.0.2 @@ -694,6 +695,7 @@ This report was generated on **Fri Jun 19 14:07:39 EEST 2020** using [Gradle-Lic 1. **Group:** org.jacoco **Name:** org.jacoco.report **Version:** 0.8.5 * **POM License: Eclipse Public License 2.0** - [https://www.eclipse.org/legal/epl-2.0/](https://www.eclipse.org/legal/epl-2.0/) +1. **Group:** org.junit **Name:** junit-bom **Version:** 5.6.2 **No license information found** 1. **Group:** org.junit.jupiter **Name:** junit-jupiter-api **Version:** 5.6.2 * **POM Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **POM License: Eclipse Public License v2.0** - [https://www.eclipse.org/legal/epl-v20.html](https://www.eclipse.org/legal/epl-v20.html) @@ -775,12 +777,12 @@ This report was generated on **Fri Jun 19 14:07:39 EEST 2020** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Jun 19 14:07:40 EEST 2020** 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 **Fri Aug 07 17:07:07 EEST 2020** 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:spine-model-assembler:1.5.20` +# Dependencies of `io.spine.tools:spine-model-assembler:2.0.0-alfa-001` ## Runtime 1. **Group:** com.google.android **Name:** annotations **Version:** 4.1.1.4 @@ -1099,6 +1101,7 @@ This report was generated on **Fri Jun 19 14:07:40 EEST 2020** using [Gradle-Lic 1. **Group:** org.jacoco **Name:** org.jacoco.report **Version:** 0.8.5 * **POM License: Eclipse Public License 2.0** - [https://www.eclipse.org/legal/epl-2.0/](https://www.eclipse.org/legal/epl-2.0/) +1. **Group:** org.junit **Name:** junit-bom **Version:** 5.6.2 **No license information found** 1. **Group:** org.junit.jupiter **Name:** junit-jupiter-api **Version:** 5.6.2 * **POM Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **POM License: Eclipse Public License v2.0** - [https://www.eclipse.org/legal/epl-v20.html](https://www.eclipse.org/legal/epl-v20.html) @@ -1180,12 +1183,12 @@ This report was generated on **Fri Jun 19 14:07:40 EEST 2020** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Jun 19 14:07:40 EEST 2020** 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 **Fri Aug 07 17:07:08 EEST 2020** 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:spine-model-verifier:1.5.20` +# Dependencies of `io.spine.tools:spine-model-verifier:2.0.0-alfa-001` ## Runtime 1. **Group:** com.google.android **Name:** annotations **Version:** 4.1.1.4 @@ -1570,6 +1573,7 @@ This report was generated on **Fri Jun 19 14:07:40 EEST 2020** using [Gradle-Lic * **POM License: Eclipse Public License version 1.0** - [http://www.eclipse.org/legal/epl-v10.html](http://www.eclipse.org/legal/epl-v10.html) * **POM License: Public Domain** - [http://repository.jboss.org/licenses/cc0-1.0.txt](http://repository.jboss.org/licenses/cc0-1.0.txt) +1. **Group:** org.junit **Name:** junit-bom **Version:** 5.6.2 **No license information found** 1. **Group:** org.junit-pioneer **Name:** junit-pioneer **Version:** 0.4.2 * **POM Project URL:** [https://github.com/junit-pioneer/junit-pioneer](https://github.com/junit-pioneer/junit-pioneer) * **POM License: The MIT License** - [https://github.com/junit-pioneer/junit-pioneer/blob/master/LICENSE](https://github.com/junit-pioneer/junit-pioneer/blob/master/LICENSE) @@ -1655,12 +1659,12 @@ This report was generated on **Fri Jun 19 14:07:40 EEST 2020** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Jun 19 14:07:41 EEST 2020** 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 **Fri Aug 07 17:07:11 EEST 2020** 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:spine-server:1.5.20` +# Dependencies of `io.spine:spine-server:2.0.0-alfa-001` ## Runtime 1. **Group:** com.google.android **Name:** annotations **Version:** 4.1.1.4 @@ -1996,6 +2000,7 @@ This report was generated on **Fri Jun 19 14:07:41 EEST 2020** using [Gradle-Lic 1. **Group:** org.jacoco **Name:** org.jacoco.report **Version:** 0.8.5 * **POM License: Eclipse Public License 2.0** - [https://www.eclipse.org/legal/epl-2.0/](https://www.eclipse.org/legal/epl-2.0/) +1. **Group:** org.junit **Name:** junit-bom **Version:** 5.6.2 **No license information found** 1. **Group:** org.junit.jupiter **Name:** junit-jupiter-api **Version:** 5.6.2 * **POM Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **POM License: Eclipse Public License v2.0** - [https://www.eclipse.org/legal/epl-v20.html](https://www.eclipse.org/legal/epl-v20.html) @@ -2077,12 +2082,12 @@ This report was generated on **Fri Jun 19 14:07:41 EEST 2020** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Jun 19 14:07:42 EEST 2020** 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 **Fri Aug 07 17:07:14 EEST 2020** 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:spine-testutil-client:1.5.20` +# Dependencies of `io.spine:spine-testutil-client:2.0.0-alfa-001` ## Runtime 1. **Group:** com.google.android **Name:** annotations **Version:** 4.1.1.4 @@ -2215,6 +2220,7 @@ This report was generated on **Fri Jun 19 14:07:42 EEST 2020** using [Gradle-Lic 1. **Group:** org.hamcrest **Name:** hamcrest-core **Version:** 1.3 * **POM License: New BSD License** - [http://www.opensource.org/licenses/bsd-license.php](http://www.opensource.org/licenses/bsd-license.php) +1. **Group:** org.junit **Name:** junit-bom **Version:** 5.6.2 **No license information found** 1. **Group:** org.junit.jupiter **Name:** junit-jupiter-api **Version:** 5.6.2 * **POM Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **POM License: Eclipse Public License v2.0** - [https://www.eclipse.org/legal/epl-v20.html](https://www.eclipse.org/legal/epl-v20.html) @@ -2454,6 +2460,7 @@ This report was generated on **Fri Jun 19 14:07:42 EEST 2020** using [Gradle-Lic 1. **Group:** org.jacoco **Name:** org.jacoco.report **Version:** 0.8.5 * **POM License: Eclipse Public License 2.0** - [https://www.eclipse.org/legal/epl-2.0/](https://www.eclipse.org/legal/epl-2.0/) +1. **Group:** org.junit **Name:** junit-bom **Version:** 5.6.2 **No license information found** 1. **Group:** org.junit.jupiter **Name:** junit-jupiter-api **Version:** 5.6.2 * **POM Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **POM License: Eclipse Public License v2.0** - [https://www.eclipse.org/legal/epl-v20.html](https://www.eclipse.org/legal/epl-v20.html) @@ -2535,12 +2542,12 @@ This report was generated on **Fri Jun 19 14:07:42 EEST 2020** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Jun 19 14:07:44 EEST 2020** 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 **Fri Aug 07 17:07:16 EEST 2020** 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:spine-testutil-core:1.5.20` +# Dependencies of `io.spine:spine-testutil-core:2.0.0-alfa-001` ## Runtime 1. **Group:** com.google.android **Name:** annotations **Version:** 4.1.1.4 @@ -2673,6 +2680,7 @@ This report was generated on **Fri Jun 19 14:07:44 EEST 2020** using [Gradle-Lic 1. **Group:** org.hamcrest **Name:** hamcrest-core **Version:** 1.3 * **POM License: New BSD License** - [http://www.opensource.org/licenses/bsd-license.php](http://www.opensource.org/licenses/bsd-license.php) +1. **Group:** org.junit **Name:** junit-bom **Version:** 5.6.2 **No license information found** 1. **Group:** org.junit.jupiter **Name:** junit-jupiter-api **Version:** 5.6.2 * **POM Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **POM License: Eclipse Public License v2.0** - [https://www.eclipse.org/legal/epl-v20.html](https://www.eclipse.org/legal/epl-v20.html) @@ -2920,6 +2928,7 @@ This report was generated on **Fri Jun 19 14:07:44 EEST 2020** using [Gradle-Lic 1. **Group:** org.jacoco **Name:** org.jacoco.report **Version:** 0.8.5 * **POM License: Eclipse Public License 2.0** - [https://www.eclipse.org/legal/epl-2.0/](https://www.eclipse.org/legal/epl-2.0/) +1. **Group:** org.junit **Name:** junit-bom **Version:** 5.6.2 **No license information found** 1. **Group:** org.junit.jupiter **Name:** junit-jupiter-api **Version:** 5.6.2 * **POM Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **POM License: Eclipse Public License v2.0** - [https://www.eclipse.org/legal/epl-v20.html](https://www.eclipse.org/legal/epl-v20.html) @@ -3001,12 +3010,12 @@ This report was generated on **Fri Jun 19 14:07:44 EEST 2020** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Jun 19 14:07:45 EEST 2020** 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 **Fri Aug 07 17:07:16 EEST 2020** 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:spine-testutil-server:1.5.20` +# Dependencies of `io.spine:spine-testutil-server:2.0.0-alfa-001` ## Runtime 1. **Group:** com.google.android **Name:** annotations **Version:** 4.1.1.4 @@ -3139,6 +3148,7 @@ This report was generated on **Fri Jun 19 14:07:45 EEST 2020** using [Gradle-Lic 1. **Group:** org.hamcrest **Name:** hamcrest-core **Version:** 1.3 * **POM License: New BSD License** - [http://www.opensource.org/licenses/bsd-license.php](http://www.opensource.org/licenses/bsd-license.php) +1. **Group:** org.junit **Name:** junit-bom **Version:** 5.6.2 **No license information found** 1. **Group:** org.junit.jupiter **Name:** junit-jupiter-api **Version:** 5.6.2 * **POM Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **POM License: Eclipse Public License v2.0** - [https://www.eclipse.org/legal/epl-v20.html](https://www.eclipse.org/legal/epl-v20.html) @@ -3422,6 +3432,7 @@ This report was generated on **Fri Jun 19 14:07:45 EEST 2020** using [Gradle-Lic 1. **Group:** org.jacoco **Name:** org.jacoco.report **Version:** 0.8.5 * **POM License: Eclipse Public License 2.0** - [https://www.eclipse.org/legal/epl-2.0/](https://www.eclipse.org/legal/epl-2.0/) +1. **Group:** org.junit **Name:** junit-bom **Version:** 5.6.2 **No license information found** 1. **Group:** org.junit.jupiter **Name:** junit-jupiter-api **Version:** 5.6.2 * **POM Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **POM License: Eclipse Public License v2.0** - [https://www.eclipse.org/legal/epl-v20.html](https://www.eclipse.org/legal/epl-v20.html) @@ -3503,4 +3514,4 @@ This report was generated on **Fri Jun 19 14:07:45 EEST 2020** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Jun 19 14:07:48 EEST 2020** 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 **Fri Aug 07 17:07:21 EEST 2020** 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 886cc359469..77cf3022d2d 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ all modules and does not describe the project structure per-subproject. io.spine spine-core-java -1.5.21 +2.0.0-alfa-001 2015 @@ -70,25 +70,25 @@ all modules and does not describe the project structure per-subproject. io.spine spine-base - 1.5.19 + 1.5.21 compile io.spine spine-time - 1.5.19 + 1.5.21 compile io.spine.tools spine-model-compiler - 1.5.19 + 1.5.21 compile io.spine.tools spine-plugin-base - 1.5.19 + 1.5.21 compile @@ -130,25 +130,25 @@ all modules and does not describe the project structure per-subproject. io.spine spine-testlib - 1.5.19 + 1.5.21 test io.spine spine-testutil-time - 1.5.19 + 1.5.21 test io.spine.tools spine-mute-logging - 1.5.19 + 1.5.21 test io.spine.tools spine-plugin-testlib - 1.5.19 + 1.5.21 test @@ -204,12 +204,12 @@ all modules and does not describe the project structure per-subproject. io.spine.tools spine-javadoc-filter - 1.5.19 + 1.5.21 io.spine.tools spine-protoc-plugin - 1.5.19 + 1.5.21 net.sourceforge.pmd From 8f20ffe5beb7dda569bd489087a44ec0463d52ce Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Fri, 7 Aug 2020 17:21:22 +0300 Subject: [PATCH 9/9] Update config --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index aaaa4f34d02..c4ce66e250b 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit aaaa4f34d02e466b54257eac3f48eb02edb6e892 +Subproject commit c4ce66e250bbb86f2d17baea67a35a2452e0e10d