From 086396463e9eec2e67e245acb7bc3c4f04d19dcf Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Fri, 2 Jun 2023 18:43:59 +0100 Subject: [PATCH 1/2] Bump version -> `2.0.0-SNAPSHOT.131` --- license-report.md | 12 ++++++------ pom.xml | 2 +- version.gradle.kts | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/license-report.md b/license-report.md index c885c4bac..e5323c653 100644 --- a/license-report.md +++ b/license-report.md @@ -1,6 +1,6 @@ -# Dependencies of `io.spine.tools:spine-testutil-time:2.0.0-SNAPSHOT.130` +# Dependencies of `io.spine.tools:spine-testutil-time:2.0.0-SNAPSHOT.131` ## Runtime 1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2. @@ -780,12 +780,12 @@ The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Jun 02 16:56:40 WEST 2023** 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 Jun 02 18:42:11 WEST 2023** 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-time:2.0.0-SNAPSHOT.130` +# Dependencies of `io.spine:spine-time:2.0.0-SNAPSHOT.131` ## Runtime 1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2. @@ -1638,12 +1638,12 @@ This report was generated on **Fri Jun 02 16:56:40 WEST 2023** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Jun 02 16:56:40 WEST 2023** 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 Jun 02 18:42:27 WEST 2023** 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-time-js:2.0.0-SNAPSHOT.130` +# Dependencies of `io.spine:spine-time-js:2.0.0-SNAPSHOT.131` ## Runtime 1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2. @@ -1816,4 +1816,4 @@ This report was generated on **Fri Jun 02 16:56:40 WEST 2023** using [Gradle-Lic The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Fri Jun 02 16:56:40 WEST 2023** 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 Jun 02 18:42:28 WEST 2023** 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 f49c68f0d..8c0e76492 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ all modules and does not describe the project structure per-subproject. --> io.spine spine-time -2.0.0-SNAPSHOT.130 +2.0.0-SNAPSHOT.131 2015 diff --git a/version.gradle.kts b/version.gradle.kts index 5026b919a..8e75d378d 100644 --- a/version.gradle.kts +++ b/version.gradle.kts @@ -29,4 +29,4 @@ * * For dependencies on Spine modules please see [io.spine.internal.dependency.Spine]. */ -val versionToPublish by extra("2.0.0-SNAPSHOT.130") +val versionToPublish by extra("2.0.0-SNAPSHOT.131") From d6bfb1ca920efc4b710958540c4d30d2202562e7 Mon Sep 17 00:00:00 2001 From: alexander-yevsyukov Date: Fri, 2 Jun 2023 18:52:11 +0100 Subject: [PATCH 2/2] Remove generated vanilla code before packing --- time/build.gradle.kts | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/time/build.gradle.kts b/time/build.gradle.kts index 0fc3cd74a..607856bc8 100644 --- a/time/build.gradle.kts +++ b/time/build.gradle.kts @@ -28,7 +28,7 @@ import io.spine.internal.dependency.AutoService import io.spine.internal.dependency.Spine import io.spine.internal.dependency.Validation import io.spine.internal.gradle.publish.IncrementGuard -import io.spine.tools.mc.gradle.modelCompiler +import org.gradle.jvm.tasks.Jar plugins { protobuf @@ -70,3 +70,28 @@ protoData { "io.spine.validation.ValidationPlugin", ) } + +/** + * Forcibly remove the code by `protoc` under the `build` directory + * until ProtoData can handle it by itself. + * + * The generated code is transferred by ProtoData into `$projectDir/generated` while it + * processes it. But ProtoData does not handle the Gradle model fully yet. That's why we have the + * build error because of the duplicated source code files are attempted to be packed + * into a source code JAR. + * + * We should not set the `DuplicatesStrategy.INCLUDE` as we did before, because it will + * lead to accidental removal of the generated code added by McJava (and ProtoData) into + * the vanilla Protobuf Java sources. + * + * Therefore, the `Jar` tasks are configured to depend on `removeGeneratedVanillaCode`. + */ +val removeGeneratedVanillaCode by tasks.registering(Delete::class) { + delete("$buildDir/generated/source/proto") +} + +tasks { + withType().configureEach { + dependsOn(removeGeneratedVanillaCode) + } +}