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
1 change: 1 addition & 0 deletions .github/workflows/build-on-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on: push

jobs:
build:
name: Build under Ubuntu
runs-on: ubuntu-latest

steps:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build-on-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on: pull_request

jobs:
build:
name: Build under Windows
runs-on: windows-latest

steps:
Expand All @@ -17,6 +18,9 @@ jobs:
distribution: zulu
cache: gradle

- name: Configure Pagefile
uses: al-cheb/[email protected]

- name: Build project and run tests
shell: cmd
# For the reason on `--no-daemon` see https://github.com/actions/cache/issues/454
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ensure-reports-updated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:

jobs:
build:
name: Ensure license reports updated
runs-on: ubuntu-latest

steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/increment-guard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:

jobs:
build:
name: Check version increment
runs-on: ubuntu-latest

steps:
Expand Down
9 changes: 5 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ buildscript {
classpath(io.spine.internal.dependency.Spine.McJava.pluginLib)
}

val spine = io.spine.internal.dependency.Spine
val validation = io.spine.internal.dependency.Validation
val jackson = io.spine.internal.dependency.Jackson
configurations {
all {
resolutionStrategy {
val validation = io.spine.internal.dependency.Validation
val jackson = io.spine.internal.dependency.Jackson
force(
spine.base,
io.spine.internal.dependency.Spine.base,
io.spine.internal.dependency.Spine.Logging.lib,
validation.runtime,
jackson.annotations,
jackson.bom,
Expand Down Expand Up @@ -112,6 +112,7 @@ allprojects {
force(
Spine.base,
Spine.toolBase,
Spine.Logging.lib,
Validation.runtime,
Dokka.BasePlugin.lib,
Jackson.databind,
Expand Down
14 changes: 7 additions & 7 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022, TeamDev. All rights reserved.
* Copyright 2023, 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 @@ -62,15 +62,15 @@ val grGitVersion = "4.1.1"
* Please check that this value matches one defined in
* [io.spine.internal.dependency.Kotlin.version].
*/
val kotlinVersion = "1.8.10"
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].
* Otherwise, when testing Gradle plugins, clashes may occur.
*/
val guavaVersion = "31.1-jre"
val guavaVersion = "32.1.1-jre"

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

/**
* The version of Protobuf Gradle Plugin.
Expand All @@ -90,7 +90,7 @@ val errorPronePluginVersion = "3.0.1"
* @see <a href="https://github.com/google/protobuf-gradle-plugin/releases">
* Protobuf Gradle Plugins Releases</a>
*/
val protobufPluginVersion = "0.9.2"
val protobufPluginVersion = "0.9.4"

/**
* The version of Dokka Gradle Plugins.
Expand All @@ -107,7 +107,7 @@ val dokkaVersion = "1.8.10"
*
* @see <a href="https://github.com/detekt/detekt/releases">Detekt Releases</a>
*/
val detektVersion = "1.22.0"
val detektVersion = "1.23.0"

/**
* @see [io.spine.internal.dependency.Kotest]
Expand All @@ -117,7 +117,7 @@ val kotestJvmPluginVersion = "0.4.10"
/**
* @see [io.spine.internal.dependency.Kover]
*/
val koverVersion = "0.7.0-Beta"
val koverVersion = "0.7.2"

configurations.all {
resolutionStrategy {
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/BuildExtensions.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022, TeamDev. All rights reserved.
* Copyright 2023, 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
33 changes: 22 additions & 11 deletions buildSrc/src/main/kotlin/DependencyResolution.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
*/

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
Expand All @@ -37,14 +38,18 @@ import io.spine.internal.dependency.FindBugs
import io.spine.internal.dependency.Flogger
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.Truth
import org.gradle.api.NamedDomainObjectContainer
import org.gradle.api.artifacts.Configuration
Expand Down Expand Up @@ -84,17 +89,17 @@ private fun ResolutionStrategy.forceProductionDependencies() {
Dokka.BasePlugin.lib,
ErrorProne.annotations,
ErrorProne.core,
Guava.lib,
FindBugs.annotations,
Flogger.lib,
Flogger.Runtime.systemBackend,
Flogger.lib,
Guava.lib,
Kotlin.reflect,
Kotlin.stdLib,
Kotlin.stdLibCommon,
Kotlin.stdLibJdk8,
Protobuf.libs,
Protobuf.GradlePlugin.lib,
io.spine.internal.dependency.Slf4J.lib
Protobuf.libs,
Slf4J.lib
)
}

Expand All @@ -116,22 +121,28 @@ private fun ResolutionStrategy.forceTestDependencies() {
*/
private fun ResolutionStrategy.forceTransitiveDependencies() {
force(
Asm.lib,
AutoValue.annotations,
Gson.lib,
J2ObjC.annotations,
Plexus.utils,
Okio.lib,
CommonsCli.lib,
CommonsLogging.lib,
Gson.lib,
Hamcrest.core,
J2ObjC.annotations,
JUnit.Platform.engine,
JUnit.Platform.suiteApi,
Jackson.databind,
JUnit.runner,
Jackson.annotations,
Jackson.bom,
Jackson.core,
Jackson.databind,
Jackson.dataformatXml,
Jackson.dataformatYaml,
Jackson.moduleKotlin,
Jackson.bom,
Jackson.annotations
JavaDiffUtils.lib,
Kotlin.jetbrainsAnnotations,
Okio.lib,
OpenTest4J.lib,
Plexus.utils,
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,50 +24,22 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

import io.spine.internal.dependency.Kotest
import io.spine.internal.dependency.Spine
import io.spine.internal.dependency.JUnit
import io.spine.internal.gradle.kotlin.applyJvmToolchain
import io.spine.internal.gradle.kotlin.setFreeCompilerArgs
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import io.spine.internal.dependency.Protobuf
import io.spine.internal.gradle.protobuf.setup

plugins {
id("java-module")
kotlin("jvm")
id("io.kotest")
id("org.jetbrains.kotlinx.kover")
id("detekt-code-analysis")
id("dokka-for-kotlin")
id("java-library")
id("com.google.protobuf")
}

kotlin {
applyJvmToolchain(BuildSettings.javaVersion.asInt())
explicitApi()
}

dependencies {
testImplementation(Spine.testlib)
testImplementation(Kotest.frameworkEngine)
testImplementation(Kotest.datatest)
testImplementation(Kotest.runnerJUnit5Jvm)
testImplementation(JUnit.runner)
}

tasks {
withType<KotlinCompile>().configureEach {
kotlinOptions.jvmTarget = BuildSettings.javaVersion.toString()
setFreeCompilerArgs()
// For generating test fixtures. See `src/test/proto`.
protobuf {
configurations.excludeProtobufLite()
protoc {
artifact = Protobuf.compiler
}
}

kover {
useJacocoTool()
}

koverReport {
defaults {
xml {
onCheck = true
}
generateProtoTasks.all().configureEach {
setup()
}
}
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/config-tester.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022, TeamDev. All rights reserved.
* Copyright 2023, 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
5 changes: 3 additions & 2 deletions buildSrc/src/main/kotlin/detekt-code-analysis.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022, TeamDev. All rights reserved.
* Copyright 2023, 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 @@ -60,6 +60,7 @@ import io.gitlab.arturbosch.detekt.Detekt
* }
* ```
*/
@Suppress("unused")
private val about = ""

plugins {
Expand All @@ -68,7 +69,7 @@ plugins {

detekt {
buildUponDefaultConfig = true
config = files("${rootDir}/config/quality/detekt-config.yml")
config.from(files("${rootDir}/config/quality/detekt-config.yml"))
}

tasks {
Expand Down
2 changes: 1 addition & 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 2022, TeamDev. All rights reserved.
* Copyright 2023, 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
2 changes: 1 addition & 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 2022, TeamDev. All rights reserved.
* Copyright 2023, 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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022, TeamDev. All rights reserved.
* Copyright 2023, 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 @@ -27,6 +27,7 @@
package io.spine.internal.dependency

// https://www.mojohaus.org/animal-sniffer/animal-sniffer-maven-plugin/
@Suppress("unused", "ConstPropertyName")
object AnimalSniffer {
private const val version = "1.21"
const val lib = "org.codehaus.mojo:animal-sniffer-annotations:${version}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022, TeamDev. All rights reserved.
* Copyright 2023, 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 All @@ -26,7 +26,7 @@

package io.spine.internal.dependency

@Suppress("unused")
@Suppress("unused", "ConstPropertyName")
object ApacheHttp {

// https://hc.apache.org/downloads.cgi
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022, TeamDev. All rights reserved.
* Copyright 2023, 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 @@ -27,10 +27,10 @@
package io.spine.internal.dependency

// https://cloud.google.com/java/docs/reference
@Suppress("unused")
@Suppress("unused", "ConstPropertyName")
object AppEngine {
private const val version = "1.9.82"
const val sdk = "com.google.appengine:appengine-api-1.0-sdk:${version}"
const val sdk = "com.google.appengine:appengine-api-1.0-sdk:${version}"

object GradlePlugin {
private const val version = "2.2.0"
Expand Down
Loading