diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9b9c544..ddf1402 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,10 +26,10 @@ jobs: shell: bash run: ./substitute-settings.py env: - COMPILER_VERSION: "2.0.0-SNAPSHOT.016" + COMPILER_VERSION: "2.0.0-SNAPSHOT.024" VALIDATION_VERSION: "2.0.0-SNAPSHOT.351" CORE_JVM_VERSION: "2.0.0-SNAPSHOT.330" - CORE_JVM_COMPILER_VERSION: "2.0.0-SNAPSHOT.007" + CORE_JVM_COMPILER_VERSION: "2.0.0-SNAPSHOT.015" - name: Build project shell: bash diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml index dd947c3..8ac8ac7 100644 --- a/.idea/kotlinc.xml +++ b/.idea/kotlinc.xml @@ -3,11 +3,7 @@ - - - - + \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 654370d..b563c7f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -25,14 +25,13 @@ */ import io.spine.gradle.UpdateJournal -import io.spine.gradle.base.build import io.spine.gradle.repo.standardToSpineSdk import java.util.function.Supplier buildscript { standardSpineSdkRepositories() dependencies { - classpath(variantOf(libs.coreJvmCompiler) { classifier("all") }) + classpath(libs.coreJvmCompiler) } } diff --git a/buildSrc/src/main/kotlin/LicenseSettings.kt b/buildSrc/src/main/kotlin/LicenseSettings.kt deleted file mode 100644 index 70eb367..0000000 --- a/buildSrc/src/main/kotlin/LicenseSettings.kt +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2025, TeamDev. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * 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. - */ - -/** - * The settings of the software license which apply to the code of this project. - * - * The constants defined in this object are used by the - * [PublicationHandler][io.spine.gradle.publish.PublicationHandler] to set up - * corresponding properties of the published `pom.xml` file of an artifact. - * - * So, in order to adapt the license settings to the requirements of a particular project, - * simply change the values of the constants defined in this object. - * - * @see io.spine.gradle.publish.PublicationHandler - */ -@Suppress("ConstPropertyName", "unused") // https://bit.ly/kotlin-prop-names -object LicenseSettings { - const val name = "The Apache License, Version 2.0" - const val url = "https://www.apache.org/licenses/LICENSE-2.0.txt" -} diff --git a/buildSrc/src/main/kotlin/Strings.kt b/buildSrc/src/main/kotlin/Strings.kt deleted file mode 100644 index 19e0c21..0000000 --- a/buildSrc/src/main/kotlin/Strings.kt +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2025, TeamDev. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * This file provides extensions to `String` and `CharSequence` that wrap - * analogues from standard Kotlin runtime. - * - * It helps in switching between versions of Gradle which have different versions of - * the Kotlin runtime. Please see the bodies of the extension functions for details on - * switching the implementations depending on the Kotlin version at hand. - * - * Once we migrate to newer Gradle, these wrappers should be inlined with - * the subsequent removal of this source file. - */ -@Suppress("unused") -private const val ABOUT = "" - -/** - * Makes the first character come in the title case. - */ -fun String.titleCaseFirstChar(): String = replaceFirstChar { it.titlecase() } - -/** - * Converts this string to lowercase. - */ -@Deprecated(message = "Please use `lowercase()` instead.", replaceWith = ReplaceWith("lowercase")) -fun String.lowercased(): String = lowercase() diff --git a/buildSrc/src/main/kotlin/config-tester.gradle.kts b/buildSrc/src/main/kotlin/config-tester.gradle.kts deleted file mode 100644 index 21d31e3..0000000 --- a/buildSrc/src/main/kotlin/config-tester.gradle.kts +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2025, TeamDev. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * 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.ConfigTester -import io.spine.gradle.SpineRepos -import io.spine.gradle.cleanFolder -import java.nio.file.Path -import java.nio.file.Paths - -// A reference to `config` to use along with the `ConfigTester`. -val config: Path = Paths.get("./") - -// A temp folder to use to check out the sources of other repositories with the `ConfigTester`. -val tempFolder = File("./tmp") - -// Creates a Gradle task which checks out and builds the selected Spine repositories -// with the local version of `config` and `config/buildSrc`. -ConfigTester(config, tasks, tempFolder) - .addRepo(SpineRepos.baseTypes) // Builds `base-types` at `master`. - .addRepo(SpineRepos.base) // Builds `base` at `master`. - .addRepo(SpineRepos.coreJava) // Builds `core-java` at `master`. - - // This is how one builds a specific branch of some repository: - // .addRepo(SpineRepos.coreJava, Branch("grpc-concurrency-fixes")) - - // Register the produced task under the selected name to invoke manually upon need. - .registerUnder("buildDependants") - -// Cleans the temp folder used to check out the sources from Git. -tasks.register("clean") { - doLast { - cleanFolder(tempFolder) - } -} diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/Build.kt b/buildSrc/src/main/kotlin/io/spine/gradle/Build.kt deleted file mode 100644 index 327031e..0000000 --- a/buildSrc/src/main/kotlin/io/spine/gradle/Build.kt +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2025, TeamDev. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * 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 - -@Suppress("unused") -object Build { - val ci = "true".equals(System.getenv("CI")) -} diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/Clean.kt b/buildSrc/src/main/kotlin/io/spine/gradle/Clean.kt deleted file mode 100644 index 380e835..0000000 --- a/buildSrc/src/main/kotlin/io/spine/gradle/Clean.kt +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2025, TeamDev. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * 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 - -import java.io.File -import java.nio.file.Files -import java.nio.file.Path - -/** - * Cleans the folder and all of its content. - */ -fun cleanFolder(folder: File) { - if(!folder.exists()) { - return - } - if(!folder.isDirectory) { - throw IllegalArgumentException("A folder to clean " + - "must be supplied: `${folder.absolutePath}`.") - } - Files.walk(folder.toPath()) - .sorted(Comparator.reverseOrder()) - .map(Path::toFile) - .forEach(File::delete) -} diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/ConfigTester.kt b/buildSrc/src/main/kotlin/io/spine/gradle/ConfigTester.kt deleted file mode 100644 index e5c3007..0000000 --- a/buildSrc/src/main/kotlin/io/spine/gradle/ConfigTester.kt +++ /dev/null @@ -1,363 +0,0 @@ -/* - * Copyright 2025, TeamDev. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * 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. - */ - -@file:Suppress("unused") /* Some constants may be used throughout the Spine repos. */ - -package io.spine.gradle - -import java.io.File -import java.net.URI -import java.nio.file.Files -import java.nio.file.Path -import org.ajoberstar.grgit.Grgit -import org.gradle.api.tasks.TaskContainer - -/** - * A tool to execute the Gradle `build` task in selected Git repositories - * with the local version of [config] contents. - * - * Checks out the content of selected repositories into the specified [tempFolder]. The folder - * is created if it does not exist. By default, uses `./tmp` as a temp folder. - * - * Replaces the `config` and `buildSrc` folders in the checked out repository by the local versions - * of code. If the repository-under-test already contains its own `buildSrc` or `config` folders, - * they are NOT overwritten, but rather renamed into `buildSrc-original` and `config-original` - * accordingly. This allows further tracing if the build fails. - * - * Uses Gradle's [tasks] container to register itself as a Gradle task. - * - * This tool uses `println`s to print out its state. This is done to simplify the configuration - * and dependencies. - * - * When running the Gradle build for each repository, a [RunBuild] task is used. Error and debug - * logs of each Gradle test build are written according to this task's implementation. - */ -class ConfigTester( - private val config: Path, - private val tasks: TaskContainer, - private val tempFolder: File = File("./tmp") -) { - - companion object { - - /** - * Gradle build timeout. - */ - private const val BUILD_TIMEOUT_MINUTES = 30L - } - - private val buildSrc: Path = config.resolve("buildSrc") - - /** - * Git repositories to test. - */ - private val repos: MutableList = ArrayList() - - /** - * Adds a Git [repo] into the test build by its URI. - * - * The `master` branch is used as the one to checkout. - */ - fun addRepo(repo: URI): ConfigTester { - repos.add(GitRepository(repo)) - return this - } - - /** - * Adds a test - */ - fun addRepo(repo: URI, branch: Branch): ConfigTester { - repos.add(GitRepository(repo, branch)) - return this - } - - fun registerUnder(taskName: String) { - val tasksPerRepo = repos.map { testWithConfig(it) } - - tasks.register(taskName) { - for (repoTaskName in tasksPerRepo) { - dependsOn(repoTaskName) - } - } - } - - private fun testWithConfig(gitRepo: GitRepository): String { - val runGradleName = runGradleTask(gitRepo) - doRegisterRunBuild(runGradleName, gitRepo) - - val executeBuildName = executeBuildTask(gitRepo) - doRegisterExecuteBuild(executeBuildName, gitRepo, runGradleName) - return executeBuildName - } - - private fun doRegisterExecuteBuild( - executeBuildName: String, - gitRepo: GitRepository, - runGradleName: String - ) { - tasks.register(executeBuildName) { - doLast { - println(" *** Testing `config` and `config/buildSrc` with `${gitRepo.name}`. ***") - val ignoredFolder = tempFolder.toPath() - gitRepo.checkout(tempFolder) - .replaceBuildSrc(buildSrc, ignoredFolder).replaceConfig(config, ignoredFolder) - } - finalizedBy(runGradleName) - } - } - - private fun doRegisterRunBuild( - runGradleName: String, - gitRepo: GitRepository, - ) { - tasks.register(runGradleName, RunBuild::class.java) { - doFirst { - println("`${gitRepo.name}`: starting Gradle build...") - } - doLast { - println("*** `${gitRepo.name}`: Gradle build completed. ***") - } - directory = gitRepo.prepareCheckout(tempFolder).absolutePath - maxDurationMins = BUILD_TIMEOUT_MINUTES - } - } - - private fun runGradleTask(repo: GitRepository): String { - return "run-gradle-${repo.name}" - } - - private fun executeBuildTask(repo: GitRepository): String { - return "execute-build-${repo.name}" - } -} - -/** - * A repository of source code hosted using Git. - */ -class GitRepository( - - /** - * URI pointing to the location of the repository. - */ - private val uri: URI, - - /** - * A branch to checkout. - * - * By default, points to `master`. - */ - private val branch: Branch = Branch("master"), -) { - /** - * The name of this repository. - */ - val name: String - - init { - name = repoName(uri) - } - - fun prepareCheckout(destinationFolder: File): File { - if (!destinationFolder.exists()) { - destinationFolder.mkdirs() - } - - val result = destinationFolder.toPath().resolve(name) - Files.createDirectories(result) - return result.toFile() - } - - /** - * Performs the checkout of the source code for this repository - * to the specified [destinationFolder]. - * - * The source code is put to the sub-folder named after the repository. - * E.g., for `https://github.com/acme-org/foobar` the code is placed under - * the `destinationFolder/foobar` folder. - * - * If the supplied folder does not exist, it is created. - */ - fun checkout(destinationFolder: File): ClonedRepo { - val preparedFolder = prepareCheckout(destinationFolder).toPath() - println( - "Checking out the `$uri` repository at `${branch.name}` " + - "to `${preparedFolder.toAbsolutePath()}`." - ) - - Grgit.clone( - mapOf( - "dir" to preparedFolder, - "uri" to uri - ) - ).checkout( - mapOf( - "branch" to branch.name - ) - ) - return ClonedRepo(this, preparedFolder) - } - - private fun repoName(resourceLocation: URI): String { - var path = resourceLocation.path - if (path.endsWith('/')) { - path = path.substring(0, path.length - 1) - } - val fromLastSlash = path.lastIndexOf('/') + 1 - val repoName = path.substring(fromLastSlash) - return repoName - } - - /** - * Returns a new Git repository pointing to some particular Git [branch]. - */ - fun at(branch: Branch): GitRepository { - return GitRepository(uri, branch) - } -} - -/** - * The cloned Git repository. - */ -class ClonedRepo( - - /** - * Origin Git repository which is cloned. - */ - private val repo: GitRepository, - - /** - * The location into which the [repo] is cloned. - */ - private val location: Path -) { - - /** - * Replaces the `buildSrc` folder in this cloned repository by the contents - * of the folder defined by the [source]. - * - * [source] is expected to be another `buildSrc` folder. - * - * The original `buildSrc` folder, if it exists in this cloned repo, is renamed - * to `buildSrc-original`. - * - * Optionally, takes an [ignoredFolder] which will be excluded from the [source] paths - * when copying. - * - * - * Returns this instance of `ClonedRepo`, for call chaining. - */ - fun replaceBuildSrc(source: Path, ignoredFolder: Path?): ClonedRepo { - replaceFolder("buildSrc", source, ignoredFolder) - return this - } - - /** - * Replaces the `config` folder in this cloned repository by the contents - * of the folder defined by the [source]. - * - * [source] is expected to be another `config` folder. - * - * The original `config` folder, if it exists in this cloned repo, is renamed - * to `config-original`. - * - * Optionally, takes an [ignoredFolder] which will be excluded from the [source] paths - * when copying. - * - * Returns this instance of `ClonedRepo`, for call chaining. - */ - fun replaceConfig(source: Path, ignoredFolder: Path?): ClonedRepo { - replaceFolder("config", source, ignoredFolder) - return this - } - - private fun replaceFolder(folderName: String, source: Path, ignoredFolder: Path?) { - val folder = location.resolve(folderName) - val rawFolder = folder.toFile() - if (rawFolder.exists() && rawFolder.isDirectory) { - val toRenameInto = location.resolve(folderName + "-original") - println("Renaming ${folder.toAbsolutePath()} into ${toRenameInto.toAbsolutePath()}.") - rawFolder.renameTo(toRenameInto.toFile()) - } - println( - "Copying the files from ${source.toAbsolutePath()} " + - "into ${folder.toAbsolutePath()}." - ) - copyFolder(source, ignoredFolder, folder) - } - - @Suppress("TooGenericExceptionCaught") - private fun copyFolder(sourceFolder: Path, ignoredFolder: Path?, destinationFolder: Path) { - try { - copyRecursively(sourceFolder, ignoredFolder, destinationFolder) - } catch (e: Exception) { - throw IllegalStateException( - "Error copying folder `$sourceFolder` to `$destinationFolder`.", e - ) - } - } - - private fun copyRecursively(sourceFolder: Path, ignoredFolder: Path?, destinationFolder: Path) { - fun Path.isIgnored(): Boolean = ignoredFolder - ?.let { toAbsolutePath().startsWith(it.toAbsolutePath()) } - ?: false - - val flattenedTree = Files.walk(sourceFolder).filter { it.isIgnored().not() } - val filesToDestinations = flattenedTree.map { file -> - val destination = destinationFolder.resolve(sourceFolder.relativize(file)) - file to destination - } - - val directories = filesToDestinations.filter { Files.isDirectory(it.first) } - directories.forEach { Files.createDirectories(it.second) } - - val files = filesToDestinations.filter { Files.isDirectory(it.first).not() } - files.forEach { Files.copy(it.first, it.second) } - } -} - -/** - * Spine repositories at GitHub. - * - * The list is expected to grow over time. - */ -object SpineRepos { - - const val libsOrg: String = "https://github.com/SpineEventEngine/" - const val examplesOrg: String = "https://github.com/spine-examples/" - - val base: URI = library("base") - val baseTypes: URI = library("base-types") - val coreJava: URI = library("core-java") - val web: URI = library("web") - - private fun library(repo: String) = URI(libsOrg + repo) - private fun example(repo: String) = URI(examplesOrg + repo) -} - -/** - * A name of a Git branch. - */ -data class Branch(val name: String) diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/ProjectExtensions.kt b/buildSrc/src/main/kotlin/io/spine/gradle/ProjectExtensions.kt deleted file mode 100644 index 1a0c615..0000000 --- a/buildSrc/src/main/kotlin/io/spine/gradle/ProjectExtensions.kt +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright 2025, TeamDev. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * 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 - -import java.io.File -import org.gradle.api.Plugin -import org.gradle.api.Project -import org.gradle.api.Task -import org.gradle.api.plugins.JavaPluginExtension -import org.gradle.api.tasks.SourceSetContainer -import org.gradle.kotlin.dsl.findByType -import org.gradle.kotlin.dsl.getByType - -/** - * This file contains extension methods and properties for the Gradle `Project`. - */ - -/** - * Logs the result of the function using the project logger at `INFO` level. - */ -fun Project.log(message: () -> String) { - if (logger.isInfoEnabled) { - logger.info(message.invoke()) - } -} - -/** - * Obtains the Java plugin extension of the project. - */ -val Project.javaPluginExtension: JavaPluginExtension - get() = extensions.getByType() - -/** - * Obtains source set container of the Java project. - */ -val Project.sourceSets: SourceSetContainer - get() = javaPluginExtension.sourceSets - -/** - * Applies the specified Gradle plugin to this project by the plugin [class][cls]. - */ -fun Project.applyPlugin(cls: Class>) { - this.apply { - plugin(cls) - } -} - -/** - * Finds the task of type `T` in this project by the task name. - * - * The task must be present. Also, a caller is responsible for using the proper value of - * the generic parameter `T`. - */ -@Suppress("UNCHECKED_CAST") /* See the method docs. */ -fun Project.getTask(name: String): T { - val task = this.tasks.findByName(name) - ?: error("Unable to find a task named `$name` in the project `${this.name}`.") - return task as T -} - -/** - * Returns project's build directory as [File]. - */ -val Project.buildDirectory: File - get() = layout.buildDirectory.get().asFile diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/RunBuild.kt b/buildSrc/src/main/kotlin/io/spine/gradle/RunBuild.kt deleted file mode 100644 index aa2759d..0000000 --- a/buildSrc/src/main/kotlin/io/spine/gradle/RunBuild.kt +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2025, TeamDev. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * 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 - -/** - * Runs the `build` task via Gradle Wrapper. - */ -open class RunBuild : RunGradle() { - - init { - task("clean", "build") - } -} diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/RunGradle.kt b/buildSrc/src/main/kotlin/io/spine/gradle/RunGradle.kt deleted file mode 100644 index 8942630..0000000 --- a/buildSrc/src/main/kotlin/io/spine/gradle/RunGradle.kt +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright 2025, TeamDev. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * 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 - -import java.io.File -import java.io.FileOutputStream -import java.util.concurrent.TimeUnit -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 - -/** - * A Gradle task which runs another Gradle build. - * - * Launches Gradle wrapper under a given [directory] with the specified [taskNames] names. - * 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`. - */ -@Suppress("unused") -open class RunGradle : DefaultTask() { - - companion object { - - /** - * Default Gradle build timeout. - */ - private const val BUILD_TIMEOUT_MINUTES: Long = 10 - } - - /** - * Path to the directory which contains a Gradle wrapper script. - */ - @Internal - lateinit var directory: String - - /** - * The names of the tasks to be passed to the Gradle Wrapper script. - */ - private lateinit var taskNames: List - - /** - * For how many minutes to wait for the Gradle build to complete. - */ - @Internal - var maxDurationMins: Long = BUILD_TIMEOUT_MINUTES - - /** - * Names of Gradle properties to copy into the launched build. - * - * The properties are looked up in the root project. If a property is not found, it is ignored. - * - * See [Gradle doc](https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties) - * for more info about Gradle properties. - */ - @Internal - var includeGradleProperties: MutableSet = mutableSetOf() - - /** - * Specifies task names to be passed to the Gradle Wrapper script. - */ - fun task(vararg tasks: String) { - taskNames = tasks.asList() - } - - /** - * Sets the maximum time to wait until the build completion in minutes - * and specifies task names to be passed to the Gradle Wrapper script. - */ - fun task(maxDurationMins: Long, vararg tasks: String) { - taskNames = tasks.asList() - this.maxDurationMins = maxDurationMins - } - - @TaskAction - public fun execute() { - // Ensure build error output log. - // Since we're executing this task in another process, we redirect error output to - // the file under the `_out` directory. Using the `build` directory for this purpose - // proved to cause problems under Windows when executing the `clean` command, which - // fails because another process holds files. - val buildDir = File(directory, "_out") - if (!buildDir.exists()) { - buildDir.mkdir() - } - val errorOut = File(buildDir, "error-out.txt") - errorOut.truncate() - val debugOut = File(buildDir, "debug-out.txt") - debugOut.truncate() - - val command = buildCommand() - val process = startProcess(command, errorOut, debugOut) - - /* The timeout is set because of Gradle process execution under Windows. - See the following locations for details: - https://github.com/gradle/gradle/pull/8467#issuecomment-498374289 - https://github.com/gradle/gradle/issues/3987 - https://discuss.gradle.org/t/weirdness-in-gradle-exec-on-windows/13660/6 - */ - val completed = process.waitFor(maxDurationMins, TimeUnit.MINUTES) - val exitCode = process.exitValue() - if (!completed || exitCode != 0) { - val errorOutExists = errorOut.exists() - if (errorOutExists) { - logger.error(errorOut.readText()) - } - throw GradleException("Child build process FAILED." + - " Exit code: $exitCode." + - if (errorOutExists) " See $errorOut for details." - else " $errorOut file was not created." - ) - } - } - - private fun buildCommand(): List { - val script = buildScript() - val command = mutableListOf() - command.add("${project.rootDir}/$script") - val shouldClean = project.gradle - .taskGraph - .hasTask(":clean") - if (shouldClean) { - command.add("clean") - } - command.addAll(taskNames) - command.add("--console=plain") - command.add("--debug") - command.add("--stacktrace") - command.add("--no-daemon") - addProperties(command) - return command - } - - private fun addProperties(command: MutableList) { - val rootProject = project.rootProject - includeGradleProperties - .filter { rootProject.hasProperty(it) } - .map { name -> name to rootProject.property(name).toString() } - .forEach { (name, value) -> command.add("-P$name=$value") } - } - - private fun buildScript(): String { - val runsOnWindows = OperatingSystem.current().isWindows - return if (runsOnWindows) "gradlew.bat" else "gradlew" - } - - private fun startProcess(command: List, errorOut: File, debugOut: File) = - ProcessBuilder() - .command(command) - .directory(project.file(directory)) - .redirectError(errorOut) - .redirectOutput(debugOut) - .start() -} - -private fun File.truncate() { - val stream = FileOutputStream(this) - stream.use { - it.channel.truncate(0) - } -} diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/Runtime.kt b/buildSrc/src/main/kotlin/io/spine/gradle/Runtime.kt deleted file mode 100644 index 0a32c33..0000000 --- a/buildSrc/src/main/kotlin/io/spine/gradle/Runtime.kt +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright 2025, TeamDev. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * 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. - */ - -@file:Suppress("unused") - -package io.spine.gradle - -import java.io.File -import java.io.InputStream -import java.io.StringWriter -import java.lang.ProcessBuilder.Redirect.PIPE -import java.util.* - -/** - * Utilities for working with processes from Gradle code. - */ -@Suppress("unused") -private const val ABOUT = "" - -/** - * Executor of CLI commands. - * - * Uses the passed [workingFolder] as the directory in which the commands are executed. - */ -class Cli(private val workingFolder: File) { - - /** - * Executes the given terminal command and retrieves the command output. - * - * [Executes][Runtime.exec] the given `String` array as a CLI command. - * - * If the execution is successful, returns the command output. - * Throws an [IllegalStateException] otherwise. - * - * @param command the command to execute. - * @return the command line output. - * @throws IllegalStateException if the execution fails. - */ - fun execute(vararg command: String): String { - val outWriter = StringWriter() - val errWriter = StringWriter() - - val process = ProcessBuilder(*command).apply { - directory(workingFolder) - redirectOutput(PIPE) - redirectError(PIPE) - }.start() - - val exitCode = process.run { - inputStream!!.pourTo(outWriter) - errorStream!!.pourTo(errWriter) - waitFor() - } - - if (exitCode == 0) { - return outWriter.toString() - } else { - val commandLine = command.joinToString(" ") - val nl = System.lineSeparator() - val errorMsg = "Command `$commandLine` finished with exit code $exitCode:" + - "$nl$errWriter" + - "$nl$outWriter." - throw IllegalStateException(errorMsg) - } - } -} - -/** - * Asynchronously reads all lines from this [InputStream] and appends them - * to the passed [StringWriter]. - */ -fun InputStream.pourTo(dest: StringWriter) { - Thread { - val sc = Scanner(this) - while (sc.hasNextLine()) { - dest.append(sc.nextLine()) - } - }.start() -} diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/StringExtensions.kt b/buildSrc/src/main/kotlin/io/spine/gradle/StringExtensions.kt deleted file mode 100644 index a185892..0000000 --- a/buildSrc/src/main/kotlin/io/spine/gradle/StringExtensions.kt +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2025, TeamDev. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * 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 - -/** - * Returns `true` if the version of a project contains `snapshot` (in any case), - * `false` otherwise. - */ -fun String.isSnapshot(): Boolean { - return contains("snapshot", ignoreCase = true) -} diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/TaskName.kt b/buildSrc/src/main/kotlin/io/spine/gradle/TaskName.kt deleted file mode 100644 index 7c7abd1..0000000 --- a/buildSrc/src/main/kotlin/io/spine/gradle/TaskName.kt +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2025, TeamDev. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * 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 - -import kotlin.reflect.KClass -import org.gradle.api.Task -import org.gradle.api.tasks.TaskContainer -import org.gradle.kotlin.dsl.named -import org.gradle.kotlin.dsl.register - -/** - * A name and a type of a Gradle task. - */ -internal class TaskName( - val value: String, - val clazz: KClass, -) { - companion object { - - fun of(name: String) = TaskName(name, Task::class) - - fun of(name: String, clazz: KClass) = TaskName(name, clazz) - } -} - -/** - * Locates [the task][TaskName] in this [TaskContainer]. - */ -internal fun TaskContainer.named(name: TaskName) = named(name.value, name.clazz) - -/** - * Registers [the task][TaskName] in this [TaskContainer]. - */ -internal fun TaskContainer.register(name: TaskName, init: T.() -> Unit) = - register(name.value, name.clazz, init) diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/UpdateJournal.kt b/buildSrc/src/main/kotlin/io/spine/gradle/UpdateJournal.kt index f34de9e..47dd91a 100644 --- a/buildSrc/src/main/kotlin/io/spine/gradle/UpdateJournal.kt +++ b/buildSrc/src/main/kotlin/io/spine/gradle/UpdateJournal.kt @@ -31,7 +31,6 @@ import java.time.Instant import java.util.function.Supplier import org.gradle.api.DefaultTask import org.gradle.api.provider.MapProperty -import org.gradle.api.provider.Provider import org.gradle.api.tasks.Internal import org.gradle.api.tasks.TaskAction @@ -64,8 +63,7 @@ abstract class UpdateJournal : DefaultTask() { val userName = System.getProperty("user.name") val timestamp = Instant.now().toString() - val printedVersions = printVersions() - val versions = printedVersions + val versions = printVersions() val logRecord = "$duration :: $userName :: $timestamp :: $versions" val logFile = prepareFile() @@ -80,7 +78,10 @@ abstract class UpdateJournal : DefaultTask() { val commentSize = headingComment.size updatedLines.add(commentSize, logRecord) - logFile.writeText(updatedLines.joinToString(System.lineSeparator())) + val separator = System.lineSeparator() + val text = updatedLines.joinToString(separator) + + ((if (updatedLines.last() != separator) separator else "")) + logFile.writeText(text) } private fun prepareFile(): File { diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/base/Tasks.kt b/buildSrc/src/main/kotlin/io/spine/gradle/base/Tasks.kt deleted file mode 100644 index c77b795..0000000 --- a/buildSrc/src/main/kotlin/io/spine/gradle/base/Tasks.kt +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2025, TeamDev. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * 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.base - -import org.gradle.api.Task -import org.gradle.api.tasks.Delete -import org.gradle.api.tasks.TaskContainer -import org.gradle.api.tasks.TaskProvider -import org.gradle.kotlin.dsl.named - -/** - * Locates `clean` task in this [TaskContainer]. - * - * The task deletes the build directory and everything in it, - * i.e. the path specified by the `Project.getBuildDir()` project property. - * - * @see - * Tasks | The Base Plugin - */ -val TaskContainer.clean: TaskProvider - get() = named("clean") - -/** - * Locates `check` task in this [TaskContainer]. - * - * This is a lifecycle task that performs no action itself. - * - * Plugins and build authors should attach their verification tasks, - * such as ones that run tests, to this lifecycle task using `check.dependsOn(myTask)`. - * - * @see - * Tasks | The Base Plugin - */ -val TaskContainer.check: TaskProvider - get() = named("check") - -/** - * Locates `assemble` task in this [TaskContainer]. - * - * This is a lifecycle task that performs no action itself. - * - * Plugins and build authors should attach their assembling tasks that produce distributions and - * other consumable artifacts to this lifecycle task using `assemble.dependsOn(myTask)`. - * - * @see - * Tasks | The Base Plugin - */ -val TaskContainer.assemble: TaskProvider - get() = named("assemble") - -/** - * Locates `build` task in this [TaskContainer]. - * - * Intended to build everything, including running all tests, producing the production artifacts - * and generating documentation. One will probably rarely attach concrete tasks directly - * to `build` as [assemble][io.spine.gradle.base.assemble] and - * [check][io.spine.gradle.base.check] are typically more appropriate. - * - * @see - * Tasks | The Base Plugin - */ -val TaskContainer.build: TaskProvider - get() = named("build") diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/publish/GitHubPackages.kt b/buildSrc/src/main/kotlin/io/spine/gradle/publish/GitHubPackages.kt deleted file mode 100644 index df326b8..0000000 --- a/buildSrc/src/main/kotlin/io/spine/gradle/publish/GitHubPackages.kt +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2025, TeamDev. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * 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.publish - -import io.spine.gradle.repo.Credentials -import io.spine.gradle.repo.Repository -import io.spine.gradle.buildDirectory -import net.lingala.zip4j.ZipFile -import org.gradle.api.Project - -/** - * Maven repositories of Spine Event Engine projects hosted at GitHub Packages. - */ -internal object GitHubPackages { - - /** - * Obtains an instance of the GitHub Packages repository with the given name. - */ - fun repository(repoName: String): Repository { - val githubActor: String = actor() - val url = "https://maven.pkg.github.com/SpineEventEngine/$repoName" - return Repository( - name = "GitHub-Packages", - releases = url, - snapshots = url - ) { project -> project.credentialsWithToken(githubActor) } - } - - private fun actor(): String { - var githubActor: String? = System.getenv("GITHUB_ACTOR") - githubActor = if (githubActor.isNullOrEmpty()) { - "developers@spine.io" - } else { - githubActor - } - return githubActor - } -} - -/** - * This is a trick. Gradle only supports password or AWS credentials. - * Thus, we pass the GitHub token as a "password". - * - * See https://docs.github.com/en/actions/guides/publishing-java-packages-with-gradle#publishing-packages-to-github-packages - */ -private fun Project.credentialsWithToken(githubActor: String) = Credentials( - username = githubActor, - password = readGitHubToken() -) - -private fun Project.readGitHubToken(): String { - val githubToken: String? = System.getenv("GITHUB_TOKEN") - return if (githubToken.isNullOrEmpty()) { - readTokenFromArchive() - } else { - githubToken - } -} - -/** - * Read the personal access token for the `developers@spine.io` account which - * has only the permission to read public GitHub packages. - * - * The token is extracted from the archive called `aus.weis` stored under `buildSrc`. - * The archive has such an unusual name to avoid scanning for tokens placed in repositories - * which is performed by GitHub. Since we do not violate any security, it is OK to - * use such a workaround. - */ -private fun Project.readTokenFromArchive(): String { - val targetDir = "$buildDirectory/token" - file(targetDir).mkdirs() - val fileToUnzip = "${rootDir}/buildSrc/aus.weis" - - logger.info( - "GitHub Packages: reading token by unzipping `$fileToUnzip` into `$targetDir`." - ) - ZipFile(fileToUnzip, "123".toCharArray()).extractAll(targetDir) - val file = file("$targetDir/token.txt") - val result = file.readText() - return result -} diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/publish/JarDsl.kt b/buildSrc/src/main/kotlin/io/spine/gradle/publish/JarDsl.kt deleted file mode 100644 index 1371184..0000000 --- a/buildSrc/src/main/kotlin/io/spine/gradle/publish/JarDsl.kt +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright 2025, TeamDev. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * 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.publish - -/** - * A DSL element of [SpinePublishing] extension which configures publishing of - * [dokkaKotlinJar] artifact. - * - * This artifact contains Dokka-generated documentation. By default, it is not published. - * - * Take a look at the [SpinePublishing.dokkaJar] for a usage example. - * - * @see [artifacts] - */ -class DokkaJar { - /** - * Enables publishing `JAR`s with Dokka-generated documentation for all published modules. - */ - @Suppress("unused") - @Deprecated("Please use `kotlin` and `java` flags instead.") - var enabled = false - - /** - * Controls whether [dokkaKotlinJar] artifact should be published. - * The default value is `true`. - */ - var kotlin = true - - /** - * Controls whether [dokkaJavaJar] artifact should be published. - * The default value is `false`. - */ - var java = false -} - -/** - * A DSL element of [SpinePublishing] extension which allows enabling publishing - * of [testJar] artifact. - * - * This artifact contains compilation output of `test` source set. By default, it is not published. - * - * Take a look on [SpinePublishing.testJar] for a usage example. - - * @see [artifacts] - */ -class TestJar { - - /** - * Set of modules, for which a test JAR will be published. - */ - var inclusions: Set = emptySet() - - /** - * Enables test JAR publishing for all published modules. - */ - var enabled = false -} - -/** - * A DSL element of [SpinePublishing] extension which allows disabling publishing - * of [protoJar] artifact. - * - * This artifact contains all the `.proto` definitions from `sourceSets.main.proto`. By default, - * it is published. - * - * Take a look on [SpinePublishing.protoJar] for a usage example. - * - * @see [artifacts] - */ -class ProtoJar { - - /** - * Set of modules, for which a proto JAR will not be published. - */ - var exclusions: Set = emptySet() - - /** - * Disables proto JAR publishing for all published modules. - */ - var disabled = false -} - -/** - * Flags for turning optional JAR artifacts in a project. - */ -internal data class JarFlags( - - /** - * Tells whether [sourcesJar] artifact should be published. - * - * Default value is `true`. - */ - val sourcesJar: Boolean = true, - - /** - * Tells whether [javadocJar] artifact should be published. - * - * Default value is `true`. - */ - val javadocJar: Boolean = true, - - /** - * Tells whether [protoJar] artifact should be published. - */ - val publishProtoJar: Boolean, - - /** - * Tells whether [testJar] artifact should be published. - */ - val publishTestJar: Boolean, - - /** - * Tells whether [dokkaKotlinJar] artifact should be published. - */ - val publishDokkaKotlinJar: Boolean, - - /** - * Tells whether [dokkaJavaJar] artifact should be published. - */ - val publishDokkaJavaJar: Boolean -) { - internal companion object { - /** - * Creates an instance of [JarFlags] for the project with the given name, - * taking the setup parameters from JAR DSL elements. - */ - fun create( - projectName: String, - protoJar: ProtoJar, - testJar: TestJar, - dokkaJar: DokkaJar - ): JarFlags { - val addProtoJar = (protoJar.exclusions.contains(projectName) || protoJar.disabled).not() - val addTestJar = testJar.inclusions.contains(projectName) || testJar.enabled - return JarFlags( - sourcesJar = true, - javadocJar = true, - addProtoJar, addTestJar, - dokkaJar.kotlin, dokkaJar.java - ) - } - } -} diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/publish/ProtoExts.kt b/buildSrc/src/main/kotlin/io/spine/gradle/publish/ProtoExts.kt deleted file mode 100644 index 874b7f9..0000000 --- a/buildSrc/src/main/kotlin/io/spine/gradle/publish/ProtoExts.kt +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright 2025, TeamDev. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * 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.publish - -import io.spine.gradle.sourceSets -import java.io.File -import org.gradle.api.Project -import org.gradle.api.Task -import org.gradle.api.file.FileTreeElement -import org.gradle.api.file.SourceDirectorySet -import org.gradle.api.tasks.bundling.Jar - -/** - * Tells whether there are any Proto sources in "main" source set. - */ -internal fun Project.hasProto(): Boolean { - val protoSources = protoSources() - val result = protoSources.any { it.exists() } - return result -} - -/** - * Locates directories with proto sources under the "main" source sets. - * - * Special treatment for Proto sources is needed, because they are not Java-related, and, - * thus, not included in `sourceSets["main"].allSource`. - */ -internal fun Project.protoSources(): Set { - val mainSourceSets = sourceSets.filter { - ss -> ss.name.endsWith("main", ignoreCase = true) - } - - val protoExtensions = mainSourceSets.mapNotNull { - it.extensions.findByName("proto") as SourceDirectorySet? - } - - val protoDirs = mutableSetOf() - protoExtensions.forEach { - protoDirs.addAll(it.srcDirs) - } - - return protoDirs -} - -/** - * Checks if the given file belongs to the Google `.proto` sources. - */ -internal fun FileTreeElement.isGoogleProtoSource(): Boolean { - val pathSegments = relativePath.segments - return pathSegments.isNotEmpty() && pathSegments[0].equals("google") -} - -/** - * The reference to the `generateProto` task of a `main` source set. - */ -internal fun Project.generateProto(): Task? = tasks.findByName("generateProto") - -/** - * Makes this [Jar] task depend on the [generateProto] task, if it exists in the same project. - */ -internal fun Jar.dependOnGenerateProto() { - project.generateProto()?.let { - this.dependsOn(it) - } -} diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/publish/PublishingRepos.kt b/buildSrc/src/main/kotlin/io/spine/gradle/publish/PublishingRepos.kt deleted file mode 100644 index eea6dc1..0000000 --- a/buildSrc/src/main/kotlin/io/spine/gradle/publish/PublishingRepos.kt +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2025, TeamDev. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * 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.publish - -import io.spine.gradle.repo.Repository - -/** - * Repositories to which we may publish. - */ -object PublishingRepos { - - val cloudArtifactRegistry = CloudArtifactRegistry.repository - - /** - * Obtains a GitHub repository by the given name. - */ - fun gitHub(repoName: String): Repository = GitHubPackages.repository(repoName) -} diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/repo/Repositories.kt b/buildSrc/src/main/kotlin/io/spine/gradle/repo/Repositories.kt index a713f32..1d6c41f 100644 --- a/buildSrc/src/main/kotlin/io/spine/gradle/repo/Repositories.kt +++ b/buildSrc/src/main/kotlin/io/spine/gradle/repo/Repositories.kt @@ -28,24 +28,12 @@ package io.spine.gradle.repo -import io.spine.gradle.publish.PublishingRepos +import io.spine.gradle.publish.CloudArtifactRegistry import java.net.URI import org.gradle.api.artifacts.dsl.RepositoryHandler import org.gradle.api.artifacts.repositories.MavenArtifactRepository import org.gradle.kotlin.dsl.maven -/** - * Registers the standard set of Maven repositories. - * - * To be used in `buildscript` clauses when a fully-qualified call must be made. - */ -@Suppress("unused") -@Deprecated( - message = "Please use `standardSpineSdkRepositories()`.", - replaceWith = ReplaceWith("standardSpineSdkRepositories()") -) -fun doApplyStandard(repositories: RepositoryHandler) = repositories.standardToSpineSdk() - /** * A scrambled version of PAT generated with the only "read:packages" scope. * @@ -132,23 +120,15 @@ fun RepositoryHandler.standardToSpineSdk() { mavenLocal().includeSpineOnly() } -@Deprecated( - message = "Please use `standardToSpineSdk() instead.", - replaceWith = ReplaceWith("standardToSpineSdk()") -) -fun RepositoryHandler.applyStandard() = this.standardToSpineSdk() - /** * Defines names of additional repositories commonly used in the Spine SDK projects. - * - * @see [applyStandard] */ @Suppress( "ConstPropertyName" // https://bit.ly/kotlin-prop-names ) private object Repos { - val artifactRegistry = PublishingRepos.cloudArtifactRegistry.target(snapshots = false) - val artifactRegistrySnapshots = PublishingRepos.cloudArtifactRegistry.target(snapshots = true) + val artifactRegistry = CloudArtifactRegistry.repository.target(snapshots = false) + val artifactRegistrySnapshots = CloudArtifactRegistry.repository.target(snapshots = true) const val sonatypeSnapshots = "https://oss.sonatype.org/content/repositories/snapshots" } diff --git a/buildSrc/src/main/kotlin/io/spine/gradle/repo/Repository.kt b/buildSrc/src/main/kotlin/io/spine/gradle/repo/Repository.kt index a586ffd..e8fa17a 100644 --- a/buildSrc/src/main/kotlin/io/spine/gradle/repo/Repository.kt +++ b/buildSrc/src/main/kotlin/io/spine/gradle/repo/Repository.kt @@ -37,7 +37,7 @@ import org.gradle.api.Project * for identifying the target repository. * The name must match the [regex]. * @param releases The URL for publishing release versions of artifacts. - * @param snapshots The URL for publishing [snapshot][io.spine.gradle.isSnapshot] versions. + * @param snapshots The URL for publishing snapshot versions. * @param credentialsFile The path to the file which contains the credentials for the registry. * @param credentialValues The function to obtain an instance of [Credentials] from * a Gradle [Project], if [credentialsFile] is not specified. diff --git a/journal.log b/journal.log index a72d27c..46d5ed4 100644 --- a/journal.log +++ b/journal.log @@ -7,6 +7,8 @@ # # Please do not edit this file by hand. # +2:20 :: sanders :: 2025-10-08T18:17:12.931254Z :: Compiler:2.0.0-SNAPSHOT.024;CoreJvmCompiler:2.0.0-SNAPSHOT.015;CoreJvm:2.0.0-SNAPSHOT.330;Validation:2.0.0-SNAPSHOT.351 +2:1 :: sanders :: 2025-10-08T17:22:02.372621Z :: Compiler:2.0.0-SNAPSHOT.024;CoreJvmCompiler:2.0.0-SNAPSHOT.015;CoreJvm:2.0.0-SNAPSHOT.330;Validation:2.0.0-SNAPSHOT.351 2:42 :: sanders :: 2025-09-29T15:14:01.038331Z :: Compiler:2.0.0-SNAPSHOT.016;CoreJvmCompiler:2.0.0-SNAPSHOT.008;CoreJvm:2.0.0-SNAPSHOT.330;Validation:2.0.0-SNAPSHOT.351 2:35 :: sanders :: 2025-09-29T15:03:45.379682Z :: Compiler:2.0.0-SNAPSHOT.016;CoreJvmCompiler:2.0.0-SNAPSHOT.008;CoreJvm:2.0.0-SNAPSHOT.330;Validation:2.0.0-SNAPSHOT.351 2:40 :: sanders :: 2025-09-29T14:43:42.899204Z :: Compiler:2.0.0-SNAPSHOT.016;CoreJvmCompiler:2.0.0-SNAPSHOT.008;CoreJvm:2.0.0-SNAPSHOT.330;Validation:2.0.0-SNAPSHOT.351 @@ -19,4 +21,4 @@ 5:51 :: ddashenkov :: 2023-06-27T12:00:52.733963Z :: core:2.0.0-SNAPSHOT.141;ProtoData:0.8.5;Validation:2.0.0-SNAPSHOT.81;mc-java:2.0.0-SNAPSHOT.151 5:47 :: ddashenkov :: 2023-06-27T10:33:46.829737Z :: core:2.0.0-SNAPSHOT.141;ProtoData:0.8.5;Validation:2.0.0-SNAPSHOT.81;mc-java:2.0.0-SNAPSHOT.151 5:31 :: ddashenkov :: 2023-06-27T10:25:45.749858Z :: core:2.0.0-SNAPSHOT.141;ProtoData:0.8.5;Validation:2.0.0-SNAPSHOT.81;mc-java:2.0.0-SNAPSHOT.151 -3:54 :: ddashenkov :: 2023-06-27T09:26:12.968953Z :: core:2.0.0-SNAPSHOT.141;ProtoData:0.8.5;Validation:2.0.0-SNAPSHOT.81;mc-java:2.0.0-SNAPSHOT.151 \ No newline at end of file +3:54 :: ddashenkov :: 2023-06-27T09:26:12.968953Z :: core:2.0.0-SNAPSHOT.141;ProtoData:0.8.5;Validation:2.0.0-SNAPSHOT.81;mc-java:2.0.0-SNAPSHOT.151 diff --git a/settings.gradle.kts.template b/settings.gradle.kts.template index cb2bddc..3420981 100644 --- a/settings.gradle.kts.template +++ b/settings.gradle.kts.template @@ -51,7 +51,6 @@ dependencyResolutionManagement { val baseGroup = "io.spine" val toolsGroup = baseGroup + ".tools" - val compilerGroup = toolsGroup val validationGroup = baseGroup + ".validation" library(