Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion annotation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,10 @@ spine {
}
}

//spineCompilerRemoteDebug(enabled = false)
afterEvaluate {
spineCompilerRemoteDebug(enabled = false)

val kspKotlin by tasks.getting
val launchSpineCompiler by tasks.getting
kspKotlin.dependsOn(launchSpineCompiler)
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
package io.spine.tools.core.jvm.annotation

import com.intellij.psi.PsiMethod
import io.spine.string.Separator
import io.spine.string.camelCase
import io.spine.tools.compiler.ast.FieldName
import io.spine.tools.compiler.jvm.ClassName
import io.spine.tools.compiler.jvm.file.locate
import io.spine.tools.compiler.render.InsertionPoint
import io.spine.string.Separator
import io.spine.string.camelCase
import io.spine.text.TextCoordinates
import io.spine.text.TextFactory.text
import io.spine.tools.compiler.render.TextCoordinates
import io.spine.tools.compiler.render.TextFactory.text
import io.spine.tools.psi.document

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,10 @@
*/

import io.spine.dependency.lib.Grpc
import io.spine.dependency.local.Spine
import io.spine.dependency.local.Base
import io.spine.gradle.repo.standardToSpineSdk
import org.gradle.api.tasks.JavaExec
import org.gradle.kotlin.dsl.all
import org.gradle.kotlin.dsl.invoke
import org.gradle.kotlin.dsl.resolutionStrategy

buildscript {

Expand Down
6 changes: 6 additions & 0 deletions base/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,9 @@ project.afterEvaluate {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
}

afterEvaluate {
val kspKotlin by tasks.getting
val launchSpineCompiler by tasks.getting
kspKotlin.dependsOn(launchSpineCompiler)
}
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ buildscript {
force(
io.spine.dependency.lib.Kotlin.bom,
io.spine.dependency.lib.Jackson.bom,
io.spine.dependency.local.Base.annotations,
io.spine.dependency.local.Base.libForBuildScript,
io.spine.dependency.local.Reflect.lib,
toolBase.lib,
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ val grGitVersion = "4.1.1"
* This version may change from the [version of Kotlin][io.spine.dependency.lib.Kotlin.version]
* used by the project.
*/
val kotlinEmbeddedVersion = "2.1.21"
val kotlinEmbeddedVersion = "2.2.20"

/**
* The version of Guava used in `buildSrc`.
Expand Down Expand Up @@ -144,7 +144,7 @@ val koverVersion = "0.9.1"
*
* @see <a href="https://github.com/GradleUp/shadow">Shadow Plugin releases</a>
*/
val shadowVersion = "8.3.6"
val shadowVersion = "9.2.2"

configurations.all {
resolutionStrategy {
Expand Down
16 changes: 15 additions & 1 deletion buildSrc/src/main/kotlin/BuildExtensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,18 @@ import io.spine.dependency.build.GradleDoctor
import io.spine.dependency.build.Ksp
import io.spine.dependency.build.PluginPublishPlugin
import io.spine.dependency.lib.Protobuf
import io.spine.dependency.local.CoreJvmCompiler
import io.spine.dependency.local.Compiler
import io.spine.dependency.local.CoreJvmCompiler
import io.spine.dependency.local.McJava
import io.spine.dependency.local.ProtoTap
import io.spine.dependency.test.Kotest
import io.spine.dependency.test.Kover
import io.spine.gradle.repo.standardToSpineSdk
import org.gradle.api.Project
import org.gradle.api.Task
import org.gradle.api.file.DuplicatesStrategy
import org.gradle.api.tasks.JavaExec
import org.gradle.jvm.tasks.Jar
import org.gradle.kotlin.dsl.ScriptHandlerScope
import org.gradle.plugin.use.PluginDependenciesSpec
import org.gradle.plugin.use.PluginDependencySpec
Expand Down Expand Up @@ -347,3 +349,15 @@ val buildToolConfigurations: Array<String> = arrayOf(
"ksp",
"dokka",
)

/**
* Make the `sourcesJar` task accept duplicated input which seems to occur
* somewhere inside Protobuf Gradle Plugin.
*/
fun Project.allowDuplicationInSourcesJar() {
tasks.withType(Jar::class.java).configureEach {
if (name == "sourcesJar") {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
}
}
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/io/spine/dependency/Dependency.kt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ abstract class Dependency {
/**
* The [modules] given with the [version].
*/
final val artifacts: Map<String, String> by lazy {
val artifacts: Map<String, String> by lazy {
modules.associateWith { "$it:$version" }
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ package io.spine.dependency.build
*/
@Suppress("unused", "ConstPropertyName")
object GradleDoctor {
const val version = "0.10.0"
const val version = "0.12.0"
const val pluginId = "com.osacky.doctor"
}
1 change: 1 addition & 0 deletions buildSrc/src/main/kotlin/io/spine/dependency/build/Ksp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import io.spine.dependency.Dependency
*/
@Suppress("unused")
object Ksp : Dependency() {
//val dogfoodingVersion = "2.1.21-2.0.1"
override val version = "2.1.21-2.0.1"
override val group = "com.google.devtools.ksp"

Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/io/spine/dependency/lib/Kotlin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ object Kotlin : DependencyWithBom() {
* depend on Gradle and the version of embedded Kotlin.
*/
@Suppress("MemberVisibilityCanBePrivate") // used directly from the outside.
const val runtimeVersion = "2.1.21"
const val runtimeVersion = "2.2.20"

override val version = runtimeVersion
override val group = "org.jetbrains.kotlin"
Expand All @@ -49,7 +49,7 @@ object Kotlin : DependencyWithBom() {
* This is the version of
* [Kotlin embedded into Gradle](https://docs.gradle.org/current/userguide/compatibility.html#kotlin).
*/
const val embeddedVersion = "2.1.21"
const val embeddedVersion = "2.2.20"

/**
* The version of the JetBrains annotations library, which is a transitive
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/io/spine/dependency/local/Base.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ package io.spine.dependency.local
*/
@Suppress("ConstPropertyName", "unused")
object Base {
const val version = "2.0.0-SNAPSHOT.360"
const val versionForBuildScript = "2.0.0-SNAPSHOT.360"
const val version = "2.0.0-SNAPSHOT.362"
const val versionForBuildScript = "2.0.0-SNAPSHOT.362"
const val group = Spine.group
const val artifact = "spine-base"
const val lib = "$group:$artifact:$version"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ object Compiler {
* The version of ProtoData dependencies.
*/
val version: String
private const val fallbackVersion = "2.0.0-SNAPSHOT.024"
private const val fallbackVersion = "2.0.0-SNAPSHOT.026"

/**
* The distinct version of ProtoData used by other build tools.
Expand All @@ -79,7 +79,7 @@ object Compiler {
* transitional dependencies, this is the version used to build the project itself.
*/
val dogfoodingVersion: String
private const val fallbackDfVersion = "2.0.0-SNAPSHOT.024"
private const val fallbackDfVersion = "2.0.0-SNAPSHOT.026"

/**
* The artifact for the ProtoData Gradle plugin.
Expand Down
9 changes: 7 additions & 2 deletions buildSrc/src/main/kotlin/io/spine/dependency/local/CoreJvm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ typealias CoreJava = CoreJvm
@Suppress("ConstPropertyName", "unused")
object CoreJvm {
const val group = Spine.group
const val version = "2.0.0-SNAPSHOT.330"
const val version = "2.0.0-SNAPSHOT.332"

const val coreArtifact = "spine-core"
const val clientArtifact = "spine-client"
Expand All @@ -47,5 +47,10 @@ object CoreJvm {
const val client = "$group:$clientArtifact:$version"
const val server = "$group:$serverArtifact:$version"

const val testUtilServer = "${ToolBase.group}:spine-testutil-server:$version"
@Deprecated("Use `serverTestLib` instead.", ReplaceWith("serverTestLib"))
const val testUtilServer = "${Spine.toolsGroup}:spine-server-testlib:$version"

const val coreTestLib = "${Spine.toolsGroup}:spine-core-testlib:$version"
const val clientTestLib = "${Spine.toolsGroup}:spine-client-testlib:$version"
const val serverTestLib = "${Spine.toolsGroup}:spine-server-testlib:$version"
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ object CoreJvmCompiler {
/**
* The version used to in the build classpath.
*/
const val dogfoodingVersion = "2.0.0-SNAPSHOT.014"
const val dogfoodingVersion = "2.0.0-SNAPSHOT.015"

/**
* The version to be used for integration tests.
*/
const val version = "2.0.0-SNAPSHOT.014"
const val version = "2.0.0-SNAPSHOT.015"

/**
* The ID of the Gradle plugin.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ package io.spine.dependency.local
"unused"
)
object McJava {
const val group = ToolBase.group
const val group = Spine.toolsGroup

/**
* The version used to in the build classpath.
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/io/spine/dependency/local/TestLib.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ package io.spine.dependency.local
*/
@Suppress("ConstPropertyName")
object TestLib {
const val version = "2.0.0-SNAPSHOT.210"
const val group = ToolBase.group
const val version = "2.0.0-SNAPSHOT.211"
const val group = Spine.toolsGroup
const val artifact = "spine-testlib"
const val lib = "$group:$artifact:$version"
}
40 changes: 0 additions & 40 deletions buildSrc/src/main/kotlin/io/spine/dependency/local/Text.kt

This file was deleted.

2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/io/spine/dependency/local/Time.kt
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ object Time {
const val artifact = "spine-time"
const val lib = "$group:$artifact:$version"

const val testLib = "${ToolBase.group}:spine-time-testlib:$version"
const val testLib = "${Spine.toolsGroup}:spine-time-testlib:$version"
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ object ToolBase {
const val intellijPlatformJava = "$group:intellij-platform-java:$version"

const val psi = "$group:psi:$version"
const val psiJava = "$group:psi-java:$version"
const val psiJavaArtifactName = "psi-java"
const val psiJava = "$group:$psiJavaArtifactName:$version"

const val gradleRootPlugin = "$group:gradle-root-plugin:$version"
const val gradlePluginApi = "$group:gradle-plugin-api:$version"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ object Validation {
/**
* The version of the Validation library artifacts.
*/
const val version = "2.0.0-SNAPSHOT.351"
const val version = "2.0.0-SNAPSHOT.352"

/**
* The last version of Validation compatible with ProtoData.
Expand Down
7 changes: 4 additions & 3 deletions buildSrc/src/main/kotlin/io/spine/dependency/test/Kotest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ package io.spine.dependency.test
*/
@Suppress("unused", "ConstPropertyName")
object Kotest {
const val version = "5.9.1"
const val version = "6.0.3"
const val group = "io.kotest"
const val assertions = "$group:kotest-assertions-core:$version"
const val runnerJUnit5 = "$group:kotest-runner-junit5:$version"
Expand All @@ -46,14 +46,15 @@ object Kotest {

// https://plugins.gradle.org/plugin/io.kotest.multiplatform
object MultiplatformGradlePlugin {
const val version = Kotest.version
const val version = "6.0.0.M4"
const val id = "io.kotest.multiplatform"
const val classpath = "$group:kotest-framework-multiplatform-plugin-gradle:$version"
}

// https://github.com/kotest/kotest-gradle-plugin
@Deprecated("The repository is archived. Use `io.kotest.multiplatform` plugin instead.")
object JvmGradlePlugin {
const val version = "0.4.10"
const val version = "0.4.11"
const val id = "io.kotest"
const val classpath = "$group:kotest-gradle-plugin:$version"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
*/
fun ShadowJar.handleMergingServiceFiles() {
ServiceFiles.all.forEach {
mergeServiceFiles(it)
append(it)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class JacocoConfig(

private fun registerRootReport(
tasks: TaskContainer,
copyReports: TaskProvider<Copy>?
copyReports: TaskProvider<Copy>
): TaskProvider<JacocoReport> {
val allSourceSets = Projects(projects).sourceSets()
val mainJavaSrcDirs = allSourceSets.mainJavaSrcDirs()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,8 @@ fun Project.dependencies(): SortedSet<ScopedDependency> {
private fun Project.depsFromAllConfigurations(): Set<ModuleDependency> {
val result = mutableSetOf<ModuleDependency>()
this.configurations.forEach { configuration ->
if (configuration.isCanBeResolved) {
// Force resolution of the configuration.
configuration.resolvedConfiguration
}
configuration.dependencies.filter { it.isExternal() }
configuration.dependencies
.filter { it.isExternal() }
.forEach { dependency ->
val forcedVersion = configuration.forcedVersionOf(dependency)
val moduleDependency =
Expand Down
Loading
Loading