This insertion point is conventional for the runner scripts for the Spine protoc plugin. - * - *
Before the runner script is published, the version must be injected into it. - * - *
The standard Grade filtering mechanism (involving the Copy task) cannot be used in this case - * since the injection should be performed on the configuration stage. - * - * @param scriptFile the script file to modify - * @return the new script file to publish - */ -fun injectVersion(scriptFile: File): File { - var text = scriptFile.readText() - text = text.replace("{version}", project.version as String) - val extension = when { - scriptFile.name.endsWith(".sh") -> ".sh" - else -> ".bat" - } - val tempFile = Files.createTempFile("build", extension) - tempFile.toFile().writeText(text) - return project.file(tempFile.toAbsolutePath()) -} diff --git a/tools/protoc-plugin/plugin_runner.bat b/tools/protoc-plugin/plugin_runner.bat deleted file mode 100644 index 2f0c10d197..0000000000 --- a/tools/protoc-plugin/plugin_runner.bat +++ /dev/null @@ -1,3 +0,0 @@ -@echo off - -java -jar ./.spine/spine-protoc-plugin-{version}.jar diff --git a/tools/protoc-plugin/plugin_runner.sh b/tools/protoc-plugin/plugin_runner.sh deleted file mode 100644 index 777a998c02..0000000000 --- a/tools/protoc-plugin/plugin_runner.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -CURRENT_DIR="$(pwd)" - -java -jar "${CURRENT_DIR}"/.spine/spine-protoc-plugin-{version}.jar diff --git a/tools/smoke-tests/buildSrc/src/main/kotlin/io/spine/gradle/internal/deps.kt b/tools/smoke-tests/buildSrc/src/main/kotlin/io/spine/gradle/internal/deps.kt index 163234f79f..3e9250e751 100644 --- a/tools/smoke-tests/buildSrc/src/main/kotlin/io/spine/gradle/internal/deps.kt +++ b/tools/smoke-tests/buildSrc/src/main/kotlin/io/spine/gradle/internal/deps.kt @@ -98,6 +98,10 @@ object Versions { val animalSniffer = "1.18" val apiguardian = "1.1.0" val javaxAnnotation = "1.3.2" + val klaxon = "5.4" + val ouathJwt = "3.10.3" + val bouncyCastlePkcs = "1.66" + val assertK = "0.22" /** * Version of the SLF4J library. @@ -159,7 +163,7 @@ object Build { object AutoService { val annotations = "com.google.auto.service:auto-service-annotations:${Versions.autoService}" - val processor = "com.google.auto.service:auto-service:${Versions.autoService}" + val processor = "com.google.auto.service:auto-service:${Versions.autoService}" } } @@ -168,6 +172,13 @@ object Gen { val javaxAnnotation = "javax.annotation:javax.annotation-api:${Versions.javaxAnnotation}" } +object Publishing { + val klaxon = "com.beust:klaxon:${Versions.klaxon}" + val oauthJwt = "com.auth0:java-jwt:${Versions.ouathJwt}" + val bouncyCastlePkcs = "org.bouncycastle:bcpkix-jdk15on:${Versions.bouncyCastlePkcs}" + val assertK = "com.willowtreeapps.assertk:assertk-jvm:${Versions.assertK}" +} + object Grpc { val core = "io.grpc:grpc-core:${Versions.grpc}" val stub = "io.grpc:grpc-stub:${Versions.grpc}" @@ -275,6 +286,7 @@ object Deps { val test = Test val versions = Versions val scripts = Scripts + val publishing = Publishing } object DependencyResolution { diff --git a/version.gradle.kts b/version.gradle.kts index 56669201bd..8609a1d222 100644 --- a/version.gradle.kts +++ b/version.gradle.kts @@ -25,7 +25,7 @@ * as we want to manage the versions in a single source. */ -val SPINE_VERSION = "1.5.26" +val SPINE_VERSION = "1.5.27" project.extra.apply { this["spineVersion"] = SPINE_VERSION