Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
12 changes: 6 additions & 6 deletions buildSrc/src/main/kotlin/io/spine/dependency/local/Compiler.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ package io.spine.dependency.local
/**
* Dependencies on the Spine Compiler modules.
*
* To use a locally published ProtoData version instead of the version from a public plugin
* To use a locally published Compiler version instead of the version from a public plugin
* registry, set the `COMPILER_VERSION` and/or the `COMPILER_DF_VERSION` environment variables
* and stop the Gradle daemons so that Gradle observes the env change:
* ```
Expand Down Expand Up @@ -67,22 +67,22 @@ object Compiler {
const val module = "io.spine.tools:compiler"

/**
* The version of ProtoData dependencies.
* The version of the Compiler dependencies.
*/
val version: String
private const val fallbackVersion = "2.0.0-SNAPSHOT.030"

/**
* The distinct version of ProtoData used by other build tools.
* The distinct version of the Compiler used by other build tools.
*
* When ProtoData is used both for building the project and as a part of the Project's
* transitional dependencies, this is the version used to build the project itself.
* When the Compiler is used both for building the project and as a part of the Project's
* transitive dependencies, this is the version used to build the project itself.
*/
val dogfoodingVersion: String
private const val fallbackDfVersion = "2.0.0-SNAPSHOT.030"

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

Expand Down
48 changes: 46 additions & 2 deletions buildSrc/src/main/kotlin/io/spine/gradle/git/Repository.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@

package io.spine.gradle.git

import com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly
import io.spine.gradle.Cli
import io.spine.gradle.fs.LazyTempPath
import java.util.concurrent.TimeUnit.MILLISECONDS
import org.gradle.api.logging.Logger

/**
Expand Down Expand Up @@ -133,8 +135,10 @@ class Repository private constructor(
* Performs a pull with rebase before pushing to ensure the local branch is up-to-date.
*/
fun push() {
repoExecute("git", "pull", "--rebase")
repoExecute("git", "push")
withRetries(description = "Pushing to $sshUrl, branch = '$currentBranch'") {
repoExecute("git", "pull", "--rebase")
repoExecute("git", "push")
}
}

override fun close() {
Expand Down Expand Up @@ -174,3 +178,43 @@ class Repository private constructor(
}
}
}

/**
* Executes a given operation with retries using exponential backoff strategy.
*
* If the operation fails, it will be retried up to the specified number of times
* with increasing delays between attempts.
* The delay increases exponentially but is capped at the specified maximum value.
*
* If all retries fail, the exception from the final attempt will be thrown to the caller.
*
* @param T the type of value returned by the operation
* @param times the maximum number of attempts to execute the operation (default: 3)
* @param initialDelay the delay before the first retry in milliseconds (default: 100ms)
* @param maxDelay the maximum delay between retries in milliseconds (default: 2000ms)
* @param factor the multiplier used to increase delay after each failure (default: 2.0)
* @param description a description of the operation for error reporting (default: empty string)
* @param block the operation to execute
* @return the result of the successful operation execution
*/
private fun <T> withRetries(
times: Int = 3,
initialDelay: Long = 100, // ms
maxDelay: Long = 2000, // ms
factor: Double = 2.0,
description: String = "",
block: () -> T
): T {
var currentDelay = initialDelay
repeat(times - 1) {
try {
return block()
} catch (e: Exception) {
System.err.println("'$description' failed. " +
"Message: '${e.message}'. Retrying in $currentDelay ms.")
}
sleepUninterruptibly(currentDelay, MILLISECONDS)
currentDelay = (currentDelay * factor).toLong().coerceAtMost(maxDelay)
}
return block()
}
44 changes: 22 additions & 22 deletions dependencies.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


# Dependencies of `io.spine.tools:compiler-api:2.0.0-SNAPSHOT.033`
# Dependencies of `io.spine.tools:compiler-api:2.0.0-SNAPSHOT.034`

## Runtime
1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0.
Expand Down Expand Up @@ -1131,14 +1131,14 @@

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Dec 04 17:11:33 WET 2025** using
This report was generated on **Thu Dec 04 18:50:06 WET 2025** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine.tools:compiler-api-tests:2.0.0-SNAPSHOT.033`
# Dependencies of `io.spine.tools:compiler-api-tests:2.0.0-SNAPSHOT.034`

## Runtime
## Compile, tests, and tooling
Expand Down Expand Up @@ -1504,14 +1504,14 @@ This report was generated on **Thu Dec 04 17:11:33 WET 2025** using

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Dec 04 17:11:33 WET 2025** using
This report was generated on **Thu Dec 04 18:50:05 WET 2025** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine.tools:compiler-backend:2.0.0-SNAPSHOT.033`
# Dependencies of `io.spine.tools:compiler-backend:2.0.0-SNAPSHOT.034`

