Skip to content

Commit

Permalink
Merge pull request #1558 from SpineEventEngine/newer-mc-java
Browse files Browse the repository at this point in the history
Newer Base, McJava, ProtoData, and Validation
  • Loading branch information
alexander-yevsyukov authored Nov 26, 2024
2 parents a6a4c8e + 0fdd01d commit 0a6fa6b
Show file tree
Hide file tree
Showing 215 changed files with 1,783 additions and 1,525 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ jobs:
shell: bash
run: |
repoName=$(echo ${{ github.repository }} | cut -d '/' -f2)
chmod +x ./scripts/request-package-names.sh
./scripts/request-package-names.sh ${{ github.token }} \
chmod +x ./config/scripts/request-package-names.sh
./config/scripts/request-package-names.sh ${{ github.token }} \
$repoName ${{ github.repository_owner }} ./package-names.json
echo "package-names=$(<./package-names.json)" >> $GITHUB_OUTPUT
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@

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

# Build files produced by the IDE
**/out/**
Expand Down
16 changes: 12 additions & 4 deletions .idea/inspectionProfiles/Project_Default.xml

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

68 changes: 34 additions & 34 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,31 @@
@file:Suppress("RemoveRedundantQualifierName")

import Build_gradle.Subproject
import io.spine.internal.dependency.ErrorProne
import io.spine.internal.dependency.Grpc
import io.spine.internal.dependency.Guava
import io.spine.internal.dependency.JUnit
import io.spine.internal.dependency.Kotlin
import io.spine.internal.dependency.Spine
import io.spine.internal.dependency.Validation
import io.spine.internal.gradle.VersionWriter
import io.spine.internal.gradle.checkstyle.CheckStyleConfig
import io.spine.internal.gradle.github.pages.updateGitHubPages
import io.spine.internal.gradle.javac.configureErrorProne
import io.spine.internal.gradle.javac.configureJavac
import io.spine.internal.gradle.javadoc.JavadocConfig
import io.spine.internal.gradle.kotlin.applyJvmToolchain
import io.spine.internal.gradle.kotlin.setFreeCompilerArgs
import io.spine.internal.gradle.publish.IncrementGuard
import io.spine.internal.gradle.publish.PublishingRepos
import io.spine.internal.gradle.publish.spinePublishing
import io.spine.internal.gradle.report.coverage.JacocoConfig
import io.spine.internal.gradle.report.license.LicenseReporter
import io.spine.internal.gradle.report.pom.PomGenerator
import io.spine.internal.gradle.standardToSpineSdk
import io.spine.internal.gradle.testing.configureLogging
import io.spine.internal.gradle.testing.registerTestTasks
import io.spine.dependency.build.ErrorProne
import io.spine.dependency.lib.Grpc
import io.spine.dependency.lib.Guava
import io.spine.dependency.test.JUnit
import io.spine.dependency.lib.Kotlin
import io.spine.dependency.local.Spine
import io.spine.dependency.local.Logging
import io.spine.dependency.local.Validation
import io.spine.gradle.VersionWriter
import io.spine.gradle.checkstyle.CheckStyleConfig
import io.spine.gradle.github.pages.updateGitHubPages
import io.spine.gradle.javac.configureErrorProne
import io.spine.gradle.javac.configureJavac
import io.spine.gradle.javadoc.JavadocConfig
import io.spine.gradle.kotlin.applyJvmToolchain
import io.spine.gradle.kotlin.setFreeCompilerArgs
import io.spine.gradle.publish.IncrementGuard
import io.spine.gradle.publish.PublishingRepos
import io.spine.gradle.publish.spinePublishing
import io.spine.gradle.report.coverage.JacocoConfig
import io.spine.gradle.report.license.LicenseReporter
import io.spine.gradle.report.pom.PomGenerator
import io.spine.gradle.standardToSpineSdk
import io.spine.gradle.testing.configureLogging
import io.spine.gradle.testing.registerTestTasks
import org.gradle.jvm.tasks.Jar
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

Expand All @@ -62,20 +63,21 @@ buildscript {
exclude(group = "io.spine", module = "spine-flogger-api")
exclude(group = "io.spine", module = "spine-logging-backend")
resolutionStrategy {
val spine = io.spine.internal.dependency.Spine
val logging = io.spine.internal.dependency.Spine.Logging
val spine = io.spine.dependency.local.Spine
val logging = io.spine.dependency.local.Logging
@Suppress("DEPRECATION") // To force `Kotlin.stdLibJdk7`.
force(
io.spine.internal.dependency.Grpc.api,
io.spine.internal.dependency.Kotlin.stdLibJdk7,
io.spine.dependency.lib.Grpc.api,
io.spine.dependency.lib.Kotlin.stdLibJdk7,
"${protoData.module}:${protoData.dogfoodingVersion}",
spine.base,
spine.toolBase,
spine.server,
spine.reflect,
logging.lib,
logging.libJvm,
logging.middleware,
io.spine.internal.dependency.Validation.runtime,
io.spine.dependency.local.Validation.runtime,
)
}
}
Expand Down Expand Up @@ -246,8 +248,6 @@ fun Subproject.defineDependencies() {
ErrorProne.apply {
errorprone(core)
}
// Strangely, Gradle does not see `protoData` via DSL here, so we add using the string.
add("protoData", Validation.java)
implementation(Validation.runtime)

testImplementation(JUnit.runner)
Expand Down Expand Up @@ -349,9 +349,9 @@ fun Subproject.forceConfigurations() {
Spine.base,
Validation.runtime,
Spine.time,
Spine.Logging.lib,
Spine.Logging.libJvm,
Spine.Logging.middleware,
Logging.lib,
Logging.libJvm,
Logging.middleware,
Spine.baseTypes,
Spine.change,
Spine.reflect,
Expand Down
16 changes: 8 additions & 8 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ repositories {
/**
* The version of Jackson used by `buildSrc`.
*
* Please keep this value in sync with [io.spine.internal.dependency.Jackson.version].
* 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"
Expand All @@ -73,23 +73,23 @@ val grGitVersion = "4.1.1"
/**
* The version of the Kotlin Gradle plugin and Kotlin binaries used by the build process.
*
* This version may change from the [version of Kotlin][io.spine.internal.dependency.Kotlin.version]
* This version may change from the [version of Kotlin][io.spine.dependency.lib.Kotlin.version]
* used by the project.
*/
val kotlinVersion = "1.8.22"

