Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
26d8ddb
Bump version -> `2.0.0-SNAPSHOT.201`
alexander-yevsyukov Apr 26, 2025
7dbf3e6
Update `config`
alexander-yevsyukov Apr 26, 2025
a4331f8
Update `config`
alexander-yevsyukov Apr 27, 2025
cee5c57
Apply `BomPlugin`
alexander-yevsyukov Apr 27, 2025
4aa4be2
Widen the definition of compilation configurations
alexander-yevsyukov Apr 27, 2025
7a0b74d
Migrate to new Truth
alexander-yevsyukov Apr 27, 2025
5f0bdc4
Migrate to JSpecify
alexander-yevsyukov Apr 27, 2025
102e7d1
Add missing test dependency
alexander-yevsyukov Apr 27, 2025
e22e39b
Optimise imports
alexander-yevsyukov Apr 27, 2025
05db53d
Bump Validation -> `2.0.0-SNAPSHOT.314`
alexander-yevsyukov Apr 27, 2025
31c843b
Fix doc language issue
alexander-yevsyukov Apr 27, 2025
2cf9370
Apply `buildSrc` from `tool-base`
alexander-yevsyukov Apr 29, 2025
9bc2ed0
Update dependency reports
alexander-yevsyukov Apr 29, 2025
5014233
Pull `config`
alexander-yevsyukov Apr 29, 2025
185f2f8
Migrate to JSpecify
alexander-yevsyukov Apr 29, 2025
9f6af96
Bump ErrorProne plugin -> `4.2.0`
alexander-yevsyukov Apr 29, 2025
c5adb48
Rollback Protobuf Gradle Plugin of the build to `0.9.4`
alexander-yevsyukov Apr 29, 2025
10a6237
Draft `BomsPlugin`
alexander-yevsyukov Apr 29, 2025
a7bb8b8
Migrate to newer Truth
alexander-yevsyukov Apr 29, 2025
e4aecd0
Improve test dependencies
alexander-yevsyukov Apr 29, 2025
a6c90aa
Migrate to newer Truth
alexander-yevsyukov Apr 29, 2025
1bf269d
Update dependency reports
alexander-yevsyukov Apr 29, 2025
ea72db1
Force platforms
alexander-yevsyukov Apr 29, 2025
640b5d2
Update build time
alexander-yevsyukov Apr 29, 2025
345ecb2
Merge branch 'pull-config' into bump-base
alexander-yevsyukov Apr 29, 2025
0b2add8
Remove already applied testing dependencies
alexander-yevsyukov Apr 29, 2025
bd584e7
Improve code layout
alexander-yevsyukov Apr 30, 2025
94917a4
Rollback Protobuf Gradle Plugin in compilation to `0.9.4`
alexander-yevsyukov Apr 30, 2025
99176eb
Force `Kotlin.stdLib` version
alexander-yevsyukov Apr 30, 2025
77249cb
Update dependency reports
alexander-yevsyukov Apr 30, 2025
eee81db
Force `Kotlin.StdLib.artefacts`
alexander-yevsyukov Apr 30, 2025
49b7139
Update dependency reports
alexander-yevsyukov Apr 30, 2025
ab3895b
Update `JUnit.bom` docs
alexander-yevsyukov Apr 30, 2025
92bc50f
Remove (c) header
alexander-yevsyukov Apr 30, 2025
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
26 changes: 17 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#
# Copyright 2020, TeamDev. All rights reserved.
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
# 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
Expand Down Expand Up @@ -36,7 +36,9 @@

# Internal tool directories.
.fleet/
.kotlin/

# Kotlin temp directories.
**/.kotlin/

