Skip to content

Commit

Permalink
Merge pull request #509 from SpineEventEngine/updates-from-modules
Browse files Browse the repository at this point in the history
Updates from subprojects
  • Loading branch information
alexander-yevsyukov committed Apr 2, 2024
2 parents 86b1a93 + 82d2e95 commit 55de211
Show file tree
Hide file tree
Showing 13 changed files with 82 additions and 59 deletions.
2 changes: 1 addition & 1 deletion .github-workflows/build-on-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

# See: https://github.com/marketplace/actions/junit-report-action
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3.7.6
uses: mikepenz/action-junit-report@v4.0.3
if: always() # always run even if the previous step fails
with:
report_paths: '**/build/test-results/**/TEST-*.xml'
Expand Down
5 changes: 3 additions & 2 deletions .github-workflows/build-on-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ jobs:
distribution: zulu
cache: gradle

# See: https://github.com/al-cheb/configure-pagefile-action
- name: Configure Pagefile
uses: al-cheb/configure-pagefile-action@v1.2
uses: al-cheb/configure-pagefile-action@v1.3

- name: Build project and run tests
shell: cmd
Expand All @@ -28,7 +29,7 @@ jobs:

# See: https://github.com/marketplace/actions/junit-report-action
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3.7.6
uses: mikepenz/action-junit-report@v4.0.3
if: always() # always run even if the previous step fails
with:
report_paths: '**/build/test-results/**/TEST-*.xml'
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,5 @@ pubspec.lock

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

.gradle-test-kit/
14 changes: 14 additions & 0 deletions buildSrc/src/main/kotlin/DokkaExts.kt
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ fun TaskContainer.dokkaHtmlTask(): DokkaTask? = this.findByName("dokkaHtml") as
* Dokka can properly generate documentation for either Kotlin or Java depending on
* the configuration, but not both.
*/
@Suppress("unused")
internal fun GradleDokkaSourceSetBuilder.onlyJavaSources(): FileCollection {
return sourceRoots.filter(File::isJavaSourceDirectory)
}
Expand All @@ -167,6 +168,19 @@ fun Project.dokkaKotlinJar(): TaskProvider<Jar> = tasks.getOrCreate("dokkaKotlin
}
}

/**
* Tells if this task belongs to the execution graph which contains publishing tasks.
*
* The task `"publishToMavenLocal"` is excluded from the check because it is a part of
* the local testing workflow.
*/
fun DokkaTask.isInPublishingGraph(): Boolean =
project.gradle.taskGraph.allTasks.any {
with(it.name) {
startsWith("publish") && !startsWith("publishToMavenLocal")
}
}

/**
* Locates or creates `dokkaJavaJar` task in this [Project].
*
Expand Down
37 changes: 0 additions & 37 deletions buildSrc/src/main/kotlin/Repositories.kt

This file was deleted.

5 changes: 4 additions & 1 deletion buildSrc/src/main/kotlin/dokka-for-java.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023, TeamDev. All rights reserved.
* Copyright 2024, 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.
Expand Down Expand Up @@ -37,4 +37,7 @@ dependencies {

tasks.withType<DokkaTask>().configureEach {
configureForJava()
onlyIf {
(it as DokkaTask).isInPublishingGraph()
}
}
5 changes: 4 additions & 1 deletion buildSrc/src/main/kotlin/dokka-for-kotlin.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023, TeamDev. All rights reserved.
* Copyright 2024, 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.
Expand Down Expand Up @@ -36,4 +36,7 @@ dependencies {

tasks.withType<DokkaTask>().configureEach {
configureForKotlin()
onlyIf {
(it as DokkaTask).isInPublishingGraph()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ object Kotlin {
* When changing the version, also change the version used in the `buildSrc/build.gradle.kts`.
*/
@Suppress("MemberVisibilityCanBePrivate") // used directly from the outside.
const val version = "1.9.22"
const val version = "1.9.23"