/**
* The version of Guava used in `buildSrc`.
*
* Always use the same version as the one specified in [io.spine.internal.dependency.Guava].
* 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"

/**
* The version of ErrorProne Gradle plugin.
*
* Please keep in sync. with [io.spine.internal.dependency.ErrorProne.GradlePlugin.version].
* Please keep in sync. with [io.spine.dependency.build.ErrorProne.GradlePlugin.version].
*
* @see <a href="https://github.com/tbroyer/gradle-errorprone-plugin/releases">
* Error Prone Gradle Plugin Releases</a>
Expand All @@ -99,7 +99,7 @@ val errorPronePluginVersion = "3.1.0"
/**
* The version of Protobuf Gradle Plugin.
*
* Please keep in sync. with [io.spine.internal.dependency.Protobuf.GradlePlugin.version].
* Please keep in sync. with [io.spine.dependency.lib.Protobuf.GradlePlugin.version].
*
* @see <a href="https://github.com/google/protobuf-gradle-plugin/releases">
* Protobuf Gradle Plugins Releases</a>
Expand All @@ -109,7 +109,7 @@ val protobufPluginVersion = "0.9.4"
/**
* The version of Dokka Gradle Plugins.
*
* Please keep in sync with [io.spine.internal.dependency.Dokka.version].
* Please keep in sync with [io.spine.dependency.build.Dokka.version].
*
* @see <a href="https://github.com/Kotlin/dokka/releases">
* Dokka Releases</a>
Expand All @@ -124,12 +124,12 @@ val dokkaVersion = "1.9.20"
val detektVersion = "1.23.0"

/**
* @see [io.spine.internal.dependency.Kotest]
* @see [io.spine.dependency.test.Kotest]
*/
val kotestJvmPluginVersion = "0.4.10"

/**
* @see [io.spine.internal.dependency.Kover]
* @see [io.spine.dependency.test.Kover]
*/
val koverVersion = "0.7.2"

Expand Down
20 changes: 10 additions & 10 deletions buildSrc/src/main/kotlin/BuildExtensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@

@file:Suppress("UnusedReceiverParameter", "unused", "TopLevelPropertyNaming", "ObjectPropertyName")