# IntelliJ IDEA modules and interim config files.
*.iml
Expand All @@ -56,16 +58,20 @@
# Gradle interim configs
**/.gradle/**

# Temp directory for Gradle TestKit runners
**/.gradle-test-kit/**

# Generated source code
**/generated/**
**/*.pb.dart
**/*.pbenum.dart
**/*.pbserver.dart
**/*.pbjson.dart

# Gradle build files
**/build/**
!**/src/**/build/**

# Do not ignore `build` dependency objects.
!**/buildSrc/src/main/kotlin/io/spine/dependency/build/**

# Build files produced by the IDE
**/out/**

Expand All @@ -84,9 +90,6 @@ gradle-app.setting
# Spine internal directory for storing intermediate artifacts
**/.spine/**

# Spine model compiler auto-generated resources
/tools/gradle-plugins/model-compiler/src/main/resources/spine-protoc.gradle

# Login details to Maven repository.
# Each workstation should have developer's login defined in this file.
credentials.tar
Expand All @@ -110,3 +113,8 @@ hs_err_pid*

.packages
pubspec.lock

# Ignore the `tmp` directory used for building dependant repositories.
/tmp

.gradle-test-kit/
3 changes: 2 additions & 1 deletion .idea/codeStyles/Project.xml

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

3 changes: 2 additions & 1 deletion .idea/dictionaries/common.xml

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

33 changes: 15 additions & 18 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,15 @@

@file:Suppress("RemoveRedundantQualifierName")

import io.spine.dependency.boms.BomsPlugin
import io.spine.dependency.build.Dokka
import io.spine.dependency.build.JSpecify
import io.spine.dependency.lib.KotlinPoet
import io.spine.dependency.lib.KotlinX
import io.spine.dependency.test.JUnit
import io.spine.dependency.lib.Protobuf
import io.spine.dependency.local.Spine
import io.spine.dependency.local.Base
import io.spine.dependency.local.CoreJava
import io.spine.dependency.local.Logging
import io.spine.dependency.local.ProtoData
import io.spine.dependency.local.TestLib
import io.spine.dependency.local.ToolBase
import io.spine.dependency.local.Validation
import io.spine.gradle.VersionWriter
Expand All @@ -45,9 +44,9 @@ import io.spine.gradle.publish.IncrementGuard
import io.spine.gradle.publish.PublishingRepos
import io.spine.gradle.publish.PublishingRepos.gitHub
import io.spine.gradle.publish.spinePublishing
import io.spine.gradle.repo.standardToSpineSdk
import io.spine.gradle.report.license.LicenseReporter
import io.spine.gradle.report.pom.PomGenerator
import io.spine.gradle.standardToSpineSdk

buildscript {
apply(from = "$projectDir/version.gradle.kts")
Expand Down Expand Up @@ -75,17 +74,20 @@ buildscript {
plugins {
`jvm-module`
protobuf
ksp
`module-testing`
}
apply<BomsPlugin>()

// Cannot use `id()` syntax for McJava because it's not yet published to the Plugin Portal
// and is added to the build classpath via `buildScript` block above.
// and is added to the build classpath via the `buildScript` block above.
apply(plugin = "io.spine.mc-java")

apply<IncrementGuard>()
apply<VersionWriter>()


apply(from = "$projectDir/version.gradle.kts")
val baseVersion: String by extra
val versionToPublish: String by extra

group = "io.spine"
Expand All @@ -102,13 +104,7 @@ configurations {
all {
resolutionStrategy {
force(
KotlinX.Coroutines.bom,
KotlinX.Coroutines.core,
KotlinX.Coroutines.coreJvm,
KotlinX.Coroutines.debug,
KotlinX.Coroutines.jdk8,
KotlinX.Coroutines.test,
KotlinX.Coroutines.testJvm,
JSpecify.annotations,
KotlinPoet.lib,
Dokka.BasePlugin.lib,
Protobuf.compiler,
Expand All @@ -117,7 +113,7 @@ configurations {
ToolBase.lib,
ProtoData.api,
Validation.runtime,
JUnit.runner,
CoreJava.server,
)
}
}
Expand All @@ -126,9 +122,6 @@ configurations {
dependencies {
implementation(Base.lib)
implementation(Validation.runtime)

testImplementation(JUnit.runner)
testImplementation(TestLib.lib)
}

spinePublishing {
Expand All @@ -150,3 +143,7 @@ JavadocConfig.applyTo(project)
PomGenerator.applyTo(project)
LicenseReporter.generateReportIn(project)
LicenseReporter.mergeAllReports(project)

afterEvaluate {
protoDataRemoteDebug(enabled = false)
}
31 changes: 16 additions & 15 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ repositories {
* Please keep this value in sync with [io.spine.dependency.lib.Jackson.version].
* It is not a requirement but would be good in terms of consistency.
*/
val jacksonVersion = "2.15.3"
val jacksonVersion = "2.18.3"