/**
* The version of the JetBrains annotations library, which is a transitive
Expand Down
25 changes: 20 additions & 5 deletions buildSrc/src/main/kotlin/io/spine/internal/dependency/ProtoData.kt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ object ProtoData {
* The version of ProtoData dependencies.
*/
val version: String
private const val fallbackVersion = "0.16.1"
private const val fallbackVersion = "0.20.7"

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

/**
* The artifact for the ProtoData Gradle plugin.
Expand All @@ -90,20 +90,35 @@ object ProtoData {
val api
get() = api(version)

@Deprecated("Use `backend` instead", ReplaceWith("backend"))
val compiler
get() = "$group:protodata-compiler:$version"
get() = backend

val backend
get() = "$group:protodata-backend:$version"

val protocPlugin
get() = "$group:protodata-protoc:$version"

val gradleApi
get() = "$group:protodata-gradle-api:$version"

val cliApi
get() = "$group:protodata-cli-api:$version"

@Deprecated("Use `java()` instead", ReplaceWith("java(version)"))
fun codegenJava(version: String): String =
"$group:protodata-codegen-java:$version"
java(version)

fun java(version: String): String =
"$group:protodata-java:$version"

@Deprecated("Use `java` instead.", ReplaceWith("java"))
val codegenJava
get() = codegenJava(version)
get() = java(version)

val java
get() = java(version)

val fatCli
get() = "$group:protodata-fat-cli:$version"
Expand Down
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.198"
const val base = "2.0.0-SNAPSHOT.199"

/**
* The version of [Spine.reflect].
Expand Down Expand Up @@ -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.175"
const val core = "2.0.0-SNAPSHOT.176"

/**
* 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.183"
const val mcJava = "2.0.0-SNAPSHOT.205"

/**
* The version of [Spine.baseTypes].
Expand Down Expand Up @@ -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.192"
const val toolBase = "2.0.0-SNAPSHOT.208"

/**
* The version of [Spine.javadocTools].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,32 @@ package io.spine.internal.dependency
*/
@Suppress("unused", "ConstPropertyName")
object Validation {
const val version = "2.0.0-SNAPSHOT.127"
/**
* The version of the Validation library artifacts.
*/
const val version = "2.0.0-SNAPSHOT.132"

/**
* The distinct version of the Validation library used by build tools during
* the transition from a previous version when breaking API changes are introduced.
*
* When Validation 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 to
* avoid errors caused by incompatible API changes.
*/
const val dogfoodingVersion = "2.0.0-SNAPSHOT.132"

const val group = "io.spine.validation"
const val runtime = "$group:spine-validation-java-runtime:$version"
const val java = "$group:spine-validation-java:$version"
const val javaBundle = "$group:spine-validation-java-bundle:$version"
const val model = "$group:spine-validation-model:$version"
const val config = "$group:spine-validation-configuration:$version"
private const val prefix = "spine-validation"

const val runtime = "$group:$prefix-java-runtime:$version"
const val java = "$group:$prefix-java:$version"

/** Obtains the artifact for the `java-bundle` artifact of the given version. */
fun javaBundle(version: String) = "$group:$prefix-java-bundle:$version"

val javaBundle = javaBundle(version)

const val model = "$group:$prefix-model:$version"
const val config = "$group:$prefix-configuration:$version"
}
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.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
1 change: 1 addition & 0 deletions pull
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ rm -f ../buildSrc/src/main/kotlin/java-module.gradle.kts
rm -f ../buildSrc/src/main/kotlin/kotlin-jvm-module.gradle.kts
rm -f ../buildSrc/src/main/kotlin/jacoco-kmm-jvm.gradle.kts
rm -f ../buildSrc/src/main/kotlin/io/spine/internal/gradle/DependencyResolution.kt
rm -f ../buildSrc/src/main/kotlin/Repositories.kt

# 2023-07-30, remove outdated files.
rm -f ../.lift.toml
Expand Down

0 comments on commit 55de211

Please sign in to comment.