import io.spine.internal.dependency.ErrorProne
import io.spine.internal.dependency.GradleDoctor
import io.spine.internal.dependency.Kotest
import io.spine.internal.dependency.Kover
import io.spine.internal.dependency.Ksp
import io.spine.internal.dependency.McJava
import io.spine.internal.dependency.ProtoData
import io.spine.internal.dependency.ProtoTap
import io.spine.internal.dependency.Protobuf
import io.spine.internal.gradle.standardToSpineSdk
import io.spine.dependency.build.ErrorProne
import io.spine.dependency.build.GradleDoctor
import io.spine.dependency.build.Ksp
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 org.gradle.api.Project
import org.gradle.api.Task
import org.gradle.api.tasks.JavaExec
Expand Down
59 changes: 30 additions & 29 deletions buildSrc/src/main/kotlin/DependencyResolution.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,34 +24,34 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

import io.spine.internal.dependency.AnimalSniffer
import io.spine.internal.dependency.Asm
import io.spine.internal.dependency.AutoCommon
import io.spine.internal.dependency.AutoService
import io.spine.internal.dependency.AutoValue
import io.spine.internal.dependency.CheckerFramework
import io.spine.internal.dependency.CommonsCli
import io.spine.internal.dependency.CommonsCodec
import io.spine.internal.dependency.CommonsLogging
import io.spine.internal.dependency.Dokka
import io.spine.internal.dependency.ErrorProne
import io.spine.internal.dependency.FindBugs
import io.spine.internal.dependency.Gson
import io.spine.internal.dependency.Guava
import io.spine.internal.dependency.Hamcrest
import io.spine.internal.dependency.J2ObjC
import io.spine.internal.dependency.JUnit
import io.spine.internal.dependency.Jackson
import io.spine.internal.dependency.JavaDiffUtils
import io.spine.internal.dependency.Kotest
import io.spine.internal.dependency.Kotlin
import io.spine.internal.dependency.Okio
import io.spine.internal.dependency.OpenTest4J
import io.spine.internal.dependency.Plexus
import io.spine.internal.dependency.Protobuf
import io.spine.internal.dependency.Slf4J
import io.spine.internal.dependency.Spine
import io.spine.internal.dependency.Truth
import io.spine.dependency.build.AnimalSniffer
import io.spine.dependency.build.CheckerFramework
import io.spine.dependency.build.Dokka
import io.spine.dependency.build.ErrorProne
import io.spine.dependency.build.FindBugs
import io.spine.dependency.lib.Asm
import io.spine.dependency.lib.AutoCommon
import io.spine.dependency.lib.AutoService
import io.spine.dependency.lib.AutoValue
import io.spine.dependency.lib.CommonsCli
import io.spine.dependency.lib.CommonsCodec
import io.spine.dependency.lib.CommonsLogging
import io.spine.dependency.lib.Gson
import io.spine.dependency.lib.Guava
import io.spine.dependency.lib.J2ObjC
import io.spine.dependency.lib.Jackson
import io.spine.dependency.lib.JavaDiffUtils
import io.spine.dependency.lib.Kotlin
import io.spine.dependency.lib.Okio
import io.spine.dependency.lib.Plexus
import io.spine.dependency.lib.Protobuf
import io.spine.dependency.lib.Slf4J
import io.spine.dependency.local.Spine
import io.spine.dependency.test.Hamcrest
import io.spine.dependency.test.JUnit
import io.spine.dependency.test.Kotest
import io.spine.dependency.test.OpenTest4J
import io.spine.dependency.test.Truth
import org.gradle.api.NamedDomainObjectContainer
import org.gradle.api.Project
import org.gradle.api.artifacts.Configuration
Expand Down Expand Up @@ -195,9 +195,10 @@ fun Project.forceSpineBase() {
* Forces configurations containing `"proto"` in their names (disregarding the case) to
* use [Spine.baseForBuildScript].
*/
@Suppress("unused")
fun Project.forceBaseInProtoTasks() {
configurations.configureEach {
if (name.toLowerCase().contains("proto")) {
if (name.lowercased().contains("proto")) {
resolutionStrategy {
force(Spine.baseForBuildScript)
}
Expand Down
Loading

0 comments on commit 0a6fa6b

Please sign in to comment.