## Runtime
1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0.
Expand Down Expand Up @@ -2646,14 +2646,14 @@ This report was generated on **Thu Dec 04 17:11:33 WET 2025** using

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Dec 04 17:11:33 WET 2025** using
This report was generated on **Thu Dec 04 18:50:06 WET 2025** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine.tools:compiler-cli:2.0.0-SNAPSHOT.033`
# Dependencies of `io.spine.tools:compiler-cli:2.0.0-SNAPSHOT.034`

## Runtime
1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0.
Expand Down Expand Up @@ -3837,14 +3837,14 @@ This report was generated on **Thu Dec 04 17:11:33 WET 2025** using

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Dec 04 17:11:33 WET 2025** using
This report was generated on **Thu Dec 04 18:50:06 WET 2025** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine.tools:compiler-gradle-api:2.0.0-SNAPSHOT.033`
# Dependencies of `io.spine.tools:compiler-gradle-api:2.0.0-SNAPSHOT.034`

## Runtime
1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0.
Expand Down Expand Up @@ -4909,14 +4909,14 @@ This report was generated on **Thu Dec 04 17:11:33 WET 2025** using

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Dec 04 17:11:33 WET 2025** using
This report was generated on **Thu Dec 04 18:50:06 WET 2025** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine.tools:compiler-gradle-plugin:2.0.0-SNAPSHOT.033`
# Dependencies of `io.spine.tools:compiler-gradle-plugin:2.0.0-SNAPSHOT.034`

## Runtime
1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0.
Expand Down Expand Up @@ -6029,14 +6029,14 @@ This report was generated on **Thu Dec 04 17:11:33 WET 2025** using

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Dec 04 17:11:33 WET 2025** using
This report was generated on **Thu Dec 04 18:50:06 WET 2025** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine.tools:compiler-jvm:2.0.0-SNAPSHOT.033`
# Dependencies of `io.spine.tools:compiler-jvm:2.0.0-SNAPSHOT.034`

## Runtime
1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0.
Expand Down Expand Up @@ -7188,14 +7188,14 @@ This report was generated on **Thu Dec 04 17:11:33 WET 2025** using

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Dec 04 17:11:33 WET 2025** using
This report was generated on **Thu Dec 04 18:50:06 WET 2025** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine.tools:compiler-params:2.0.0-SNAPSHOT.033`
# Dependencies of `io.spine.tools:compiler-params:2.0.0-SNAPSHOT.034`

## Runtime
1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0.
Expand Down Expand Up @@ -8318,14 +8318,14 @@ This report was generated on **Thu Dec 04 17:11:33 WET 2025** using

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Dec 04 17:11:33 WET 2025** using
This report was generated on **Thu Dec 04 18:50:06 WET 2025** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine.tools:compiler-protoc-plugin:2.0.0-SNAPSHOT.033`
# Dependencies of `io.spine.tools:compiler-protoc-plugin:2.0.0-SNAPSHOT.034`

## Runtime
1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2.
Expand Down Expand Up @@ -9202,14 +9202,14 @@ This report was generated on **Thu Dec 04 17:11:33 WET 2025** using

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Dec 04 17:11:33 WET 2025** using
This report was generated on **Thu Dec 04 18:50:06 WET 2025** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine.tools:compiler-test-env:2.0.0-SNAPSHOT.033`
# Dependencies of `io.spine.tools:compiler-test-env:2.0.0-SNAPSHOT.034`

## Runtime
1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0.
Expand Down Expand Up @@ -10340,14 +10340,14 @@ This report was generated on **Thu Dec 04 17:11:33 WET 2025** using

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Dec 04 17:11:33 WET 2025** using
This report was generated on **Thu Dec 04 18:50:06 WET 2025** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).




# Dependencies of `io.spine.tools:compiler-testlib:2.0.0-SNAPSHOT.033`
# Dependencies of `io.spine.tools:compiler-testlib:2.0.0-SNAPSHOT.034`

## Runtime
1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.20.0.
Expand Down Expand Up @@ -11585,6 +11585,6 @@ This report was generated on **Thu Dec 04 17:11:33 WET 2025** using

The dependencies distributed under several licenses, are used according their commercial-use-friendly license.

This report was generated on **Thu Dec 04 17:11:33 WET 2025** using
This report was generated on **Thu Dec 04 18:50:06 WET 2025** using
[Gradle-License-Report plugin](https://github.com/jk1/Gradle-License-Report) by Evgeny Naumenko, licensed under
[Apache 2.0 License](https://github.com/jk1/Gradle-License-Report/blob/master/LICENSE).
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ all modules and does not describe the project structure per-subproject.
-->
<groupId>io.spine.tools</groupId>
<artifactId>spine-compiler</artifactId>
<version>2.0.0-SNAPSHOT.033</version>
<version>2.0.0-SNAPSHOT.034</version>

<inceptionYear>2015</inceptionYear>

Expand Down
2 changes: 1 addition & 1 deletion version.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* This version is also used by integration test projects.
* E.g. see `tests/consumer/build.gradle.kts`.
*/
val compilerVersion: String by extra("2.0.0-SNAPSHOT.033")
val compilerVersion: String by extra("2.0.0-SNAPSHOT.034")

/**
* The version, same as [compilerVersion], which is used for publishing
Expand Down
Loading