Skip to content

Commit

Permalink
Merge pull request #1539 from SpineEventEngine/better-routing
Browse files Browse the repository at this point in the history
Inline functions for routing
  • Loading branch information
alexander-yevsyukov authored Oct 13, 2023
2 parents 8006643 + e52d4f3 commit ce13988
Show file tree
Hide file tree
Showing 27 changed files with 1,027 additions and 925 deletions.
10 changes: 7 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,15 @@ buildscript {
doForceVersions(configurations)
configurations {
all {
exclude(group = "io.spine", module = "spine-flogger-api")
exclude(group = "io.spine", module = "spine-logging-backend")
resolutionStrategy {
val spine = io.spine.internal.dependency.Spine
force(
spine.base,
spine.toolBase,
spine.server,
io.spine.internal.dependency.Spine.Logging.lib,
io.spine.internal.dependency.Spine.Logging.backend,
io.spine.internal.dependency.Spine.Logging.floggerApi,
io.spine.internal.dependency.Validation.runtime,
)
Expand Down Expand Up @@ -319,8 +320,12 @@ fun Subproject.forceConfigurations() {
excludeProtobufLite()

all {
exclude(group = "io.spine", module = "spine-flogger-api")
exclude(group = "io.spine", module = "spine-logging-backend")
exclude(group = "io.spine", module = "spine-validate")

resolutionStrategy {
exclude("io.spine", "spine-validate")

force(
/* Force the version of gRPC used by the `:client` module over the one
set by `mc-java` in the `:core` module when specifying compiler artifact
Expand All @@ -335,7 +340,6 @@ fun Subproject.forceConfigurations() {
Validation.runtime,
Spine.time,
Spine.Logging.lib,
Spine.Logging.backend,
Spine.Logging.floggerApi,
Spine.baseTypes,
Spine.change,
Expand Down
20 changes: 11 additions & 9 deletions buildSrc/src/main/kotlin/io/spine/internal/dependency/ProtoData.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ package io.spine.internal.dependency
* Dependencies on ProtoData modules.
*
* In order to use locally published ProtoData version instead of the version from a public plugin
* registry, set the `PROTO_DATA_VERSION` and/or the `PROTO_DATA_DF_VERSION` environment variables
* registry, set the `PROTODATA_VERSION` and/or the `PROTODATA_DF_VERSION` environment variables
* and stop the Gradle daemons so that Gradle observes the env change:
* ```
* export PROTO_DATA_VERSION=0.43.0-local
* export PROTO_DATA_DF_VERSION=0.41.0
* export PROTODATA_VERSION=0.43.0-local
* export PROTODATA_DF_VERSION=0.41.0
*
* ./gradle --stop
* ./gradle build # Conduct the intended checks.
Expand All @@ -43,8 +43,8 @@ package io.spine.internal.dependency
* Then, in order to reset the console to run the usual versions again, remove the values of
* the environment variables and stop the daemon:
* ```
* export PROTO_DATA_VERSION=""
* export PROTO_DATA_DF_VERSION=""
* export PROTODATA_VERSION=""
* export PROTODATA_DF_VERSION=""
*
* ./gradle --stop
* ```
Expand All @@ -65,7 +65,7 @@ object ProtoData {
* The version of ProtoData dependencies.
*/
val version: String
private const val fallbackVersion = "0.11.0"
private const val fallbackVersion = "0.13.2"

/**
* The distinct version of ProtoData used by other build tools.
Expand All @@ -74,13 +74,15 @@ object ProtoData {
* transitional dependencies, this is the version used to build the project itself.
*/
val dogfoodingVersion: String
private const val fallbackDfVersion = "0.9.11"
private const val fallbackDfVersion = "0.13.2"

/**
* The artifact for the ProtoData Gradle plugin.
*/
val pluginLib: String

val api
get() = "$group:protodata-api:$version"
val compiler
get() = "$group:protodata-compiler:$version"
val codegenJava
Expand All @@ -89,12 +91,12 @@ object ProtoData {
/**
* An env variable storing a custom [version].
*/
private const val VERSION_ENV = "PROTO_DATA_VERSION"
private const val VERSION_ENV = "PROTODATA_VERSION"

/**
* An env variable storing a custom [dogfoodingVersion].
*/
private const val DF_VERSION_ENV = "PROTO_DATA_DF_VERSION"
private const val DF_VERSION_ENV = "PROTODATA_DF_VERSION"

/**
* Sets up the versions and artifacts for the build to use.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ package io.spine.internal.dependency
@Suppress("unused", "ConstPropertyName")
object Roaster {

private const val version = "2.29.0.Final"
/**
* This is the last version build with Java 11.
*
* Starting from version
* [2.29.0.Final](https://github.com/forge/roaster/releases/tag/2.29.0.Final),
* Roaster requires Java 17.
*/
private const val version = "2.28.0.Final"

const val api = "org.jboss.forge.roaster:roaster-api:${version}"
const val jdt = "org.jboss.forge.roaster:roaster-jdt:${version}"
Expand Down
31 changes: 22 additions & 9 deletions buildSrc/src/main/kotlin/io/spine/internal/dependency/Spine.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ object Spine {
*
* @see <a href="https://github.com/SpineEventEngine/base">spine-base</a>
*/
const val base = "2.0.0-SNAPSHOT.189"
const val base = "2.0.0-SNAPSHOT.190"

/**
* The version of [Spine.reflect].
Expand All @@ -59,7 +59,7 @@ object Spine {
*
* @see <a href="https://github.com/SpineEventEngine/logging">spine-logging</a>
*/
const val logging = "2.0.0-SNAPSHOT.225"
const val logging = "2.0.0-SNAPSHOT.232"

/**
* The version of [Spine.testlib].
Expand All @@ -75,7 +75,7 @@ object Spine {
* @see [Spine.CoreJava.server]
* @see <a href="https://github.com/SpineEventEngine/core-java">core-java</a>
*/
const val core = "2.0.0-SNAPSHOT.157"
const val core = "2.0.0-SNAPSHOT.159"

/**
* The version of [Spine.modelCompiler].
Expand All @@ -89,7 +89,7 @@ object Spine {
*
* @see <a href="https://github.com/SpineEventEngine/mc-java">spine-mc-java</a>
*/
const val mcJava = "2.0.0-SNAPSHOT.170"
const val mcJava = "2.0.0-SNAPSHOT.171"

/**
* The version of [Spine.baseTypes].
Expand All @@ -103,7 +103,7 @@ object Spine {
*
* @see <a href="https://github.com/SpineEventEngine/time">spine-time</a>
*/
const val time = "2.0.0-SNAPSHOT.133"
const val time = "2.0.0-SNAPSHOT.134"

/**
* The version of [Spine.change].
Expand All @@ -124,7 +124,7 @@ object Spine {
*
* @see <a href="https://github.com/SpineEventEngine/tool-base">spine-tool-base</a>
*/
const val toolBase = "2.0.0-SNAPSHOT.183"
const val toolBase = "2.0.0-SNAPSHOT.186"

/**
* The version of [Spine.javadocTools].
Expand Down Expand Up @@ -164,17 +164,30 @@ object Spine {
object Logging {
const val version = ArtifactVersion.logging
const val lib = "$group:spine-logging:$version"
const val backend = "$group:spine-logging-backend:$version"
const val context = "$group:spine-logging-context:$version"

const val log4j2Backend = "$group:spine-logging-log4j2-backend:$version"
const val stdContext = "$group:spine-logging-std-context:$version"
const val grpcContext = "$group:spine-logging-grpc-context:$version"
const val smokeTest = "$group:spine-logging-smoke-test:$version"

// Transitive dependencies.
// Make `public` and use them to force a version in a particular repository, if needed.
internal const val julBackend = "$group:spine-logging-jul-backend:$version"
internal const val middleware = "$group:spine-logging-middleware:$version"
internal const val platformGenerator = "$group:spine-logging-platform-generator:$version"
internal const val jvmDefaultPlatform = "$group:spine-logging-jvm-default-platform:$version"

@Deprecated(
message = "Please use `Logging.lib` instead.",
replaceWith = ReplaceWith("lib")
)
const val floggerApi = "$group:spine-flogger-api:$version"

@Deprecated(
message = "Please use `grpcContext` instead.",
replaceWith = ReplaceWith("grpcContext")
)
const val floggerGrpcContext = "$group:spine-flogger-grpc-context:$version"
const val smokeTest = "$group:spine-logging-smoke-test:$version"
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ package io.spine.internal.dependency
*/
@Suppress("unused", "ConstPropertyName")
object Validation {
const val version = "2.0.0-SNAPSHOT.104"
const val version = "2.0.0-SNAPSHOT.109"
const val group = "io.spine.validation"
const val runtime = "$group:spine-validation-java-runtime:$version"
const val java = "$group:spine-validation-java:$version"
Expand Down
1 change: 0 additions & 1 deletion buildSrc/src/main/kotlin/jvm-module.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ fun Module.addDependencies() = dependencies {
ErrorProne.annotations.forEach { compileOnlyApi(it) }

implementation(Spine.Logging.lib)
runtimeOnly(Spine.Logging.backend)

testImplementation(Guava.testLib)
testImplementation(JUnit.runner)
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit ce13988

Please sign in to comment.