/**
* The version of Google Artifact Registry used by `buildSrc`.
Expand All @@ -75,15 +75,15 @@ 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 kotlinVersion = "2.1.20"
val kotlinEmbeddedVersion = "2.1.20"

/**
* The version of Guava used in `buildSrc`.
*
* Always use the same version as the one specified in [io.spine.dependency.lib.Guava].
* Otherwise, when testing Gradle plugins, clashes may occur.
*/
val guavaVersion = "32.1.3-jre"
val guavaVersion = "33.4.8-jre"

/**
* The version of ErrorProne Gradle plugin.
Expand All @@ -93,7 +93,7 @@ val guavaVersion = "32.1.3-jre"
* @see <a href="https://github.com/tbroyer/gradle-errorprone-plugin/releases">
* Error Prone Gradle Plugin Releases</a>
*/
val errorPronePluginVersion = "4.1.0"
val errorPronePluginVersion = "4.2.0"

/**
* The version of Protobuf Gradle Plugin.
Expand All @@ -113,7 +113,7 @@ val protobufPluginVersion = "0.9.4"
* @see <a href="https://github.com/Kotlin/dokka/releases">
* Dokka Releases</a>
*/
val dokkaVersion = "1.9.20"
val dokkaVersion = "2.0.0"

/**
* The version of Detekt Gradle Plugin.
Expand All @@ -130,7 +130,7 @@ val kotestJvmPluginVersion = "0.4.10"
/**
* @see [io.spine.dependency.test.Kover]
*/
val koverVersion = "0.7.2"
val koverVersion = "0.9.1"

