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/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()}") } ``` 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/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts new file mode 100644 index 00000000..60e0fb21 --- /dev/null +++ b/buildSrc/build.gradle.kts @@ -0,0 +1,34 @@ +/* + * 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 { + `kotlin-dsl` +} + +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/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 66% rename from gradle/func-test-env.gradle rename to buildSrc/src/main/kotlin/func-test-env.gradle.kts index fbad83c2..ee3f7efd 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,38 @@ 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 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/io/spine/gradle/internal/CheckVersionIncrement.kt b/buildSrc/src/main/kotlin/io/spine/gradle/internal/CheckVersionIncrement.kt new file mode 100644 index 00000000..45e02672 --- /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.DefaultTask +import org.gradle.api.GradleException +import org.gradle.api.Project +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 : DefaultTask() { + + /** + * 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 + 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..39190d21 --- /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) { + repository = PublishingRepos.cloudRepo + tasks.getByName("check").dependsOn(this) + + 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..48dd298e --- /dev/null +++ b/buildSrc/src/main/kotlin/io/spine/gradle/internal/RunBuild.kt @@ -0,0 +1,92 @@ +/* + * 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.DefaultTask +import org.gradle.api.GradleException +import org.gradle.api.tasks.Internal +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 : DefaultTask() { + + /** + * Path to the directory which contains a Gradle wrapper script. + */ + @Internal + 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..6846093b --- /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 { + resolutionStrategy { + failOnVersionConflict() + cacheChangingModulesFor(0, "seconds") + @Suppress("DEPRECATION") // Force SLF4J version. + 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 { + url = URI(Repos.spine) + content { + includeGroup("io.spine") + includeGroup("io.spine.tools") + includeGroup("io.spine.gcloud") + } + } + repositories.jcenter() + repositories.maven { + url = URI(Repos.gradlePlugins) + } + } +} 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..5b242dc0 --- /dev/null +++ b/buildSrc/src/main/kotlin/prepare-config-resources.gradle.kts @@ -0,0 +1,94 @@ +/* + * 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" + +val copyModelCompilerConfig by tasks.registering(Copy::class) { + group = taskGroup + + from(file("$configDir/gradle/model-compiler.gradle")) + into(file(bootstrapDir)) + + doFirst { + bootstrapDir.mkdirs() + } +} + +tasks.processResources { + dependsOn(copyModelCompilerConfig) +} + +val spineBaseVersion: String by extra +val spineTimeVersion: String by extra +val spineVersion: String by extra + +val writeDependencies by tasks.registering { + group = taskGroup + + inputs.dir(configDir) + inputs.property("version", spineVersion) + outputs.file(versionSnapshot) + + doFirst { + bootstrapDir.mkdirs() + if (!versionSnapshot.exists()) { + versionSnapshot.createNewFile() + } + } + + doLast { + val artifacts = Properties() + + 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) + artifacts.setProperty("grpc.protobuf", Deps.grpc.protobuf) + artifacts.setProperty("repository.spine.release", Repos.spine) + artifacts.setProperty("repository.spine.snapshot", Repos.spineSnapshots) + + FileWriter(versionSnapshot).use { + artifacts.store(it, "Dependencies and versions required by Spine.") + } + } +} + +tasks.processResources { + dependsOn(writeDependencies) +} diff --git a/config b/config index c1943fb8..47048aed 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit c1943fb850638140a9cba78c16e7b7e9f96841ef +Subproject commit 47048aed2a242a17c959577515b0548eb58fb984 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/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.' - ) - } -} diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index f3d88b1c..62d4c053 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a4b44297..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.3-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 b28cff0a..292935a8 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 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 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..3b032927 --- /dev/null +++ b/plugin/build.gradle.kts @@ -0,0 +1,114 @@ +/* + * 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.IncrementGuard +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` +} + +apply() + +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/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/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) ); 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 { 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/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 90% rename from version.gradle rename to version.gradle.kts index a4e4ba49..d1716aa3 100644 --- a/version.gradle +++ b/version.gradle.kts @@ -29,8 +29,6 @@ * 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 spineTimeVersion: String by extra("1.5.12") +val spineVersion: String by extra("1.5.14")