From c0b611acffe341dbda1ef8df82177cfaf7efdbc5 Mon Sep 17 00:00:00 2001 From: Dmytro Dashenkov Date: Tue, 2 Jun 2020 17:33:03 +0300 Subject: [PATCH 01/12] Update config --- buildSrc/build.gradle.kts | 36 ++ .../gradle/internal/CheckVersionIncrement.kt | 104 ++++++ .../spine/gradle/internal/IncrementGuard.kt | 46 +++ .../io/spine/gradle/internal/RunBuild.kt | 90 +++++ .../kotlin/io/spine/gradle/internal/deps.kt | 345 ++++++++++++++++++ config | 2 +- 6 files changed, 622 insertions(+), 1 deletion(-) create mode 100644 buildSrc/build.gradle.kts create mode 100644 buildSrc/src/main/kotlin/io/spine/gradle/internal/CheckVersionIncrement.kt create mode 100644 buildSrc/src/main/kotlin/io/spine/gradle/internal/IncrementGuard.kt create mode 100644 buildSrc/src/main/kotlin/io/spine/gradle/internal/RunBuild.kt create mode 100644 buildSrc/src/main/kotlin/io/spine/gradle/internal/deps.kt diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts new file mode 100644 index 00000000..7dc929af --- /dev/null +++ b/buildSrc/build.gradle.kts @@ -0,0 +1,36 @@ +/* + * 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. + */ + +plugins { + // Use Kotlin for `buildSrc`. + // https://kotlinlang.org/docs/reference/using-gradle.html#targeting-the-jvm + kotlin("jvm").version("1.3.72") +} + +repositories { + mavenLocal() + jcenter() +} + +val jacksonVersion = "2.11.0" + +dependencies { + implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jacksonVersion") +} diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/internal/CheckVersionIncrement.kt b/buildSrc/src/main/kotlin/io/spine/gradle/internal/CheckVersionIncrement.kt new file mode 100644 index 00000000..60709874 --- /dev/null +++ b/buildSrc/src/main/kotlin/io/spine/gradle/internal/CheckVersionIncrement.kt @@ -0,0 +1,104 @@ +/* + * 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.gradle.internal + +import com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES +import com.fasterxml.jackson.dataformat.xml.XmlMapper +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.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() { + + /** + * The Maven repository in which to look for published artifacts. + * + * We only check the `releases` repository. Artifacts in `snapshots` repository still may be + * overridden. + */ + @Input + lateinit var repository: Repository + + @Input + private 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) + 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 = ", ")}. + + To disable this check, run Gradle with `-x $name`. + """.trimIndent() + ) + } + } + + private fun fetch(repository: String, artifact: String): MavenMetadata { + val url = URL("$repository/$artifact") + return MavenMetadata.fetchAndParse(url) + } + + private fun Project.artifactPath(): String { + val group = this.group as String + val name = "spine-${this.name}" + + val pathElements = ArrayList(group.split('.')) + pathElements.add(name) + val path = pathElements.joinToString(separator = "/") + return path + } +} + +private data class MavenMetadata(var versioning: Versioning = Versioning()) { + + companion object { + + const val FILE_NAME = "maven-metadata.xml" + + private val mapper = XmlMapper() + + init { + mapper.configure(FAIL_ON_UNKNOWN_PROPERTIES, false) + } + + fun fetchAndParse(url: URL): MavenMetadata { + val metadata = mapper.readValue(url, MavenMetadata::class.java) + return metadata + } + } +} + +private data class Versioning(var versions: List = listOf()) diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/internal/IncrementGuard.kt b/buildSrc/src/main/kotlin/io/spine/gradle/internal/IncrementGuard.kt new file mode 100644 index 00000000..c227f498 --- /dev/null +++ b/buildSrc/src/main/kotlin/io/spine/gradle/internal/IncrementGuard.kt @@ -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.gradle.internal + +import org.gradle.api.Plugin +import org.gradle.api.Project + +/** + * Gradle plugin which adds a [CheckVersionIncrement] task. + * + * The task is called `checkVersionIncrement` inserted before the `check` task. + */ +class IncrementGuard : Plugin { + + companion object { + const val taskName = "checkVersionIncrement" + } + + override fun apply(target: Project) { + val tasks = target.tasks + tasks.register(taskName, CheckVersionIncrement::class.java) { + it.repository = PublishingRepos.cloudRepo + tasks.getByName("check").dependsOn(it) + + it.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 new file mode 100644 index 00000000..c083ad95 --- /dev/null +++ b/buildSrc/src/main/kotlin/io/spine/gradle/internal/RunBuild.kt @@ -0,0 +1,90 @@ +/* + * 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.gradle.internal + +import org.gradle.api.GradleException +import org.gradle.api.internal.AbstractTask +import org.gradle.api.tasks.TaskAction +import org.gradle.internal.os.OperatingSystem +import java.io.File + +/** + * A Gradle task which runs another Gradle build. + * + * Launches Gradle wrapper under a given [directory] with the `build` task. The `clean` task is also + * run if current build includes a `clean` task. + * + * 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() { + + /** + * Path to the directory which contains a Gradle wrapper script. + */ + lateinit var directory: String + + @TaskAction + private fun execute() { + val runsOnWindows = OperatingSystem.current().isWindows() + val script = if (runsOnWindows) "gradlew.bat" else "gradlew" + val command = buildCommand(script) + + // Ensure build error output log. + // Since we're executing this task in another process, we redirect error output to + // the file under the `build` directory. + val buildDir = File(directory, "build") + if (!buildDir.exists()) { + buildDir.mkdir() + } + val errorOut = File(buildDir, "error-out.txt") + val debugOut = File(buildDir, "debug-out.txt") + + val process = buildProcess(command, errorOut, debugOut) + if (process.waitFor() != 0) { + throw GradleException("Build FAILED. See $errorOut for details.") + } + } + + private fun buildCommand(script: String): List { + val command = mutableListOf() + command.add("${project.rootDir}/$script") + val shouldClean = project.gradle + .taskGraph + .hasTask(":clean") + if (shouldClean) { + command.add("clean") + } + command.add("build") + command.add("--console=plain") + command.add("--debug") + command.add("--stacktrace") + return command + } + + private fun buildProcess(command: List, errorOut: File, debugOut: File) = + ProcessBuilder() + .command(command) + .directory(project.file(directory)) + .redirectError(errorOut) + .redirectOutput(debugOut) + .start() +} diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/internal/deps.kt b/buildSrc/src/main/kotlin/io/spine/gradle/internal/deps.kt new file mode 100644 index 00000000..2636036a --- /dev/null +++ b/buildSrc/src/main/kotlin/io/spine/gradle/internal/deps.kt @@ -0,0 +1,345 @@ +/* + * 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.gradle.internal + +import org.gradle.api.Project +import org.gradle.api.artifacts.ConfigurationContainer +import org.gradle.api.artifacts.dsl.RepositoryHandler +import java.net.URI + +/* + * This file describes shared dependencies of Spine sub-projects. + * + * Inspired by dependency management of the Uber's NullAway project: + * https://github.com/uber/NullAway/blob/master/gradle/dependencies.gradle + */ + +data class Repository(val releases: String, + val snapshots: String, + val credentials: String) + +/** + * Repositories to which we may publish. Normally, only one repository will be used. + * + * See `publish.gradle` for details of the publishing process. + */ +object PublishingRepos { + val mavenTeamDev = Repository( + releases = "http://maven.teamdev.com/repository/spine", + snapshots = "http://maven.teamdev.com/repository/spine-snapshots", + credentials = "credentials.properties" + ) + val cloudRepo = Repository( + releases = "https://spine.mycloudrepo.io/public/repositories/releases", + snapshots = "https://spine.mycloudrepo.io/public/repositories/snapshots", + credentials = "cloudrepo.properties" + ) +} + +// Specific repositories. +object Repos { + val oldSpine: String = PublishingRepos.mavenTeamDev.releases + val oldSpineSnapshots: String = PublishingRepos.mavenTeamDev.snapshots + + val spine: String = PublishingRepos.cloudRepo.releases + val spineSnapshots: String = PublishingRepos.cloudRepo.snapshots + + val sonatypeSnapshots: String = "https://oss.sonatype.org/content/repositories/snapshots" + val gradlePlugins = "https://plugins.gradle.org/m2/" +} + +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 checkstyle = "8.29" + val protobufPlugin = "0.8.12" + val appengineApi = "1.9.79" + val appenginePlugin = "2.2.0" + val findBugs = "3.0.2" + val guava = "29.0-jre" + val protobuf = "3.11.4" + val grpc = "1.28.1" + val flogger = "0.5.1" + val junit4 = "4.12" + val junit5 = "5.6.2" + val junitPlatform = "1.6.2" + val junitPioneer = "0.4.2" + val truth = "1.0.1" + val httpClient = "1.34.2" + val apacheHttpClient = "2.1.2" + val firebaseAdmin = "6.12.2" + val roaster = "2.21.2.Final" + val licensePlugin = "1.13" + val javaPoet = "1.12.1" + val autoService = "1.0-rc6" + val autoCommon = "0.10" + val jackson = "2.9.10.4" + val animalSniffer = "1.18" + val apiguardian = "1.1.0" + + /** + * Version of the SLF4J library. + * + * Spine used to log with SLF4J. Now we use Flogger. Whenever a coice comes up, we recommend to + * use the latter. + * + * Some third-party libraries may clash with different versions of the library. Thus, we specify + * this version and force it via [forceConfiguration(..)][DependencyResolution.forceConfiguration]. + */ + @Deprecated("Use Flogger over SLF4J.", replaceWith = ReplaceWith("flogger")) + val slf4j = "1.7.29" +} + +object GradlePlugins { + val errorProne = "net.ltgt.gradle:gradle-errorprone-plugin:${Versions.errorPronePlugin}" + val protobuf = "com.google.protobuf:protobuf-gradle-plugin:${Versions.protobufPlugin}" + val appengine = "com.google.cloud.tools:appengine-gradle-plugin:${Versions.appenginePlugin}" + val licenseReport = "com.github.jk1:gradle-license-report:${Versions.licensePlugin}" +} + +object Build { + val errorProneJavac = "com.google.errorprone:javac:${Versions.errorProneJavac}" + val errorProneAnnotations = listOf( + "com.google.errorprone:error_prone_annotations:${Versions.errorProne}", + "com.google.errorprone:error_prone_type_annotations:${Versions.errorProne}" + ) + val errorProneCheckApi = "com.google.errorprone:error_prone_check_api:${Versions.errorProne}" + val errorProneCore = "com.google.errorprone:error_prone_core:${Versions.errorProne}" + val errorProneTestHelpers = "com.google.errorprone:error_prone_test_helpers:${Versions.errorProne}" + val checkerAnnotations = "org.checkerframework:checker-qual:${Versions.checkerFramework}" + val checkerDataflow = listOf( + "org.checkerframework:dataflow:${Versions.checkerFramework}", + "org.checkerframework:javacutil:${Versions.checkerFramework}" + ) + val autoCommon = "com.google.auto:auto-common:${Versions.autoCommon}" + val autoService = AutoService + val jsr305Annotations = "com.google.code.findbugs:jsr305:${Versions.findBugs}" + val guava = "com.google.guava:guava:${Versions.guava}" + val flogger = "com.google.flogger:flogger:${Versions.flogger}" + val protobuf = listOf( + "com.google.protobuf:protobuf-java:${Versions.protobuf}", + "com.google.protobuf:protobuf-java-util:${Versions.protobuf}" + ) + val protoc = "com.google.protobuf:protoc:${Versions.protobuf}" + val googleHttpClient = "com.google.http-client:google-http-client:${Versions.httpClient}" + val googleHttpClientApache = "com.google.http-client:google-http-client-apache:${Versions.apacheHttpClient}" + val appengineApi = "com.google.appengine:appengine-api-1.0-sdk:${Versions.appengineApi}" + val firebaseAdmin = "com.google.firebase:firebase-admin:${Versions.firebaseAdmin}" + val jacksonDatabind = "com.fasterxml.jackson.core:jackson-databind:${Versions.jackson}" + val roasterApi = "org.jboss.forge.roaster:roaster-api:${Versions.roaster}" + val roasterJdt = "org.jboss.forge.roaster:roaster-jdt:${Versions.roaster}" + val animalSniffer = "org.codehaus.mojo:animal-sniffer-annotations:${Versions.animalSniffer}" + val ci = "true".equals(System.getenv("CI")) + val gradlePlugins = GradlePlugins + @Deprecated("Use Flogger over SLF4J.", replaceWith = ReplaceWith("flogger")) + @Suppress("DEPRECATION") // Version of SLF4J. + val slf4j = "org.slf4j:slf4j-api:${Versions.slf4j}" + + object AutoService { + val annotations = "com.google.auto.service:auto-service-annotations:${Versions.autoService}" + val processor = "com.google.auto.service:auto-service:${Versions.autoService}" + } +} + +object Gen { + val javaPoet = "com.squareup:javapoet:${Versions.javaPoet}" +} + +object Grpc { + val core = "io.grpc:grpc-core:${Versions.grpc}" + val stub = "io.grpc:grpc-stub:${Versions.grpc}" + val okHttp = "io.grpc:grpc-okhttp:${Versions.grpc}" + val protobuf = "io.grpc:grpc-protobuf:${Versions.grpc}" + val netty = "io.grpc:grpc-netty:${Versions.grpc}" + val nettyShaded = "io.grpc:grpc-netty-shaded:${Versions.grpc}" + val context = "io.grpc:grpc-context:${Versions.grpc}" + + @Deprecated("Use the shorter form.", replaceWith = ReplaceWith("core")) + val grpcCore = core + @Deprecated("Use the shorter form.", replaceWith = ReplaceWith("stub")) + val grpcStub = stub + @Deprecated("Use the shorter form.", replaceWith = ReplaceWith("okHttp")) + val grpcOkHttp = okHttp + @Deprecated("Use the shorter form.", replaceWith = ReplaceWith("protobuf")) + val grpcProtobuf = protobuf + @Deprecated("Use the shorter form.", replaceWith = ReplaceWith("netty")) + val grpcNetty = netty + @Deprecated("Use the shorter form.", replaceWith = ReplaceWith("nettyShaded")) + val grpcNettyShaded = nettyShaded + @Deprecated("Use the shorter form.", replaceWith = ReplaceWith("context")) + val grpcContext = context +} + +object Runtime { + + val flogger = Flogger + + object Flogger { + val systemBackend = "com.google.flogger:flogger-system-backend:${Versions.flogger}" + val log4J = "com.google.flogger:flogger-log4j:${Versions.flogger}" + val slf4J = "com.google.flogger:slf4j-backend-factory:${Versions.flogger}" + } + + @Deprecated("Use the `flogger` object.", replaceWith = ReplaceWith("flogger.systemBackend")) + val floggerSystemBackend = flogger.systemBackend + @Deprecated("Use the `flogger` object.", replaceWith = ReplaceWith("flogger.log4J")) + val floggerLog4J = flogger.log4J + @Deprecated("Use the `flogger` object.", replaceWith = ReplaceWith("flogger.slf4J")) + val floggerSlf4J = flogger.slf4J +} + +object Test { + val junit4 = "junit:junit:${Versions.junit4}" + val junit5Api = listOf( + "org.junit.jupiter:junit-jupiter-api:${Versions.junit5}", + "org.junit.jupiter:junit-jupiter-params:${Versions.junit5}", + "org.apiguardian:apiguardian-api:${Versions.apiguardian}" + ) + val junit5Runner = "org.junit.jupiter:junit-jupiter-engine:${Versions.junit5}" + val junitPioneer = "org.junit-pioneer:junit-pioneer:${Versions.junitPioneer}" + val guavaTestlib = "com.google.guava:guava-testlib:${Versions.guava}" + val mockito = "org.mockito:mockito-core:2.12.0" + val hamcrest = "org.hamcrest:hamcrest-all:1.3" + val truth = listOf( + "com.google.truth:truth:${Versions.truth}", + "com.google.truth.extensions:truth-java8-extension:${Versions.truth}", + "com.google.truth.extensions:truth-proto-extension:${Versions.truth}" + ) + @Deprecated("Use Flogger over SLF4J.", + replaceWith = ReplaceWith("Deps.runtime.floggerSystemBackend")) + @Suppress("DEPRECATION") // Version of SLF4J. + val slf4j = "org.slf4j:slf4j-jdk14:${Versions.slf4j}" +} + +object Scripts { + + private const val COMMON_PATH = "/config/gradle/" + + fun testArtifacts(p: Project) = p.script("test-artifacts.gradle") + fun testOutput(p: Project) = p.script("test-output.gradle") + fun slowTests(p: Project) = p.script("slow-tests.gradle") + fun javadocOptions(p: Project) = p.script("javadoc-options.gradle") + fun filterInternalJavadocs(p: Project) = p.script("filter-internal-javadoc.gradle") + fun jacoco(p: Project) = p.script("jacoco.gradle") + fun publish(p: Project) = p.script("publish.gradle") + fun publishProto(p: Project) = p.script("publish-proto.gradle") + fun javacArgs(p: Project) = p.script("javac-args.gradle") + fun jsBuildTasks(p: Project) = p.script("js/build-tasks.gradle") + fun jsConfigureProto(p: Project) = p.script("js/configure-proto.gradle") + fun npmPublishTasks(p: Project) = p.script("js/npm-publish-tasks.gradle") + fun npmCli(p: Project) = p.script("js/npm-cli.gradle") + fun updatePackageVersion(p: Project) = p.script("js/update-package-version.gradle") + fun dartBuildTasks(p: Project) = p.script("dart/build-tasks.gradle") + fun pubPublishTasks(p: Project) = p.script("dart/pub-publish-tasks.gradle") + fun pmd(p: Project) = p.script("pmd.gradle") + fun checkstyle(p: Project) = p.script("checkstyle.gradle") + fun runBuild(p: Project) = p.script("run-build.gradle") + fun modelCompiler(p: Project) = p.script("model-compiler.gradle") + fun licenseReportCommon(p: Project) = p.script("license-report-common.gradle") + fun projectLicenseReport(p: Project) = p.script("license-report-project.gradle") + fun repoLicenseReport(p: Project) = p.script("license-report-repo.gradle") + fun generatePom(p: Project) = p.script("generate-pom.gradle") + fun updateGitHubPages(p: Project) = p.script("update-gh-pages.gradle") + + private fun Project.script(name: String) = "${rootDir}$COMMON_PATH$name" +} + +object Deps { + val build = Build + val grpc = Grpc + val gen = Gen + val runtime = Runtime + val test = Test + val versions = Versions + val scripts = Scripts +} + +object DependencyResolution { + + fun forceConfiguration(configurations: ConfigurationContainer) { + configurations.all { config -> + config.resolutionStrategy { strategy -> + strategy.failOnVersionConflict() + strategy.cacheChangingModulesFor(0, "seconds") + @Suppress("DEPRECATION") // Force SLF4J version. + strategy.force( + Deps.build.slf4j, + Deps.build.errorProneAnnotations, + Deps.build.jsr305Annotations, + Deps.build.checkerAnnotations, + Deps.build.autoCommon, + Deps.build.guava, + Deps.build.animalSniffer, + Deps.build.protobuf, + Deps.test.guavaTestlib, + Deps.test.truth, + Deps.test.junit5Api, + Deps.test.junit4, + + // Transitive dependencies of 3rd party components that we don't use directly. + "com.google.code.gson:gson:2.8.6", + "com.google.j2objc:j2objc-annotations:1.3", + "org.codehaus.plexus:plexus-utils:3.3.0", + "com.squareup.okio:okio:1.17.5", // Last version before next major. + "commons-cli:commons-cli:1.4", + + // Force discontinued transitive dependency until everybody migrates off it. + "org.checkerframework:checker-compat-qual:2.5.5", + + "commons-logging:commons-logging:1.2", + + // Force the Gradle Protobuf plugin version. + Deps.build.gradlePlugins.protobuf + ) + } + } + } + + fun excludeProtobufLite(configurations: ConfigurationContainer) { + excludeProtoLite(configurations, "runtime") + excludeProtoLite(configurations, "testRuntime") + } + + private fun excludeProtoLite(configurations: ConfigurationContainer, + configurationName: String) { + configurations.named(configurationName).get() + .exclude(mapOf("group" to "com.google.protobuf", "module" to "protobuf-lite")) + } + + 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.jcenter() + repositories.maven { repository -> + repository.url = URI(Repos.gradlePlugins) + } + } +} diff --git a/config b/config index c1943fb8..d9223f98 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit c1943fb850638140a9cba78c16e7b7e9f96841ef +Subproject commit d9223f98f58cca6a6c91d3339f0fa6c366e3a00c From 0e22a2ca025d958893efe54f2cbe5d2b69b3ccbd Mon Sep 17 00:00:00 2001 From: Dmytro Dashenkov Date: Wed, 3 Jun 2020 14:49:08 +0300 Subject: [PATCH 02/12] Make script plugins precompiled --- .../main/kotlin/bootstrap-plugin.gradle.kts | 35 ++++++++ .../src/main/kotlin/func-test-env.gradle.kts | 36 +++++--- .../prepare-config-resources.gradle.kts | 87 +++++++++++++++++++ gradle/prepare-config-resources.gradle | 74 ---------------- 4 files changed, 144 insertions(+), 88 deletions(-) create mode 100644 buildSrc/src/main/kotlin/bootstrap-plugin.gradle.kts rename gradle/func-test-env.gradle => buildSrc/src/main/kotlin/func-test-env.gradle.kts (65%) create mode 100644 buildSrc/src/main/kotlin/prepare-config-resources.gradle.kts delete mode 100644 gradle/prepare-config-resources.gradle diff --git a/buildSrc/src/main/kotlin/bootstrap-plugin.gradle.kts b/buildSrc/src/main/kotlin/bootstrap-plugin.gradle.kts new file mode 100644 index 00000000..1a875f1f --- /dev/null +++ b/buildSrc/src/main/kotlin/bootstrap-plugin.gradle.kts @@ -0,0 +1,35 @@ +/* + * 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. + */ + +plugins { + java + `java-gradle-plugin` +} + +gradlePlugin { + plugins { + create("spineBootstrapPlugin") { + id = "io.spine.tools.gradle.bootstrap" + implementationClass = "io.spine.tools.gradle.bootstrap.BootstrapPlugin" + displayName = "Spine Bootstrap" + description = "Prepares a Gradle project for development on Spine." + } + } +} diff --git a/gradle/func-test-env.gradle b/buildSrc/src/main/kotlin/func-test-env.gradle.kts similarity index 65% rename from gradle/func-test-env.gradle rename to buildSrc/src/main/kotlin/func-test-env.gradle.kts index fbad83c2..b651eb10 100644 --- a/gradle/func-test-env.gradle +++ b/buildSrc/src/main/kotlin/func-test-env.gradle.kts @@ -18,7 +18,9 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -Dependency spineProtocPluginDependency = null +plugins { + base +} /* * Creates a configuration named `fetch`. @@ -26,33 +28,39 @@ Dependency spineProtocPluginDependency = null * The configuration is used in order to download artifacts. The artifacts are NOT added into * the application classpath. */ -configurations { fetch } +configurations { create("fetch") } + +val spineVersion: String by extra +val spineBaseVersion: String by extra +var spineProtocPluginDependency: Dependency? = null dependencies { - spineProtocPluginDependency = fetch("io.spine.tools:spine-protoc-plugin:${spineVersion}@jar") + spineProtocPluginDependency = "fetch"("io.spine.tools:spine-protoc-plugin:${spineBaseVersion}@jar") } -final File spineArtifactDir = file("$projectDir/.spine") +val spineArtifactDir = file("$projectDir/.spine") -project.task("downloadProtocPlugin") { - description = 'Downloads the Spine Protoc plugin for functional tests.' +val downloadProtocPlugin by tasks.registering { + description = "Downloads the Spine Protoc plugin for functional tests." doLast { - final File executableJar = configurations.fetch + val executableJar = configurations["fetch"] .fileCollection(spineProtocPluginDependency) .getSingleFile() spineArtifactDir.mkdirs() copy { - from executableJar - into spineArtifactDir + from(executableJar) + into(spineArtifactDir) } } - mustRunAfter project.clean - project.slowTest.dependsOn it - project.test.dependsOn it + mustRunAfter(tasks.clean) +} + +tasks.withType(Test::class) { + dependsOn(downloadProtocPlugin) } -project.clean { - delete += spineArtifactDir +tasks.clean { + delete(spineArtifactDir) } diff --git a/buildSrc/src/main/kotlin/prepare-config-resources.gradle.kts b/buildSrc/src/main/kotlin/prepare-config-resources.gradle.kts new file mode 100644 index 00000000..51ed1c35 --- /dev/null +++ b/buildSrc/src/main/kotlin/prepare-config-resources.gradle.kts @@ -0,0 +1,87 @@ +/* + * 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. + */ + +import io.spine.gradle.internal.Deps +import io.spine.gradle.internal.Repos +import java.util.Properties +import java.io.FileWriter + +plugins { + java +} + +val bootstrapDir = file("$buildDir/bootstrap") +val versionSnapshot = file("$bootstrapDir/artifact-snapshot.properties") +val configDir = file("$rootDir/config") + +sourceSets.main { + resources.srcDir(bootstrapDir) +} + +val taskGroup = "Spine bootstrapping" + +tasks.register("copyModelCompilerConfig", Copy::class) { + group = taskGroup + + from(file("$configDir/gradle/model-compiler.gradle")) + into(file(bootstrapDir)) + + tasks.processResources.get().dependsOn(this) + doFirst { + bootstrapDir.mkdirs() + } +} + +val spineVersion: String by extra + +tasks.register("writeDependencies") { + group = taskGroup + + inputs.dir(configDir) + inputs.property("version", spineVersion) + outputs.file(versionSnapshot) + + tasks.processResources.get().dependsOn(this) + + doFirst { + bootstrapDir.mkdirs() + if (!versionSnapshot.exists()) { + versionSnapshot.createNewFile() + } + } + + doLast { + val artifacts = Properties() + + artifacts.setProperty("spine.version", spineVersion) + artifacts.setProperty("protobuf.compiler", Deps.build.protoc) + artifacts.setProperty("protobuf.java", Deps.build.protobuf[0]) + artifacts.setProperty("grpc.stub", Deps.grpc.stub) + artifacts.setProperty("grpc.protobuf", Deps.grpc.protobuf) + artifacts.setProperty("repository.spine.release", Repos.spine) + artifacts.setProperty("repository.spine.snapshot", Repos.spineSnapshots) + + artifacts.store( + FileWriter(versionSnapshot), + "Dependencies and versions required by Spine." + ) + } +} + diff --git a/gradle/prepare-config-resources.gradle b/gradle/prepare-config-resources.gradle deleted file mode 100644 index ca05fe60..00000000 --- a/gradle/prepare-config-resources.gradle +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 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. - */ - -final File bootstrapDir = "$buildDir/bootstrap" as File -final File versionSnapshot = "$bootstrapDir/artifact-snapshot.properties" as File -final File configDir = "$rootDir/config" as File - -sourceSets.main.resources.srcDir(bootstrapDir) - -final String taskGroup = 'Spine bootstrapping' - -task copyModelCompilerConfig(type: Copy) { - it.group = taskGroup - - from file("$configDir/gradle/model-compiler.gradle") - into file(bootstrapDir) - - processResources.dependsOn it - - doFirst { - bootstrapDir.mkdirs() - } -} - -task writeDependencies { - it.group = taskGroup - - inputs.dir(configDir) - inputs.property('version', spineVersion) - outputs.file(versionSnapshot) - - processResources.dependsOn it - - doFirst { - bootstrapDir.mkdirs() - if (!versionSnapshot.exists()) { - versionSnapshot.createNewFile() - } - } - - doLast { - final Properties artifacts = new Properties() - - artifacts.setProperty('spine.version', spineVersion) - artifacts.setProperty('protobuf.compiler', deps.build.protoc) - artifacts.setProperty('protobuf.java', deps.build.protobuf[0]) - artifacts.setProperty('grpc.stub', deps.grpc.grpcStub) - artifacts.setProperty('grpc.protobuf', deps.grpc.grpcProtobuf) - artifacts.setProperty('repository.spine.release', repos.spine) - artifacts.setProperty('repository.spine.snapshot', repos.spineSnapshots) - - artifacts.store( - versionSnapshot.newWriter('UTF-8'), - 'Dependencies and versions required by Spine.' - ) - } -} From c34870bf2f60730f00090dfd0b709b8c8e1f103f Mon Sep 17 00:00:00 2001 From: Dmytro Dashenkov Date: Wed, 3 Jun 2020 14:49:52 +0300 Subject: [PATCH 03/12] Update Gradle --- gradle/plugin.gradle | 73 ----------------------- gradle/wrapper/gradle-wrapper.jar | Bin 58695 -> 58694 bytes gradle/wrapper/gradle-wrapper.properties | 2 +- 3 files changed, 1 insertion(+), 74 deletions(-) delete mode 100644 gradle/plugin.gradle diff --git a/gradle/plugin.gradle b/gradle/plugin.gradle deleted file mode 100644 index 286234eb..00000000 --- a/gradle/plugin.gradle +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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. - */ - -project.gradlePlugin { - it.plugins { - spineBootstrapPlugin { - id = 'io.spine.tools.gradle.bootstrap' - implementationClass = 'io.spine.tools.gradle.bootstrap.BootstrapPlugin' - displayName = 'Spine Bootstrap' - description = 'Prepares a Gradle project for development on Spine.' - } - } -} - -project.pluginBundle { - website = 'https://spine.io/' - vcsUrl = 'https://github.com/SpineEventEngine/bootstrap.git' - tags = ['spine', 'event-sourcing', 'ddd', 'cqrs', 'bootstrap'] - - it.mavenCoordinates { - groupId = 'io.spine.tools' - artifactId = 'spine-bootstrap' - version = project.spineVersion - } - - it.withDependencies { it.clear() } - - it.plugins { - spineBootstrapPlugin { - version = project.spineVersion - } - } -} - -/* - * In order to simplify the Bootstrap plugin usage, the plugin should have no external dependencies - * which cannot be found in the Plugin portal or in JCenter. Spine core modules are not published to - * either of those repositories. Thus, we publish the "fat" JAR. - * - * As Gradle Plugin plugin always publishes the JAR artifact with the empty classifier, we add - * the "pure" classifier to the default JAR artifact and generate the "fat" JAR with an empty - * classifier. - */ - -project.jar { - archiveClassifier.set 'pure' - it.dependsOn project.shadowJar -} - -project.shadowJar { - classifier = '' -} - -artifacts { - archives shadowJar -} diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index f3d88b1c2faf2fc91d853cd5d4242b5547257070..490fda8577df6c95960ba7077c43220e5bb2c0d9 100644 GIT binary patch delta 6577 zcmYkAbyQT*w}4>)kxq%Bq>+@Al)yql!t+#+E>53IV^;nKUp^h z4s3gkgN%3})P~|EIG7tA>p3fA-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$VC!a9aC-m z$9&}vXeQ@XN!yio)>wnSzdn=;q=i?)3mhg93pVMVBsjb;$m27x6+9D7HHXZ%-ySdS z%3-ymPnpOtY1D7si5fq6BpxnqYV$BGQ`pqmw2tS?7BLGj=p*uFAyE(xmF>T8^XMzz zw6z-2|HajrqxK4b-%h7+T@usb1> z->hmpIo^MR&k=ug(hd`I0w7tJq^B~q6snow@@qlwFrL0U_=9red9nQV!BLB*n%au_ z7SnFMfboKV`|!#-oxrN~aRU2-@%*wMv2nra9iSwbJ^W%l?!oMq_Pzy9gWK=ig7*ih zB4=|XT0P7ng?xD0PG3&1^@!%hf88|Yw;)fv9#>!EWu<)Ax(s=2e1TwHbCi+=oj+08 zYBbA9IG4oN*_Z#e$jD{DF%?^1`f9_>PM~~3ITW_pk)`WtDBgMk1&kTF^j1$1=|$tJ zjtNrAbC8($17KUyjjj)^@<#sc>1}DWs&?n>sE4Im$OpCZ^NIkktFI`#ivyY!GJ81& z3AJgh3$7e@uki@7pOuM3VcMnN-@w(jd&ay>k_L(%yKLOfHOtmDSNr6C3u$I%N$SQHW%=$FPV6i$Fz%`f zvTF|4kS7dRnJ>42(TDsLqaLY5@&Ey0u$q}4o#Y||v|WUqL1NK1mLOKneC`^BVDKV^ z+z6G7-OEnW<=4(hE4U}46Ng}{OS8|)el0=}!}g3YXD{bM1NRr-cDVaKP2}q4tH-0Q zC<%qSM}j(pfkZIce@5`Y*LfrC|DAIJGz*rXAcKFC&T0cZAY*|G#AE!=%EIu0!v#4I z0qlP)2{5=q2-q)DgFaaQLoL>H|4@+~A@1Mt>A#i#J{8zlgn^K7U~`cc7=b?pFy{#Y z&n0TqQy^hU8>HsmB*F;s{;wwP zuzw*uj2c*3KQ=Lj=5I&{G_6sCC_nz&@Ow=QG?@5LzFAj7 zy#Q*~;h Date: Wed, 3 Jun 2020 14:50:29 +0300 Subject: [PATCH 04/12] Migrate scripts into Kotlin --- build.gradle | 125 ------------------------ build.gradle.kts | 127 +++++++++++++++++++++++++ license-report.md | 99 ++++++------------- plugin/build.gradle | 63 ------------ plugin/build.gradle.kts | 112 ++++++++++++++++++++++ pom.xml | 36 +++---- settings.gradle => settings.gradle.kts | 4 +- version.gradle => version.gradle.kts | 7 +- 8 files changed, 288 insertions(+), 285 deletions(-) delete mode 100644 build.gradle create mode 100644 build.gradle.kts delete mode 100644 plugin/build.gradle create mode 100644 plugin/build.gradle.kts rename settings.gradle => settings.gradle.kts (94%) rename version.gradle => version.gradle.kts (93%) diff --git a/build.gradle b/build.gradle deleted file mode 100644 index eaf6eaf1..00000000 --- a/build.gradle +++ /dev/null @@ -1,125 +0,0 @@ -/* - * 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. - */ - -buildscript { final scriptHandler -> - - apply from: 'version.gradle' - apply from: "$rootDir/config/gradle/dependencies.gradle" - - defaultRepositories(scriptHandler) - dependencies { - classpath deps.build.gradlePlugins.errorProne - } - forceConfiguration(scriptHandler) -} - -ext { - credentialsPropertyFile = 'cloudrepo.properties' - publishPlugin = "$rootDir/config/gradle/publish.gradle" - projectsToPublish = ["plugin"] -} - -allprojects { - apply plugin: 'java' - apply plugin: 'jacoco' - - group = 'io.spine' - version = spineVersion -} - -subprojects { - apply plugin: 'idea' - - apply plugin: 'net.ltgt.errorprone' - apply plugin: 'pmd' - - group = 'io.spine.tools' - version = spineVersion - - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - - defaultRepositories(project) - - dependencies { - errorprone deps.build.errorProneCore - errorproneJavac deps.build.errorProneJavac - implementation deps.build.checkerAnnotations - implementation deps.build.errorProneAnnotations - - implementation deps.build.guava - - implementation "io.spine:spine-base:$spineVersion" - - testImplementation deps.test.guavaTestlib - testImplementation deps.test.junit5Api - testImplementation deps.test.junit5Runner - testImplementation deps.test.truth - testImplementation deps.test.junitPioneer - } - - forceConfiguration(project) - - tasks.withType(Test) { - useJUnitPlatform { - includeEngines 'junit-jupiter' - } - } - - apply from: deps.scripts.slowTests - apply from: deps.scripts.testOutput - apply from: deps.scripts.javadocOptions - - task sourceJar(type: Jar) { - from sourceSets.main.allJava - archiveClassifier.set("sources") - } - - task testOutputJar(type: Jar) { - from sourceSets.test.output - archiveClassifier.set("test") - } - - task javadocJar(type: Jar, dependsOn: 'javadoc') { - from "$projectDir/build/docs/javadoc" - archiveClassifier.set("javadoc") - } - - idea { - module { - downloadJavadoc = true - downloadSources = true - } - } - - apply from: deps.scripts.pmd - apply from: deps.scripts.projectLicenseReport -} - -apply from: deps.scripts.publish - -rootProject.afterEvaluate { - final Project pluginProject = project(':plugin') - pluginProject.publish.dependsOn(pluginProject.publishPlugins) -} - -apply from: deps.scripts.jacoco -apply from: deps.scripts.repoLicenseReport -apply from: deps.scripts.generatePom diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 00000000..369fd2e3 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,127 @@ +/* + * 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. + */ + +import io.spine.gradle.internal.DependencyResolution +import io.spine.gradle.internal.Deps +import io.spine.gradle.internal.PublishingRepos + +plugins { + java + idea + jacoco + @Suppress("RemoveRedundantQualifierName") // Cannot use imports here. + id("net.ltgt.errorprone").version(io.spine.gradle.internal.Deps.versions.errorPronePlugin) +} + +extra["credentialsPropertyFile"] = PublishingRepos.cloudRepo.credentials +extra["projectsToPublish"] = listOf("plugin") + +apply(from = "$rootDir/version.gradle.kts") + +val spineVersion: String by extra +val spineBaseVersion: String by extra + +allprojects { + apply(from = "$rootDir/version.gradle.kts") + apply(from = "$rootDir/config/gradle/dependencies.gradle") + + group = "io.spine.tools" + version = spineVersion +} + +subprojects { + apply { + plugin("java") + plugin("idea") + plugin("net.ltgt.errorprone") + plugin("pmd") + + from(Deps.scripts.slowTests(project)) + from(Deps.scripts.testOutput(project)) + from(Deps.scripts.javadocOptions(project)) + from(Deps.scripts.pmd(project)) + from(Deps.scripts.projectLicenseReport(project)) + } + + java { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + DependencyResolution.defaultRepositories(repositories) + + dependencies { + errorprone(Deps.build.errorProneCore) + errorproneJavac(Deps.build.errorProneJavac) + + Deps.build.errorProneAnnotations.forEach { implementation(it) } + implementation(Deps.build.checkerAnnotations) + implementation(Deps.build.guava) + implementation("io.spine:spine-base:$spineBaseVersion") + + testImplementation(Deps.test.guavaTestlib) + Deps.test.junit5Api.forEach { testImplementation(it) } + testImplementation(Deps.test.junit5Runner) + Deps.test.truth.forEach { testImplementation(it) } + } + + DependencyResolution.forceConfiguration(configurations) + + tasks.withType(Test::class) { + useJUnitPlatform { + includeEngines("junit-jupiter") + } + } + + tasks.register("sourceJar", Jar::class) { + from(sourceSets.main.get().allJava) + archiveClassifier.set("sources") + } + + tasks.register("testOutputJar", Jar::class) { + from(sourceSets.test.get().output) + archiveClassifier.set("test") + } + + tasks.register("javadocJar", Jar::class) { + from("$projectDir/build/docs/javadoc") + archiveClassifier.set("javadoc") + dependsOn(tasks.javadoc) + } + + idea { + module { + isDownloadJavadoc = true + isDownloadSources = true + } + } +} + +apply { + from(Deps.scripts.publish(project)) + from(Deps.scripts.jacoco(project)) + from(Deps.scripts.repoLicenseReport(project)) + from(Deps.scripts.generatePom(project)) +} + +rootProject.afterEvaluate { + val pluginProject = project(":plugin") + pluginProject.tasks["publish"].dependsOn(pluginProject.tasks["publishPlugins"]) +} diff --git a/license-report.md b/license-report.md index b28cff0a..a45b0fd6 100644 --- a/license-report.md +++ b/license-report.md @@ -1,6 +1,6 @@ -# Dependencies of `io.spine.tools:spine-plugin:1.5.8` +# Dependencies of `io.spine.tools:spine-plugin:1.5.14` ## Runtime 1. **Group:** com.google.code.findbugs **Name:** jsr305 **Version:** 3.0.2 @@ -16,13 +16,13 @@ 1. **Group:** com.google.errorprone **Name:** error_prone_type_annotations **Version:** 2.3.4 * **POM License: Apache 2.0** - [http://www.apache.org/licenses/LICENSE-2.0.txt](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group:** com.google.flogger **Name:** flogger **Version:** 0.4 +1. **Group:** com.google.flogger **Name:** flogger **Version:** 0.5.1 * **POM Project URL:** [https://github.com/google/flogger](https://github.com/google/flogger) - * **POM License: Apache 2.0** - [http://www.apache.org/licenses/LICENSE-2.0.txt](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **POM License: Apache 2.0** - [https://www.apache.org/licenses/LICENSE-2.0.txt](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group:** com.google.flogger **Name:** flogger-system-backend **Version:** 0.4 +1. **Group:** com.google.flogger **Name:** flogger-system-backend **Version:** 0.5.1 * **POM Project URL:** [https://github.com/google/flogger](https://github.com/google/flogger) - * **POM License: Apache 2.0** - [http://www.apache.org/licenses/LICENSE-2.0.txt](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **POM License: Apache 2.0** - [https://www.apache.org/licenses/LICENSE-2.0.txt](https://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group:** com.google.gradle **Name:** osdetector-gradle-plugin **Version:** 1.6.2 * **POM Project URL:** [https://github.com/google/osdetector-gradle-plugin](https://github.com/google/osdetector-gradle-plugin) @@ -43,7 +43,7 @@ * **POM Project URL:** [https://github.com/google/j2objc/](https://github.com/google/j2objc/) * **POM License: The Apache Software License, Version 2.0** - [http://www.apache.org/licenses/LICENSE-2.0.txt](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group:** com.google.protobuf **Name:** protobuf-gradle-plugin **Version:** 0.8.11 +1. **Group:** com.google.protobuf **Name:** protobuf-gradle-plugin **Version:** 0.8.12 * **POM Project URL:** [https://github.com/google/protobuf-gradle-plugin](https://github.com/google/protobuf-gradle-plugin) * **POM License: BSD 3-Clause** - [http://opensource.org/licenses/BSD-3-Clause](http://opensource.org/licenses/BSD-3-Clause) @@ -55,7 +55,7 @@ * **Manifest Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/) * **POM License: 3-Clause BSD License** - [https://opensource.org/licenses/BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -1. **Group:** com.squareup **Name:** javapoet **Version:** 1.11.1 +1. **Group:** com.squareup **Name:** javapoet **Version:** 1.12.1 * **POM Project URL:** [http://github.com/square/javapoet/](http://github.com/square/javapoet/) * **POM License: Apache 2.0** - [http://www.apache.org/licenses/LICENSE-2.0.txt](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -67,16 +67,21 @@ * **POM Project URL:** [https://github.com/trustin/os-maven-plugin/](https://github.com/trustin/os-maven-plugin/) * **POM License: Apache License, Version 2.0** - [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) -1. **Group:** org.checkerframework **Name:** checker-qual **Version:** 3.0.1 +1. **Group:** org.checkerframework **Name:** checker-compat-qual **Version:** 2.5.5 + * **POM Project URL:** [https://checkerframework.org](https://checkerframework.org) + * **POM License: GNU General Public License, version 2 (GPL2), with the classpath exception** - [http://www.gnu.org/software/classpath/license.html](http://www.gnu.org/software/classpath/license.html) + * **POM License: The MIT License** - [http://opensource.org/licenses/MIT](http://opensource.org/licenses/MIT) + +1. **Group:** org.checkerframework **Name:** checker-qual **Version:** 3.3.0 * **Manifest License:** MIT (Not packaged) * **POM Project URL:** [https://checkerframework.org](https://checkerframework.org) * **POM License: The MIT License** - [http://opensource.org/licenses/MIT](http://opensource.org/licenses/MIT) -1. **Group:** org.jboss.forge.roaster **Name:** roaster-api **Version:** 2.21.1.Final +1. **Group:** org.jboss.forge.roaster **Name:** roaster-api **Version:** 2.21.2.Final * **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.jboss.forge.roaster **Name:** roaster-jdt **Version:** 2.21.1.Final +1. **Group:** org.jboss.forge.roaster **Name:** roaster-jdt **Version:** 2.21.2.Final * **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) @@ -129,13 +134,13 @@ * **POM Project URL:** [https://github.com/google/error-prone-javac](https://github.com/google/error-prone-javac) * **POM License: GNU General Public License, version 2, with the Classpath Exception** - [http://openjdk.java.net/legal/gplv2+ce.html](http://openjdk.java.net/legal/gplv2+ce.html) -1. **Group:** com.google.flogger **Name:** flogger **Version:** 0.4 +1. **Group:** com.google.flogger **Name:** flogger **Version:** 0.5.1 * **POM Project URL:** [https://github.com/google/flogger](https://github.com/google/flogger) - * **POM License: Apache 2.0** - [http://www.apache.org/licenses/LICENSE-2.0.txt](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **POM License: Apache 2.0** - [https://www.apache.org/licenses/LICENSE-2.0.txt](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group:** com.google.flogger **Name:** flogger-system-backend **Version:** 0.4 +1. **Group:** com.google.flogger **Name:** flogger-system-backend **Version:** 0.5.1 * **POM Project URL:** [https://github.com/google/flogger](https://github.com/google/flogger) - * **POM License: Apache 2.0** - [http://www.apache.org/licenses/LICENSE-2.0.txt](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **POM License: Apache 2.0** - [https://www.apache.org/licenses/LICENSE-2.0.txt](https://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group:** com.google.gradle **Name:** osdetector-gradle-plugin **Version:** 1.6.2 * **POM Project URL:** [https://github.com/google/osdetector-gradle-plugin](https://github.com/google/osdetector-gradle-plugin) @@ -159,7 +164,7 @@ * **POM Project URL:** [https://github.com/google/j2objc/](https://github.com/google/j2objc/) * **POM License: The Apache Software License, Version 2.0** - [http://www.apache.org/licenses/LICENSE-2.0.txt](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group:** com.google.protobuf **Name:** protobuf-gradle-plugin **Version:** 0.8.11 +1. **Group:** com.google.protobuf **Name:** protobuf-gradle-plugin **Version:** 0.8.12 * **POM Project URL:** [https://github.com/google/protobuf-gradle-plugin](https://github.com/google/protobuf-gradle-plugin) * **POM License: BSD 3-Clause** - [http://opensource.org/licenses/BSD-3-Clause](http://opensource.org/licenses/BSD-3-Clause) @@ -171,23 +176,23 @@ * **Manifest Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/) * **POM License: 3-Clause BSD License** - [https://opensource.org/licenses/BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -1. **Group:** com.google.truth **Name:** truth **Version:** 1.0 +1. **Group:** com.google.truth **Name:** truth **Version:** 1.0.1 * **POM License: The Apache Software License, Version 2.0** - [http://www.apache.org/licenses/LICENSE-2.0.txt](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group:** com.google.truth.extensions **Name:** truth-java8-extension **Version:** 1.0 +1. **Group:** com.google.truth.extensions **Name:** truth-java8-extension **Version:** 1.0.1 * **POM License: The Apache Software License, Version 2.0** - [http://www.apache.org/licenses/LICENSE-2.0.txt](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group:** com.google.truth.extensions **Name:** truth-liteproto-extension **Version:** 1.0 +1. **Group:** com.google.truth.extensions **Name:** truth-liteproto-extension **Version:** 1.0.1 * **POM License: The Apache Software License, Version 2.0** - [http://www.apache.org/licenses/LICENSE-2.0.txt](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group:** com.google.truth.extensions **Name:** truth-proto-extension **Version:** 1.0 +1. **Group:** com.google.truth.extensions **Name:** truth-proto-extension **Version:** 1.0.1 * **POM License: The Apache Software License, Version 2.0** - [http://www.apache.org/licenses/LICENSE-2.0.txt](http://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group:** com.googlecode.java-diff-utils **Name:** diffutils **Version:** 1.3.0 * **POM Project URL:** [http://code.google.com/p/java-diff-utils/](http://code.google.com/p/java-diff-utils/) * **POM License: The Apache Software License, Version 2.0** - [http://www.apache.org/licenses/LICENSE-2.0.txt](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group:** com.squareup **Name:** javapoet **Version:** 1.11.1 +1. **Group:** com.squareup **Name:** javapoet **Version:** 1.12.1 * **POM Project URL:** [http://github.com/square/javapoet/](http://github.com/square/javapoet/) * **POM License: Apache 2.0** - [http://www.apache.org/licenses/LICENSE-2.0.txt](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -229,7 +234,7 @@ * **Project URL:** [http://commons.apache.org/proper/commons-lang/](http://commons.apache.org/proper/commons-lang/) * **POM License: Apache License, Version 2.0** - [https://www.apache.org/licenses/LICENSE-2.0.txt](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group:** org.apiguardian **Name:** apiguardian-api **Version:** 1.0.0 +1. **Group:** org.apiguardian **Name:** apiguardian-api **Version:** 1.1.0 * **POM Project URL:** [https://github.com/apiguardian-team/apiguardian](https://github.com/apiguardian-team/apiguardian) * **POM License: The Apache License, Version 2.0** - [http://www.apache.org/licenses/LICENSE-2.0.txt](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -238,7 +243,7 @@ * **POM License: GNU General Public License, version 2 (GPL2), with the classpath exception** - [http://www.gnu.org/software/classpath/license.html](http://www.gnu.org/software/classpath/license.html) * **POM License: The MIT License** - [http://opensource.org/licenses/MIT](http://opensource.org/licenses/MIT) -1. **Group:** org.checkerframework **Name:** checker-qual **Version:** 3.0.1 +1. **Group:** org.checkerframework **Name:** checker-qual **Version:** 3.3.0 * **Manifest License:** MIT (Not packaged) * **POM Project URL:** [https://checkerframework.org](https://checkerframework.org) * **POM License: The MIT License** - [http://opensource.org/licenses/MIT](http://opensource.org/licenses/MIT) @@ -261,31 +266,15 @@ 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.jacoco **Name:** org.jacoco.agent **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.jacoco **Name:** org.jacoco.ant **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.jacoco **Name:** org.jacoco.core **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.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.jboss.forge.roaster **Name:** roaster-api **Version:** 2.21.1.Final +1. **Group:** org.jboss.forge.roaster **Name:** roaster-api **Version:** 2.21.2.Final * **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.jboss.forge.roaster **Name:** roaster-jdt **Version:** 2.21.1.Final +1. **Group:** org.jboss.forge.roaster **Name:** roaster-jdt **Version:** 2.21.2.Final * **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) - 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) @@ -317,34 +306,6 @@ * **POM License: BSD** - [http://asm.ow2.org/license.html](http://asm.ow2.org/license.html) * **POM License: The Apache Software License, Version 2.0** - [http://www.apache.org/licenses/LICENSE-2.0.txt](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group:** org.ow2.asm **Name:** asm **Version:** 7.2 - * **Manifest Project URL:** [http://asm.ow2.org](http://asm.ow2.org) - * **Manifest License:** BSD-3-Clause;link=https://asm.ow2.io/LICENSE.txt (Not packaged) - * **POM Project URL:** [http://asm.ow2.io/](http://asm.ow2.io/) - * **POM License: BSD-3-Clause** - [https://asm.ow2.io/license.html](https://asm.ow2.io/license.html) - * **POM License: The Apache Software License, Version 2.0** - [http://www.apache.org/licenses/LICENSE-2.0.txt](http://www.apache.org/licenses/LICENSE-2.0.txt) - -1. **Group:** org.ow2.asm **Name:** asm-analysis **Version:** 7.2 - * **Manifest Project URL:** [http://asm.ow2.org](http://asm.ow2.org) - * **Manifest License:** BSD-3-Clause;link=https://asm.ow2.io/LICENSE.txt (Not packaged) - * **POM Project URL:** [http://asm.ow2.io/](http://asm.ow2.io/) - * **POM License: BSD-3-Clause** - [https://asm.ow2.io/license.html](https://asm.ow2.io/license.html) - * **POM License: The Apache Software License, Version 2.0** - [http://www.apache.org/licenses/LICENSE-2.0.txt](http://www.apache.org/licenses/LICENSE-2.0.txt) - -1. **Group:** org.ow2.asm **Name:** asm-commons **Version:** 7.2 - * **Manifest Project URL:** [http://asm.ow2.org](http://asm.ow2.org) - * **Manifest License:** BSD-3-Clause;link=https://asm.ow2.io/LICENSE.txt (Not packaged) - * **POM Project URL:** [http://asm.ow2.io/](http://asm.ow2.io/) - * **POM License: BSD-3-Clause** - [https://asm.ow2.io/license.html](https://asm.ow2.io/license.html) - * **POM License: The Apache Software License, Version 2.0** - [http://www.apache.org/licenses/LICENSE-2.0.txt](http://www.apache.org/licenses/LICENSE-2.0.txt) - -1. **Group:** org.ow2.asm **Name:** asm-tree **Version:** 7.2 - * **Manifest Project URL:** [http://asm.ow2.org](http://asm.ow2.org) - * **Manifest License:** BSD-3-Clause;link=https://asm.ow2.io/LICENSE.txt (Not packaged) - * **POM Project URL:** [http://asm.ow2.io/](http://asm.ow2.io/) - * **POM License: BSD-3-Clause** - [https://asm.ow2.io/license.html](https://asm.ow2.io/license.html) - * **POM License: The Apache Software License, Version 2.0** - [http://www.apache.org/licenses/LICENSE-2.0.txt](http://www.apache.org/licenses/LICENSE-2.0.txt) - 1. **Group:** org.pcollections **Name:** pcollections **Version:** 2.1.2 * **POM Project URL:** [http://pcollections.org](http://pcollections.org) * **POM License: The MIT License** - [http://www.opensource.org/licenses/mit-license.php](http://www.opensource.org/licenses/mit-license.php) @@ -366,4 +327,4 @@ The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Tue Apr 21 22:37:18 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 **Wed Jun 03 14:08:46 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/plugin/build.gradle b/plugin/build.gradle deleted file mode 100644 index a01a6e8a..00000000 --- a/plugin/build.gradle +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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. - */ - -import org.apache.tools.ant.filters.ReplaceTokens - -plugins { - id 'java-gradle-plugin' - id 'com.gradle.plugin-publish' version '0.11.0' - id "com.github.johnrengelman.shadow" version "5.2.0" -} - -apply from: "$rootDir/gradle/plugin.gradle" -apply from: "$rootDir/gradle/func-test-env.gradle" -apply from: "$rootDir/gradle/prepare-config-resources.gradle" - -dependencies { - implementation( - gradleApi(), - deps.build.gradlePlugins.protobuf, - "io.spine.tools:spine-plugin-base:$spineVersion", - "io.spine.tools:spine-model-compiler:$spineVersion", - "io.spine.tools:spine-proto-js-plugin:$spineVersion", - ) - testImplementation( - "io.spine:spine-testlib:$spineVersion", - "io.spine.tools:spine-plugin-testlib:$spineVersion" - ) -} - -final targetResourceDir = "$buildDir/compiledResources/" - -task prepareBuildScript(type: Copy) { final Copy task -> - description = 'Creates the `build.gradle` script which is executed in functional tests of the plugin.' - - from "$projectDir/src/test/build.gradle.template" - into targetResourceDir - - rename { final _ -> 'build.gradle' } - filter(ReplaceTokens, tokens: ['spine-version': spineVersion]) -} - -processTestResources.dependsOn 'prepareBuildScript' - -sourceSets { - test.resources.srcDir(targetResourceDir) -} diff --git a/plugin/build.gradle.kts b/plugin/build.gradle.kts new file mode 100644 index 00000000..6d83ae09 --- /dev/null +++ b/plugin/build.gradle.kts @@ -0,0 +1,112 @@ +/* + * 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. + */ + +import io.spine.gradle.internal.Deps +import org.apache.tools.ant.filters.ReplaceTokens + +plugins { + java + id("com.gradle.plugin-publish").version("0.11.0") + id("com.github.johnrengelman.shadow").version("5.2.0") + `bootstrap-plugin` + `func-test-env` + `prepare-config-resources` +} + +val spineVersion: String by extra +val spineBaseVersion: String by extra + +dependencies { + implementation(gradleApi()) + implementation(Deps.build.gradlePlugins.protobuf) + implementation("io.spine:spine-base:$spineBaseVersion") + implementation("io.spine.tools:spine-plugin-base:$spineBaseVersion") + implementation("io.spine.tools:spine-model-compiler:$spineBaseVersion") + implementation("io.spine.tools:spine-proto-js-plugin:$spineBaseVersion") + + testImplementation("io.spine:spine-testlib:$spineBaseVersion") + testImplementation("io.spine.tools:spine-plugin-testlib:$spineBaseVersion") +} + +val targetResourceDir = "$buildDir/compiledResources/" + +val prepareBuildScript by tasks.registering(Copy::class) { + description = "Creates the `build.gradle` script which is executed in functional tests of the plugin." + + from("$projectDir/src/test/build.gradle.template") + into(targetResourceDir) + + rename { "build.gradle" } + filter(mapOf("tokens" to mapOf("spine-version" to spineVersion)), ReplaceTokens::class.java) +} + +tasks.processTestResources { + dependsOn(prepareBuildScript) +} + +sourceSets { + test { + resources.srcDir(targetResourceDir) + } +} + +pluginBundle { + website = "https://spine.io/" + vcsUrl = "https://github.com/SpineEventEngine/bootstrap.git" + tags = listOf("spine", "event-sourcing", "ddd", "cqrs", "bootstrap") + + mavenCoordinates { + groupId = "io.spine.tools" + artifactId = "spine-bootstrap" + version = spineVersion + } + + withDependencies { clear() } + + plugins { + named("spineBootstrapPlugin") { + version = spineVersion + } + } +} + +/* + * In order to simplify the Bootstrap plugin usage, the plugin should have no external dependencies + * which cannot be found in the Plugin portal or in JCenter. Spine core modules are not published to + * either of those repositories. Thus, we publish the "fat" JAR. + * + * As Gradle Plugin plugin always publishes the JAR artifact with the empty classifier, we add + * the "pure" classifier to the default JAR artifact and generate the "fat" JAR with an empty + * classifier. + */ + +tasks.jar { + archiveClassifier.set("pure") + dependsOn(tasks.shadowJar) +} + +tasks.shadowJar { + archiveClassifier.set("") +} + +artifacts { + archives(tasks.shadowJar) +} + diff --git a/pom.xml b/pom.xml index 349e5a60..ef5ff904 100644 --- a/pom.xml +++ b/pom.xml @@ -10,9 +10,9 @@ all modules and does not describe the project structure per-subproject. --> -io.spine +io.spine.tools spine-bootstrap -1.5.8 +1.5.14 2015 @@ -46,37 +46,37 @@ all modules and does not describe the project structure per-subproject. com.google.protobuf protobuf-gradle-plugin - 0.8.11 + 0.8.12 compile io.spine spine-base - 1.5.8 + 1.5.12 compile io.spine.tools spine-model-compiler - 1.5.8 + 1.5.12 compile io.spine.tools spine-plugin-base - 1.5.8 + 1.5.12 compile io.spine.tools spine-proto-js-plugin - 1.5.8 + 1.5.12 compile org.checkerframework checker-qual - 3.0.1 + 3.3.0 compile @@ -88,43 +88,37 @@ all modules and does not describe the project structure per-subproject. com.google.truth truth - 1.0 + 1.0.1 test com.google.truth.extensions truth-java8-extension - 1.0 + 1.0.1 test com.google.truth.extensions truth-proto-extension - 1.0 + 1.0.1 test io.spine spine-testlib - 1.5.8 + 1.5.12 test io.spine.tools spine-plugin-testlib - 1.5.8 + 1.5.12 test org.apiguardian apiguardian-api - 1.0.0 - test - - - org.junit-pioneer - junit-pioneer - 0.4.2 + 1.1.0 test @@ -158,7 +152,7 @@ all modules and does not describe the project structure per-subproject. io.spine.tools spine-protoc-plugin - 1.5.8 + 1.5.12 net.sourceforge.pmd diff --git a/settings.gradle b/settings.gradle.kts similarity index 94% rename from settings.gradle rename to settings.gradle.kts index f187c9fd..45df199e 100644 --- a/settings.gradle +++ b/settings.gradle.kts @@ -18,6 +18,6 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -rootProject.name = 'spine-bootstrap' +rootProject.name = "spine-bootstrap" -include ':plugin' +include(":plugin") diff --git a/version.gradle b/version.gradle.kts similarity index 93% rename from version.gradle rename to version.gradle.kts index a4e4ba49..1d30932f 100644 --- a/version.gradle +++ b/version.gradle.kts @@ -29,8 +29,5 @@ * already in the root directory. */ -final def SPINE_VERSION = '1.5.8' - -ext { - spineVersion = SPINE_VERSION -} +val spineBaseVersion: String by extra("1.5.12") +val spineVersion: String by extra("1.5.14") From 0d1e2ccb99d04ae444577f34a39d773653caa648 Mon Sep 17 00:00:00 2001 From: Dmytro Dashenkov Date: Wed, 3 Jun 2020 14:50:56 +0300 Subject: [PATCH 05/12] Use stable JUnit API instead of Pioneer --- .../gradle/bootstrap/BootstrapPluginTest.java | 5 +---- .../tools/gradle/bootstrap/ExtensionTest.java | 19 ++++++++++--------- .../func/SpineBootstrapPluginTest.java | 5 +---- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/plugin/src/test/java/io/spine/tools/gradle/bootstrap/BootstrapPluginTest.java b/plugin/src/test/java/io/spine/tools/gradle/bootstrap/BootstrapPluginTest.java index 5ffd2c7f..b10c72cd 100644 --- a/plugin/src/test/java/io/spine/tools/gradle/bootstrap/BootstrapPluginTest.java +++ b/plugin/src/test/java/io/spine/tools/gradle/bootstrap/BootstrapPluginTest.java @@ -26,15 +26,12 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.junitpioneer.jupiter.TempDirectory; -import org.junitpioneer.jupiter.TempDirectory.TempDir; +import org.junit.jupiter.api.io.TempDir; import java.nio.file.Path; import static com.google.common.truth.Truth.assertThat; -@ExtendWith(TempDirectory.class) @DisplayName("BootstrapPlugin should") class BootstrapPluginTest { diff --git a/plugin/src/test/java/io/spine/tools/gradle/bootstrap/ExtensionTest.java b/plugin/src/test/java/io/spine/tools/gradle/bootstrap/ExtensionTest.java index 0b7bd16c..25e3937f 100644 --- a/plugin/src/test/java/io/spine/tools/gradle/bootstrap/ExtensionTest.java +++ b/plugin/src/test/java/io/spine/tools/gradle/bootstrap/ExtensionTest.java @@ -40,9 +40,7 @@ import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.junitpioneer.jupiter.TempDirectory; -import org.junitpioneer.jupiter.TempDirectory.TempDir; +import org.junit.jupiter.api.io.TempDir; import java.nio.file.Path; import java.util.concurrent.atomic.AtomicBoolean; @@ -57,8 +55,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -@ExtendWith(TempDirectory.class) -@DisplayName("`spine` extension should") +@DisplayName("`spine` extension øshould") class ExtensionTest { private PluginTarget pluginTarget; @@ -74,7 +71,8 @@ void setUp(@TempDir Path projectDir) { .withName(BootstrapPluginTest.class.getSimpleName()) .withProjectDir(projectDir.toFile()) .build(); - this.projectDir = project.getProjectDir().toPath(); + this.projectDir = project.getProjectDir() + .toPath(); pluginTarget = new MemoizingPluginRegistry(); dependencyTarget = new MemoizingDependant(); codeLayout = new MemoizingSourceSuperset(); @@ -243,7 +241,8 @@ void combine() { @Test @DisplayName("add server dependencies if required") void server() { - extension.enableJava().server(); + extension.enableJava() + .server(); assertApplied(JavaPlugin.class); assertThat(dependencyTarget.dependencies()).contains(serverDependency()); @@ -261,7 +260,8 @@ void notContainTestUtil() { @Test @DisplayName("add `testutil-server` dependency for enableJava().server() declaring modules") void testUtilDependencyAdded() { - extension.enableJava().server(); + extension.enableJava() + .server(); assertThat(dependencyTarget.dependencies()) .contains(testUtilServerDependency()); @@ -270,7 +270,8 @@ void testUtilDependencyAdded() { @Test @DisplayName("add client dependencies if required") void client() { - extension.enableJava().client(); + extension.enableJava() + .client(); IterableSubject assertDependencies = assertThat(dependencyTarget.dependencies()); assertDependencies.contains(clientDependency()); diff --git a/plugin/src/test/java/io/spine/tools/gradle/bootstrap/func/SpineBootstrapPluginTest.java b/plugin/src/test/java/io/spine/tools/gradle/bootstrap/func/SpineBootstrapPluginTest.java index 1ac7c64b..375e4f8b 100644 --- a/plugin/src/test/java/io/spine/tools/gradle/bootstrap/func/SpineBootstrapPluginTest.java +++ b/plugin/src/test/java/io/spine/tools/gradle/bootstrap/func/SpineBootstrapPluginTest.java @@ -30,9 +30,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.junitpioneer.jupiter.TempDirectory; -import org.junitpioneer.jupiter.TempDirectory.TempDir; +import org.junit.jupiter.api.io.TempDir; import java.io.File; import java.nio.file.Path; @@ -49,7 +47,6 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertTrue; -@ExtendWith(TempDirectory.class) @SlowTest @DisplayName("`io.spine.tools.gradle.bootstrap` plugin should") class SpineBootstrapPluginTest { From 50f351f6fa9113f14876223bad23591b6ec1d90d Mon Sep 17 00:00:00 2001 From: Dmytro Dashenkov Date: Wed, 3 Jun 2020 14:51:19 +0300 Subject: [PATCH 06/12] Adjust buildSrc for now --- buildSrc/build.gradle.kts | 2 +- .../gradle/internal/CheckVersionIncrement.kt | 6 ++--- .../spine/gradle/internal/IncrementGuard.kt | 6 ++--- .../io/spine/gradle/internal/RunBuild.kt | 6 +++-- .../kotlin/io/spine/gradle/internal/deps.kt | 26 +++++++++---------- 5 files changed, 24 insertions(+), 22 deletions(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 7dc929af..b6b5e609 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -21,7 +21,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 60709874..45e02672 100644 --- a/buildSrc/src/main/kotlin/io/spine/gradle/internal/CheckVersionIncrement.kt +++ b/buildSrc/src/main/kotlin/io/spine/gradle/internal/CheckVersionIncrement.kt @@ -22,9 +22,9 @@ 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.net.URL @@ -33,7 +33,7 @@ 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,7 +45,7 @@ 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() { 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 c227f498..39190d21 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 c083ad95..48dd298e 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 2636036a..6846093b 100644 --- a/buildSrc/src/main/kotlin/io/spine/gradle/internal/deps.kt +++ b/buildSrc/src/main/kotlin/io/spine/gradle/internal/deps.kt @@ -278,12 +278,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 +329,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) } } } From c783c3c67e8927dbaa160e5427b049d2d1cb74ce Mon Sep 17 00:00:00 2001 From: Dmytro Dashenkov Date: Wed, 3 Jun 2020 16:42:47 +0300 Subject: [PATCH 07/12] Allow to use different versions of `base`, `time`, and core libs --- .../src/main/kotlin/func-test-env.gradle.kts | 1 - .../prepare-config-resources.gradle.kts | 20 ++++--- license-report.md | 2 +- plugin/build.gradle.kts | 1 - .../gradle/bootstrap/CodeGenExtension.java | 5 +- .../tools/gradle/bootstrap/JavaExtension.java | 24 +++++--- .../tools/gradle/config/ArtifactSnapshot.java | 57 +++++++++++++++---- .../gradle/bootstrap/given/FakeArtifacts.java | 4 +- version.gradle.kts | 1 + 9 files changed, 80 insertions(+), 35 deletions(-) diff --git a/buildSrc/src/main/kotlin/func-test-env.gradle.kts b/buildSrc/src/main/kotlin/func-test-env.gradle.kts index b651eb10..ee3f7efd 100644 --- a/buildSrc/src/main/kotlin/func-test-env.gradle.kts +++ b/buildSrc/src/main/kotlin/func-test-env.gradle.kts @@ -30,7 +30,6 @@ plugins { */ configurations { create("fetch") } -val spineVersion: String by extra val spineBaseVersion: String by extra var spineProtocPluginDependency: Dependency? = null diff --git a/buildSrc/src/main/kotlin/prepare-config-resources.gradle.kts b/buildSrc/src/main/kotlin/prepare-config-resources.gradle.kts index 51ed1c35..37e8f4f8 100644 --- a/buildSrc/src/main/kotlin/prepare-config-resources.gradle.kts +++ b/buildSrc/src/main/kotlin/prepare-config-resources.gradle.kts @@ -49,17 +49,17 @@ tasks.register("copyModelCompilerConfig", Copy::class) { } } +val spineBaseVersion: String by extra +val spineTimeVersion: String by extra val spineVersion: String by extra -tasks.register("writeDependencies") { +val writeDependencies by tasks.registering { group = taskGroup inputs.dir(configDir) inputs.property("version", spineVersion) outputs.file(versionSnapshot) - tasks.processResources.get().dependsOn(this) - doFirst { bootstrapDir.mkdirs() if (!versionSnapshot.exists()) { @@ -70,7 +70,9 @@ tasks.register("writeDependencies") { doLast { val artifacts = Properties() - artifacts.setProperty("spine.version", spineVersion) + artifacts.setProperty("spine.version.base", spineBaseVersion) + artifacts.setProperty("spine.version.time", spineTimeVersion) + artifacts.setProperty("spine.version.core", spineVersion) artifacts.setProperty("protobuf.compiler", Deps.build.protoc) artifacts.setProperty("protobuf.java", Deps.build.protobuf[0]) artifacts.setProperty("grpc.stub", Deps.grpc.stub) @@ -78,10 +80,12 @@ tasks.register("writeDependencies") { artifacts.setProperty("repository.spine.release", Repos.spine) artifacts.setProperty("repository.spine.snapshot", Repos.spineSnapshots) - artifacts.store( - FileWriter(versionSnapshot), - "Dependencies and versions required by Spine." - ) + FileWriter(versionSnapshot).use { + artifacts.store(it, "Dependencies and versions required by Spine.") + } } } +tasks.processResources { + dependsOn(writeDependencies) +} diff --git a/license-report.md b/license-report.md index a45b0fd6..51b58ea8 100644 --- a/license-report.md +++ b/license-report.md @@ -327,4 +327,4 @@ The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Wed Jun 03 14:08:46 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 **Wed Jun 03 16:33:23 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/plugin/build.gradle.kts b/plugin/build.gradle.kts index 6d83ae09..735f68b1 100644 --- a/plugin/build.gradle.kts +++ b/plugin/build.gradle.kts @@ -109,4 +109,3 @@ tasks.shadowJar { artifacts { archives(tasks.shadowJar) } - diff --git a/plugin/src/main/java/io/spine/tools/gradle/bootstrap/CodeGenExtension.java b/plugin/src/main/java/io/spine/tools/gradle/bootstrap/CodeGenExtension.java index 4b8ad470..f631024c 100644 --- a/plugin/src/main/java/io/spine/tools/gradle/bootstrap/CodeGenExtension.java +++ b/plugin/src/main/java/io/spine/tools/gradle/bootstrap/CodeGenExtension.java @@ -70,9 +70,8 @@ abstract class CodeGenExtension implements Logging { @OverridingMethodsMustInvokeSuper void enableGeneration() { pluginTarget.applyJavaPlugin(); - String spineVersion = artifactSnapshot.spineVersion(); - dependant.compile(base().ofVersion(spineVersion)); - dependant.compile(time().ofVersion(spineVersion)); + dependant.compile(base().ofVersion(artifactSnapshot.spineBaseVersion())); + dependant.compile(time().ofVersion(artifactSnapshot.spineTimeVersion())); if (codeGenJob != null) { pluginTarget.applyProtobufPlugin(); protobufGenerator.enableBuiltIn(codeGenJob); diff --git a/plugin/src/main/java/io/spine/tools/gradle/bootstrap/JavaExtension.java b/plugin/src/main/java/io/spine/tools/gradle/bootstrap/JavaExtension.java index 4d5c40e4..c0eb6aaa 100644 --- a/plugin/src/main/java/io/spine/tools/gradle/bootstrap/JavaExtension.java +++ b/plugin/src/main/java/io/spine/tools/gradle/bootstrap/JavaExtension.java @@ -23,6 +23,7 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableSet; import groovy.lang.Closure; +import io.spine.tools.gradle.Artifact; import io.spine.tools.gradle.ConfigurationName; import io.spine.tools.gradle.GeneratedSourceRoot; import io.spine.tools.gradle.config.ArtifactSnapshot; @@ -35,6 +36,8 @@ import static io.spine.tools.gradle.ConfigurationName.implementation; import static io.spine.tools.gradle.ConfigurationName.testImplementation; import static io.spine.tools.gradle.ProtobufDependencies.protobufLite; +import static io.spine.tools.gradle.config.SpineDependency.testUtilTime; +import static io.spine.tools.gradle.config.SpineDependency.testlib; import static io.spine.tools.gradle.protoc.ProtocPlugin.Name.java; import static io.spine.tools.gradle.protoc.ProtocPlugin.called; import static org.gradle.util.ConfigureUtil.configure; @@ -60,8 +63,8 @@ private JavaExtension(Builder builder) { @Override void enableGeneration() { super.enableGeneration(); - dependOn(SpineDependency.testlib(), testImplementation); - dependOn(SpineDependency.testUtilTime(), testImplementation); + dependOn(testlib().ofVersion(artifacts.spineBaseVersion()), testImplementation); + dependOn(testUtilTime().ofVersion(artifacts.spineTimeVersion()), testImplementation); pluginTarget().applyModelCompiler(); pluginTarget().apply(SpinePluginScripts.modelCompilerConfig()); addSourceSets(); @@ -91,8 +94,8 @@ public void codegen(Closure config) { * dependencies to the project. */ public void client() { - dependOn(SpineDependency.client(), implementation); - dependOn(SpineDependency.testUtilClient(), testImplementation); + dependOnCore(SpineDependency.client(), implementation); + dependOnCore(SpineDependency.testUtilClient(), testImplementation); } /** @@ -102,13 +105,18 @@ public void client() { * dependencies to the project. */ public void server() { - dependOn(SpineDependency.server(), implementation); - dependOn(SpineDependency.testUtilServer(), testImplementation); + dependOnCore(SpineDependency.server(), implementation); + dependOnCore(SpineDependency.testUtilServer(), testImplementation); } - private void dependOn(SpineDependency module, ConfigurationName configurationName) { + private void dependOn(Artifact module, ConfigurationName configurationName) { + dependant().depend(configurationName, module.notation()); + } + + private void dependOnCore(SpineDependency module, ConfigurationName configurationName) { String spineVersion = artifacts.spineVersion(); - dependant().depend(configurationName, module.ofVersion(spineVersion).notation()); + Artifact artifact = module.ofVersion(spineVersion); + dependOn(artifact, configurationName); } private void addSourceSets() { diff --git a/plugin/src/main/java/io/spine/tools/gradle/config/ArtifactSnapshot.java b/plugin/src/main/java/io/spine/tools/gradle/config/ArtifactSnapshot.java index e291490c..239d69b8 100644 --- a/plugin/src/main/java/io/spine/tools/gradle/config/ArtifactSnapshot.java +++ b/plugin/src/main/java/io/spine/tools/gradle/config/ArtifactSnapshot.java @@ -41,7 +41,10 @@ public final class ArtifactSnapshot { private static final ArtifactSnapshot instance = load(); - private final String spineVersion; + private final String spineBaseVersion; + private final String spineTimeVersion; + private final String spineCoreVersion; + private final String protoc; private final String protobufJava; private final String grpcProtobuf; @@ -54,7 +57,9 @@ public final class ArtifactSnapshot { * Prevents direct instantiation. */ private ArtifactSnapshot(Builder builder) { - this.spineVersion = checkNotNull(builder.spineVersion); + this.spineBaseVersion = checkNotNull(builder.spineBaseVersion); + this.spineTimeVersion = checkNotNull(builder.spineTimeVersion); + this.spineCoreVersion = checkNotNull(builder.spineCoreVersion); this.protoc = checkNotNull(builder.protoc); this.protobufJava = checkNotNull(builder.protobufJava); this.grpcProtobuf = checkNotNull(builder.grpcProtobuf); @@ -72,7 +77,9 @@ private static ArtifactSnapshot load() { throw illegalStateWithCauseOf(e); } ArtifactSnapshot snapshot = newBuilder() - .setSpineVersion(properties.getProperty("spine.version")) + .setSpineCoreVersion(properties.getProperty("spine.version.core")) + .setSpineBaseVersion(properties.getProperty("spine.version.base")) + .setSpineTimeVersion(properties.getProperty("spine.version.time")) .setProtoc(properties.getProperty("protobuf.compiler")) .setProtobufJava(properties.getProperty("protobuf.java")) .setGrpcProtobuf(properties.getProperty("grpc.protobuf")) @@ -93,10 +100,24 @@ public static ArtifactSnapshot fromResources() { } /** - * Obtains the current version of Spine. + * Obtains the current version of Spine core. */ public String spineVersion() { - return spineVersion; + return spineCoreVersion; + } + + /** + * Obtains the current version of Spine {@code base}. + */ + public String spineBaseVersion() { + return spineBaseVersion; + } + + /** + * Obtains the current version of Spine {@code time}. + */ + public String spineTimeVersion() { + return spineTimeVersion; } /** @@ -149,7 +170,9 @@ public static Builder newBuilder() { */ public static final class Builder { - private String spineVersion; + private String spineBaseVersion; + private String spineTimeVersion; + private String spineCoreVersion; private String protoc; private String protobufJava; private String grpcProtobuf; @@ -163,28 +186,38 @@ public static final class Builder { private Builder() { } - public Builder setSpineVersion(String version) { - this.spineVersion = version; + public Builder setSpineBaseVersion(String spineBaseVersion) { + this.spineBaseVersion = checkNotNull(spineBaseVersion); + return this; + } + + public Builder setSpineTimeVersion(String spineTimeVersion) { + this.spineTimeVersion = checkNotNull(spineTimeVersion); + return this; + } + + public Builder setSpineCoreVersion(String version) { + this.spineCoreVersion = checkNotNull(version); return this; } public Builder setProtoc(String artifact) { - this.protoc = artifact; + this.protoc = checkNotNull(artifact); return this; } public Builder setProtobufJava(String artifact) { - this.protobufJava = artifact; + this.protobufJava = checkNotNull(artifact); return this; } public Builder setGrpcProtobuf(String artifact) { - this.grpcProtobuf = artifact; + this.grpcProtobuf = checkNotNull(artifact); return this; } public Builder setGrpcStub(String artifact) { - this.grpcStub = artifact; + this.grpcStub = checkNotNull(artifact); return this; } diff --git a/plugin/src/test/java/io/spine/tools/gradle/bootstrap/given/FakeArtifacts.java b/plugin/src/test/java/io/spine/tools/gradle/bootstrap/given/FakeArtifacts.java index 62a8bd86..8ac84b04 100644 --- a/plugin/src/test/java/io/spine/tools/gradle/bootstrap/given/FakeArtifacts.java +++ b/plugin/src/test/java/io/spine/tools/gradle/bootstrap/given/FakeArtifacts.java @@ -38,7 +38,9 @@ private FakeArtifacts() { public static ArtifactSnapshot snapshot() { return ArtifactSnapshot .newBuilder() - .setSpineVersion(spineVersion) + .setSpineBaseVersion(spineVersion) + .setSpineTimeVersion(spineVersion) + .setSpineCoreVersion(spineVersion) .setGrpcProtobuf(GRPC_PROTO_DEPENDENCY) .setGrpcStub(GRPC_STUB_DEPENDENCY) .setProtoc("com.google.protobuf:protoc:3.6.1") diff --git a/version.gradle.kts b/version.gradle.kts index 1d30932f..d1716aa3 100644 --- a/version.gradle.kts +++ b/version.gradle.kts @@ -30,4 +30,5 @@ */ val spineBaseVersion: String by extra("1.5.12") +val spineTimeVersion: String by extra("1.5.12") val spineVersion: String by extra("1.5.14") From ebf1c0726d7129324ee248e81b5136d020a280f5 Mon Sep 17 00:00:00 2001 From: Dmytro Dashenkov Date: Wed, 3 Jun 2020 16:53:56 +0300 Subject: [PATCH 08/12] Update config --- .idea/misc.xml | 15 ++------------- buildSrc/build.gradle.kts | 2 -- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 034cdfdf..deb97c81 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,17 +1,12 @@ - - - - diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index b6b5e609..60e0fb21 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -19,8 +19,6 @@ */ plugins { - // Use Kotlin for `buildSrc`. - // https://kotlinlang.org/docs/reference/using-gradle.html#targeting-the-jvm `kotlin-dsl` } From 4744da558e7a7dc8b6ac2e6658710a32bdbff18f Mon Sep 17 00:00:00 2001 From: Dmytro Dashenkov Date: Wed, 3 Jun 2020 18:20:02 +0300 Subject: [PATCH 09/12] Bump down Gradle --- .../prepare-config-resources.gradle.kts | 7 +++++-- config | 2 +- gradle/wrapper/gradle-wrapper.jar | Bin 58694 -> 58910 bytes gradle/wrapper/gradle-wrapper.properties | 2 +- gradlew | 2 ++ gradlew.bat | 1 + license-report.md | 2 +- 7 files changed, 11 insertions(+), 5 deletions(-) diff --git a/buildSrc/src/main/kotlin/prepare-config-resources.gradle.kts b/buildSrc/src/main/kotlin/prepare-config-resources.gradle.kts index 37e8f4f8..5b242dc0 100644 --- a/buildSrc/src/main/kotlin/prepare-config-resources.gradle.kts +++ b/buildSrc/src/main/kotlin/prepare-config-resources.gradle.kts @@ -37,18 +37,21 @@ sourceSets.main { val taskGroup = "Spine bootstrapping" -tasks.register("copyModelCompilerConfig", Copy::class) { +val copyModelCompilerConfig by tasks.registering(Copy::class) { group = taskGroup from(file("$configDir/gradle/model-compiler.gradle")) into(file(bootstrapDir)) - tasks.processResources.get().dependsOn(this) doFirst { bootstrapDir.mkdirs() } } +tasks.processResources { + dependsOn(copyModelCompilerConfig) +} + val spineBaseVersion: String by extra val spineTimeVersion: String by extra val spineVersion: String by extra diff --git a/config b/config index d9223f98..47048aed 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit d9223f98f58cca6a6c91d3339f0fa6c366e3a00c +Subproject commit 47048aed2a242a17c959577515b0548eb58fb984 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 490fda8577df6c95960ba7077c43220e5bb2c0d9..62d4c053550b91381bbd28b1afc82d634bf73a8a 100644 GIT binary patch delta 6447 zcmY*dbyQSczlH%shY+L(kQ}C6ise@?c@F%#`dE9xT=qM=Dm?$VxD1hrECD1a#01Q8o zMyT3}z+1K>hPE%4doH=x5X;^NP(OFD5GByp;5FQ^bpzkBa(;eudMu7Iyv$DE+N=>p z{3Y5_BP>F3)tXW*Styc(Ji3jnK-giG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$a@?7JL7I&pmkmclS7#Y#zRYg_`D0h47O z&|%88tXNh8{Yk$@@*HA-B9r#tDkY$>!U#Ie`j1TupjRn@;(ykyyld-zJ{@qm!UG~I zxR#ZxV8CEi5JXV?ANc~bS9*;MYtkTvifc5iynmg!XpIr%SN*R#E?|3&2QVs~N02d=N!1;GdfNGr)gc$|K#-y*M=Ra9B4#cmk-naoQuS*cWnE3C4 F{|nTN-B$nr diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 622ab64a..a4f0001d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 2fe81a7d..fbd7c515 100755 --- a/gradlew +++ b/gradlew @@ -82,6 +82,7 @@ esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then @@ -129,6 +130,7 @@ fi if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath diff --git a/gradlew.bat b/gradlew.bat index 62bd9b9c..5093609d 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -84,6 +84,7 @@ set CMD_LINE_ARGS=%* set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + @rem Execute Gradle "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% diff --git a/license-report.md b/license-report.md index 51b58ea8..292935a8 100644 --- a/license-report.md +++ b/license-report.md @@ -327,4 +327,4 @@ The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Wed Jun 03 16:33:23 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 **Wed Jun 03 18:13: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). \ No newline at end of file From ca8662868912b6c0154562045c8c1381267a0419 Mon Sep 17 00:00:00 2001 From: Dmytro Dashenkov Date: Wed, 3 Jun 2020 18:20:12 +0300 Subject: [PATCH 10/12] Fix a warning --- .../java/io/spine/tools/gradle/protoc/ProtobufGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/src/main/java/io/spine/tools/gradle/protoc/ProtobufGenerator.java b/plugin/src/main/java/io/spine/tools/gradle/protoc/ProtobufGenerator.java index a15d4eb0..e91d727e 100644 --- a/plugin/src/main/java/io/spine/tools/gradle/protoc/ProtobufGenerator.java +++ b/plugin/src/main/java/io/spine/tools/gradle/protoc/ProtobufGenerator.java @@ -108,7 +108,7 @@ public void useCompiler(String artifactSpec) { } private void configureTasks(Consumer config) { - Closure forEachTask = closure( + Closure forEachTask = closure( (GenerateProtoTaskCollection tasks) -> tasks.all() .forEach(config) ); From 8a3fe3fdebdd6eb14e381824f66f4f70d6c67976 Mon Sep 17 00:00:00 2001 From: Dmytro Dashenkov Date: Wed, 3 Jun 2020 18:20:40 +0300 Subject: [PATCH 11/12] Apply `IncrementGuard` --- plugin/build.gradle.kts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugin/build.gradle.kts b/plugin/build.gradle.kts index 735f68b1..3b032927 100644 --- a/plugin/build.gradle.kts +++ b/plugin/build.gradle.kts @@ -19,6 +19,7 @@ */ import io.spine.gradle.internal.Deps +import io.spine.gradle.internal.IncrementGuard import org.apache.tools.ant.filters.ReplaceTokens plugins { @@ -30,6 +31,8 @@ plugins { `prepare-config-resources` } +apply() + val spineVersion: String by extra val spineBaseVersion: String by extra From 7658794578e441beba4502af4c34b43a74e798c6 Mon Sep 17 00:00:00 2001 From: Dmytro Dashenkov Date: Wed, 3 Jun 2020 18:23:13 +0300 Subject: [PATCH 12/12] Make examples in `README` look like Kotlin and Groovy at the same time --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ed0d2a16..9a3c9e6d 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The Gradle plugin for bootstrapping projects built with Spine. In order to apply the plugin to a Gradle project, in `build.gralde` add the following config: ```gradle plugins { - id 'io.spine.tools.gradle.bootstrap' version '1.5.8' + id("io.spine.tools.gradle.bootstrap").version("1.5.8") } ``` @@ -51,7 +51,7 @@ In order to use the same version for other Spine libraries, please use `sine.ver ```gradle dependencies { //... - testImplementation "io.spine:spine-testutil-server:${spine.version()}" + testImplementation("io.spine:spine-testutil-server:${spine.version()}") } ```