/**
* The version of the Shadow Plugin.
Expand All @@ -148,9 +148,9 @@ configurations.all {
"com.google.protobuf:protobuf-gradle-plugin:$protobufPluginVersion",

// Force Kotlin lib versions avoiding using those bundled with Gradle.
"org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion",
"org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion",
"org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"
"org.jetbrains.kotlin:kotlin-stdlib:$kotlinEmbeddedVersion",
"org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinEmbeddedVersion",
"org.jetbrains.kotlin:kotlin-reflect:$kotlinEmbeddedVersion"
)
}
}
Expand All @@ -167,6 +167,7 @@ kotlin {

dependencies {
api("com.github.jk1:gradle-license-report:$licenseReportVersion")
api(platform("org.jetbrains.kotlin:kotlin-bom:$kotlinEmbeddedVersion"))
dependOnAuthCommon()

listOf(
Expand All @@ -175,17 +176,17 @@ dependencies {
"com.github.jk1:gradle-license-report:$licenseReportVersion",
"com.google.guava:guava:$guavaVersion",
"com.google.protobuf:protobuf-gradle-plugin:$protobufPluginVersion",
"gradle.plugin.com.github.johnrengelman:shadow:${shadowVersion}",
"gradle.plugin.com.github.johnrengelman:shadow:$shadowVersion",
"io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$detektVersion",
"io.kotest:kotest-gradle-plugin:$kotestJvmPluginVersion",
// https://github.com/srikanth-lingala/zip4j
"net.lingala.zip4j:zip4j:2.10.0",
"net.ltgt.gradle:gradle-errorprone-plugin:${errorPronePluginVersion}",
"org.ajoberstar.grgit:grgit-core:${grGitVersion}",
"org.jetbrains.dokka:dokka-base:${dokkaVersion}",
"net.ltgt.gradle:gradle-errorprone-plugin:$errorPronePluginVersion",
"org.ajoberstar.grgit:grgit-core:$grGitVersion",
"org.jetbrains.dokka:dokka-base:$dokkaVersion",
"org.jetbrains.dokka:dokka-gradle-plugin:${dokkaVersion}",
"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion",
"org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion",
"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinEmbeddedVersion",
"org.jetbrains.kotlin:kotlin-reflect:$kotlinEmbeddedVersion",
"org.jetbrains.kotlinx:kover-gradle-plugin:$koverVersion"
).forEach {
implementation(it)
Expand Down
32 changes: 29 additions & 3 deletions buildSrc/src/main/kotlin/BuildExtensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@
import io.spine.dependency.build.ErrorProne
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.McJava
import io.spine.dependency.local.ProtoData
import io.spine.dependency.local.ProtoTap
import io.spine.dependency.test.Kotest
import io.spine.dependency.test.Kover
import io.spine.gradle.standardToSpineSdk
import io.spine.gradle.repo.standardToSpineSdk
import org.gradle.api.Project
import org.gradle.api.Task
import org.gradle.api.tasks.JavaExec
Expand Down Expand Up @@ -66,7 +67,7 @@ import org.gradle.plugin.use.PluginDependencySpec
private const val ABOUT_DEPENDENCY_EXTENSIONS = ""

/**
* Applies [standard][standardToSpineSdk] repositories to this `buildscript`.
* Applies [standard][io.spine.gradle.repo.standardToSpineSdk] repositories to this `buildscript`.
*/
fun ScriptHandlerScope.standardSpineSdkRepositories() {
repositories.standardToSpineSdk()
Expand Down Expand Up @@ -150,6 +151,9 @@ val PluginDependenciesSpec.kover: PluginDependencySpec
val PluginDependenciesSpec.ksp: PluginDependencySpec
get() = id(Ksp.id).version(Ksp.version)

val PluginDependenciesSpec.`plugin-publish`: PluginDependencySpec
get() = id(PluginPublishPlugin.id).version(PluginPublishPlugin.version)

/**
* Configures the dependencies between third-party Gradle tasks
* and those defined via ProtoData and Spine Model Compiler.
Expand Down Expand Up @@ -226,7 +230,29 @@ fun Project.configureTaskDependencies() {
* By convention, such modules are for integration tests and should be treated differently.
*/
val Project.productionModules: Iterable<Project>
get() = rootProject.subprojects.filter { !it.name.contains("-tests") }
get() = rootProject.subprojects.filterNot { subproject ->
subproject.name.run {
contains("-tests")
|| contains("test-fixtures")
|| contains("integration-tests")
}
}

/**
* Obtains the names of the [productionModules].
*
* The extension could be useful for excluding modules from standard publishing:
* ```kotlin
* spinePublishing {
* val customModule = "my-custom-module"
* modules = productionModuleNames.toSet().minus(customModule)
* modulesWithCustomPublishing = setOf(customModule)
* //...
* }
* ```
*/
val Project.productionModuleNames: List<String>
get() = productionModules.map { it.name }

/**
* Sets the remote debug option for this [JavaExec] task.
Expand Down
1 change: 1 addition & 0 deletions buildSrc/src/main/kotlin/BuildSettings.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
object BuildSettings {
private const val JVM_VERSION = 17
val javaVersion: JavaLanguageVersion = JavaLanguageVersion.of(JVM_VERSION)
@Suppress("unused")
val javaVersionCompat = JavaVersion.toVersion(JVM_VERSION)
val jvmTarget = JvmTarget.JVM_17
const val REMOTE_DEBUG_PORT = 5566
Expand Down
Loading
Loading