diff --git a/.github/keys/gradle-plugin-portal.secret.properties.gpg b/.github/keys/gradle-plugin-portal.secret.properties.gpg new file mode 100644 index 00000000..8ec9a8aa --- /dev/null +++ b/.github/keys/gradle-plugin-portal.secret.properties.gpg @@ -0,0 +1,2 @@ +  2.y:ҢF`J1$9 D~ze!yuGBU2K0! q =˂p@zeqB>R#qj?1m굘U^2*kJ 3wq84}. +2M< \ No newline at end of file diff --git a/.github/keys/spine-dev-framework-ci.json.gpg b/.github/keys/spine-dev-framework-ci.json.gpg new file mode 100644 index 00000000..3041f37e Binary files /dev/null and b/.github/keys/spine-dev-framework-ci.json.gpg differ diff --git a/.github/keys/spine-dev.json.gpg b/.github/keys/spine-dev.json.gpg deleted file mode 100644 index 49f7fd52..00000000 Binary files a/.github/keys/spine-dev.json.gpg and /dev/null differ diff --git a/.github/workflows/build-on-ubuntu-gcloud.yml b/.github/workflows/build-on-ubuntu-gcloud.yml index 52ca656b..2bc9651c 100644 --- a/.github/workflows/build-on-ubuntu-gcloud.yml +++ b/.github/workflows/build-on-ubuntu-gcloud.yml @@ -7,22 +7,21 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + with: + submodules: 'true' - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v3 with: java-version: 11 distribution: zulu cache: gradle - - name: Pull config - run: git submodule update --init --recursive - # This operation is specific to `gcloud-java` repository only. - name: Decrypt the credentials for the Spine-Dev service account - run: ./config/scripts/decrypt.sh "$SPINE_DEV_KEY" ./.github/keys/spine-dev.json.gpg ./spine-dev.json + run: ./config/scripts/decrypt.sh "$SPINE_DEV_CI_KEY" ./.github/keys/spine-dev-framework-ci.json.gpg ./spine-dev.json env: - SPINE_DEV_KEY: ${{ secrets.SPINE_DEV_KEY }} + SPINE_DEV_CI_KEY: ${{ secrets.SPINE_DEV_CI_KEY }} # The OS-managed Google Cloud SDK does not provide a Datastore emulator. - name: Remove the OS-managed Google Cloud SDK @@ -50,7 +49,7 @@ jobs: && ./gradlew build --stacktrace - name: Upload code coverage report - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v3 with: - fail_ci_if_error: true + fail_ci_if_error: false verbose: true diff --git a/.github/workflows/detekt-analysis.yml b/.github/workflows/detekt-analysis.yml deleted file mode 100644 index f65f98df..00000000 --- a/.github/workflows/detekt-analysis.yml +++ /dev/null @@ -1,103 +0,0 @@ -# This workflow performs a static analysis of your Kotlin source code using -# Detekt. -# -# Scans are triggered: -# 1. On every push to default and protected branches -# 2. On every Pull Request targeting the default branch -# 3. On a weekly schedule -# 4. Manually, on demand, via the "workflow_dispatch" event -# -# The workflow should work with no modifications, but you might like to use a -# later version of the Detekt CLI by modifing the $DETEKT_RELEASE_TAG -# environment variable. -name: Scan with Detekt - -on: - # Triggers the workflow on push or pull request events but only for default and protected branches - push: - branches: [ master ] - pull_request: - branches: [ master ] - schedule: - - cron: '19 17 * * 4' - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -env: - # Release tag associated with version of Detekt to be installed - # SARIF support (required for this workflow) was introduced in Detekt v1.15.0 - DETEKT_RELEASE_TAG: v1.15.0 - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "scan" - scan: - name: Scan - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - # Gets the download URL associated with the $DETEKT_RELEASE_TAG - - name: Get Detekt download URL - id: detekt_info - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - DETEKT_DOWNLOAD_URL=$( gh api graphql --field tagName=$DETEKT_RELEASE_TAG --raw-field query=' - query getReleaseAssetDownloadUrl($tagName: String!) { - repository(name: "detekt", owner: "detekt") { - release(tagName: $tagName) { - releaseAssets(name: "detekt", first: 1) { - nodes { - downloadUrl - } - } - } - } - } - ' | \ - jq --raw-output '.data.repository.release.releaseAssets.nodes[0].downloadUrl' ) - echo "::set-output name=download_url::$DETEKT_DOWNLOAD_URL" - - # Sets up the detekt cli - - name: Setup Detekt - run: | - dest=$( mktemp -d ) - curl --request GET \ - --url ${{ steps.detekt_info.outputs.download_url }} \ - --silent \ - --location \ - --output $dest/detekt - chmod a+x $dest/detekt - echo $dest >> $GITHUB_PATH - - # Performs static analysis using Detekt - - name: Run Detekt - continue-on-error: true - run: | - detekt --input ${{ github.workspace }} --report sarif:${{ github.workspace }}/detekt.sarif.json - - # Modifies the SARIF output produced by Detekt so that absolute URIs are relative - # This is so we can easily map results onto their source files - # This can be removed once relative URI support lands in Detekt: https://git.io/JLBbA - - name: Make artifact location URIs relative - continue-on-error: true - run: | - echo "$( - jq \ - --arg github_workspace ${{ github.workspace }} \ - '. | ( .runs[].results[].locations[].physicalLocation.artifactLocation.uri |= if test($github_workspace) then .[($github_workspace | length | . + 1):] else . end )' \ - ${{ github.workspace }}/detekt.sarif.json - )" > ${{ github.workspace }}/detekt.sarif.json - - # Uploads results to GitHub repository using the upload-sarif action - - uses: github/codeql-action/upload-sarif@v1 - with: - # Path to SARIF file relative to the root of the repository - sarif_file: ${{ github.workspace }}/detekt.sarif.json - checkout_path: ${{ github.workspace }} diff --git a/.github/workflows/ensure-reports.updated.yml b/.github/workflows/ensure-reports-updated.yml similarity index 89% rename from .github/workflows/ensure-reports.updated.yml rename to .github/workflows/ensure-reports-updated.yml index 6bb34787..7189e91d 100644 --- a/.github/workflows/ensure-reports.updated.yml +++ b/.github/workflows/ensure-reports-updated.yml @@ -9,10 +9,11 @@ on: jobs: build: + name: Ensure license reports updated runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: # Configure the checkout of all branches, so that it is possible to run the comparison. fetch-depth: 0 diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml index 72435c63..47e2938e 100644 --- a/.github/workflows/gradle-wrapper-validation.yml +++ b/.github/workflows/gradle-wrapper-validation.yml @@ -13,6 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout latest code - uses: actions/checkout@v2 + uses: actions/checkout@v3 + - name: Validate Gradle Wrapper uses: gradle/wrapper-validation-action@v1 diff --git a/.github/workflows/increment-guard.yml b/.github/workflows/increment-guard.yml index c96b081b..b33fd74a 100644 --- a/.github/workflows/increment-guard.yml +++ b/.github/workflows/increment-guard.yml @@ -10,20 +10,20 @@ on: jobs: build: + name: Check version increment runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + with: + submodules: 'true' - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v3 with: java-version: 11 distribution: zulu cache: gradle - - name: Pull config - run: git submodule update --init --recursive - - name: Check version is not yet published shell: bash run: ./gradlew checkVersionIncrement --stacktrace diff --git a/.github/workflows/publish-gcloud.yml b/.github/workflows/publish-gcloud.yml index a04326dc..22ed11a2 100644 --- a/.github/workflows/publish-gcloud.yml +++ b/.github/workflows/publish-gcloud.yml @@ -8,9 +8,11 @@ jobs: publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + with: + submodules: 'true' - - uses: actions/setup-java@v2 + - uses: actions/setup-java@v3 with: java-version: 11 distribution: zulu @@ -44,9 +46,9 @@ jobs: # This operation is specific to `gcloud-java` repository only. - name: Decrypt the credentials for the Spine-Dev service account - run: ./config/scripts/decrypt.sh "$SPINE_DEV_KEY" ./.github/keys/spine-dev.json.gpg ./spine-dev.json + run: ./config/scripts/decrypt.sh "$SPINE_DEV_CI_KEY" ./.github/keys/spine-dev-framework-ci.json.gpg ./spine-dev.json env: - SPINE_DEV_KEY: ${{ secrets.SPINE_DEV_KEY }} + SPINE_DEV_CI_KEY: ${{ secrets.SPINE_DEV_CI_KEY }} # The OS-managed Google Cloud SDK does not provide a Datastore emulator. - name: Remove the OS-managed Google Cloud SDK diff --git a/.gitignore b/.gitignore index 7d44a27b..d0d15199 100644 --- a/.gitignore +++ b/.gitignore @@ -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. diff --git a/build.gradle.kts b/build.gradle.kts index 431803d4..e67f29b5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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. @@ -24,72 +24,72 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -import io.spine.internal.dependency.ApacheHttp -import io.spine.internal.dependency.CommonsCodec -import io.spine.internal.dependency.ErrorProne -import io.spine.internal.dependency.GoogleApis -import io.spine.internal.dependency.Grpc -import io.spine.internal.dependency.JUnit -import io.spine.internal.dependency.PerfMark -import io.spine.internal.gradle.javadoc.JavadocConfig -import io.spine.internal.gradle.applyStandard +@file:Suppress("RemoveRedundantQualifierName") + +import Build_gradle.Subproject +import io.spine.internal.dependency.* +import io.spine.internal.gradle.VersionWriter import io.spine.internal.gradle.checkstyle.CheckStyleConfig -import io.spine.internal.gradle.excludeProtobufLite -import io.spine.internal.gradle.forceVersions 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 org.gradle.jvm.tasks.Jar import org.jetbrains.kotlin.gradle.tasks.KotlinCompile -@Suppress("RemoveRedundantQualifierName") // Cannot use imported things here. buildscript { - io.spine.internal.gradle.doApplyStandard(repositories) + standardSpineSdkRepositories() - val execForkPlugin = io.spine.internal.dependency.ExecForkPlugin - repositories { - val repos = io.spine.internal.gradle.publish.PublishingRepos - repos.gitHub(execForkPlugin.repository) + doForceVersions(configurations) + configurations { + all { + 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, + ) + } + } } - apply(from = "$rootDir/version.gradle.kts") - val mcJavaVersion: String by extra - dependencies { - classpath("io.spine.tools:spine-mc-java:$mcJavaVersion") - classpath(execForkPlugin.classpath) - } - - io.spine.internal.gradle.doForceVersions(configurations) - - @Suppress("LocalVariableName") // For better readability. - val Kotlin = io.spine.internal.dependency.Kotlin - configurations.all { - resolutionStrategy { - force( - Kotlin.stdLib, - Kotlin.stdLibCommon, - ) - } + classpath(io.spine.internal.dependency.Spine.McJava.pluginLib) } } + plugins { `java-library` kotlin("jvm") idea + protobuf + errorprone + `gradle-doctor` +} - @Suppress("RemoveRedundantQualifierName") - id(io.spine.internal.dependency.ErrorProne.GradlePlugin.id) - id(io.spine.internal.dependency.Protobuf.GradlePlugin.id) +object BuildSettings { + const val JAVA_VERSION = 11 } +repositories.standardToSpineSdk() + spinePublishing { modules = setOf( "datastore", @@ -106,181 +106,278 @@ spinePublishing { } } -val spineBaseVersion: String by extra - allprojects { - apply(from = "$rootDir/version.gradle.kts") - apply { - plugin("java-library") - plugin("kotlin") plugin("jacoco") plugin("idea") + plugin("project-report") } + apply(from = "$rootDir/version.gradle.kts") group = "io.spine.gcloud" version = extra["versionToPublish"]!! - - repositories.applyStandard() } subprojects { + repositories.standardToSpineSdk() + applyPlugins() + + val javaVersion = JavaLanguageVersion.of(BuildSettings.JAVA_VERSION) + setupJava(javaVersion) + setupKotlin(javaVersion) + + defineDependencies() + forceConfigurations() + + val generated = "$projectDir/generated" + applyGeneratedDirectories(generated) + setupTestTasks() + setupPublishing() + configureTaskDependencies() +} + + +JacocoConfig.applyTo(project) +PomGenerator.applyTo(project) +LicenseReporter.mergeAllReports(project) + +/** + * The alias for typed extensions functions related to subprojects. + */ +typealias Subproject = Project + +/** + * Applies plugins common to all modules to this subproject. + */ +fun Subproject.applyPlugins() { apply { + plugin("java-library") + plugin("jacoco") plugin("com.google.protobuf") plugin("net.ltgt.errorprone") - plugin("io.spine.mc-java") + plugin("kotlin") plugin("pmd") plugin("maven-publish") plugin("pmd-settings") + plugin("dokka-for-java") + plugin("io.spine.mc-java") } - val javaVersion = JavaVersion.VERSION_11 + apply() + apply() - java { - sourceCompatibility = javaVersion - targetCompatibility = javaVersion + LicenseReporter.generateReportIn(project) + JavadocConfig.applyTo(project) + CheckStyleConfig.applyTo(project) +} - tasks.withType().configureEach { +/** + * Configures Java tasks in this project. + */ +fun Subproject.setupJava(javaVersion: JavaLanguageVersion) { + java { + toolchain.languageVersion.set(javaVersion) + } + tasks { + withType().configureEach { configureJavac() configureErrorProne() } + withType().configureEach { + duplicatesStrategy = DuplicatesStrategy.INCLUDE + } } +} +/** + * Configures Kotlin tasks in this project. + */ +fun Subproject.setupKotlin(javaVersion: JavaLanguageVersion) { kotlin { + applyJvmToolchain(javaVersion.asInt()) explicitApi() tasks.withType().configureEach { - kotlinOptions { - jvmTarget = javaVersion.toString() - freeCompilerArgs = listOf("-Xskip-prerelease-check") - } + kotlinOptions.jvmTarget = javaVersion.toString() + setFreeCompilerArgs() } } +} - LicenseReporter.generateReportIn(project) - JavadocConfig.applyTo(project) - CheckStyleConfig.applyTo(project) +/** + * Configures test tasks in this project. + */ +fun Subproject.setupTestTasks() { + tasks { + registerTestTasks() + test { + useJUnitPlatform { includeEngines("junit-jupiter") } + configureLogging() + } - // Required to fetch `androidx.annotation:annotation:1.1.0`, - // which is a transitive dependency of `com.google.cloud:google-cloud-datastore`. - repositories { - google() - } + val copyCredentials by registering(Copy::class) { + val resourceDir = "$projectDir/src/test/resources" + val fileName = "spine-dev.json" + val sourceFile = file("$rootDir/$fileName") - configurations { - forceVersions() - excludeProtobufLite() - all { - resolutionStrategy { - force( - ApacheHttp.core, - CommonsCodec.lib, - Grpc.api, - Grpc.auth, - Grpc.core, - Grpc.context, - Grpc.stub, - Grpc.protobuf, - Grpc.protobufLite, - PerfMark.api, - GoogleApis.AuthLibrary.credentials, - GoogleApis.commonProtos, - "io.spine:spine-base:$spineBaseVersion", - "io.spine.tools:spine-testlib:$spineBaseVersion" - ) - } + from(sourceFile) + into(resourceDir) + } + processTestResources { + dependsOn(copyCredentials) } } +} - val spineCoreVersion: String by extra +/** + * Defines dependencies of this subproject. + */ +fun Subproject.defineDependencies() { dependencies { ErrorProne.apply { errorprone(core) } + implementation(Spine.server) - implementation("io.spine:spine-server:$spineCoreVersion") + // 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) - testImplementation("io.spine.tools:spine-testutil-server:$spineCoreVersion") - testImplementation( - group = "io.spine", - name = "spine-server", - version = spineCoreVersion, - classifier = "test" - ) + testImplementation(Spine.testlib) + + testImplementation(Spine.CoreJava.testUtilServer) + testImplementation(Spine.CoreJava.serverTests) } +} - val generatedRootDir = "$projectDir/generated" - val generatedJavaDir = "$generatedRootDir/main/java" - val generatedTestJavaDir = "$generatedRootDir/test/java" - val generatedGrpcDir = "$generatedRootDir/main/grpc" - val generatedTestGrpcDir = "$generatedRootDir/test/grpc" - val generatedSpineDir = "$generatedRootDir/main/spine" - val generatedTestSpineDir = "$generatedRootDir/test/spine" +/** + * Adds directories with the generated source code to source sets of the project and + * to IntelliJ IDEA module settings. + * + * @param generatedDir + * the name of the root directory with the generated code + */ +fun Subproject.applyGeneratedDirectories(generatedDir: String) { + val generatedMain = "$generatedDir/main" + val generatedJava = "$generatedMain/java" + val generatedKotlin = "$generatedMain/kotlin" + val generatedGrpc = "$generatedMain/grpc" + val generatedSpine = "$generatedMain/spine" + + val generatedTest = "$generatedDir/test" + val generatedTestJava = "$generatedTest/java" + val generatedTestKotlin = "$generatedTest/kotlin" + val generatedTestGrpc = "$generatedTest/grpc" + val generatedTestSpine = "$generatedTest/spine" sourceSets { main { - java.srcDirs(generatedJavaDir, generatedSpineDir) - resources.srcDir("$generatedRootDir/main/resources") + java.srcDirs( + generatedJava, + generatedGrpc, + generatedSpine, + ) + kotlin.srcDirs( + generatedKotlin, + ) } test { - java.srcDirs(generatedTestJavaDir, generatedTestSpineDir) - resources.srcDir("$generatedRootDir/test/resources") - } - } - - tasks { - registerTestTasks() - withType().configureEach { - configureLogging() - useJUnitPlatform { - includeEngines("junit-jupiter") - } - } - - val copyCredentials by registering(Copy::class) { - val resourceDir = "$projectDir/src/test/resources" - val fileName = "spine-dev.json" - val sourceFile = file("$rootDir/$fileName") - - from(sourceFile) - into(resourceDir) - } - processTestResources { - dependsOn(copyCredentials) + java.srcDirs( + generatedTestJava, + generatedTestGrpc, + generatedTestSpine, + ) + kotlin.srcDirs( + generatedTestKotlin, + ) } } - // Apply the same IDEA module configuration for each of sub-projects. idea { module { - generatedSourceDirs.addAll( - files( - generatedJavaDir, - generatedGrpcDir, - generatedSpineDir, - generatedTestJavaDir, - generatedTestGrpcDir, - generatedTestSpineDir - ) + generatedSourceDirs.addAll(files( + generatedJava, + generatedKotlin, + generatedGrpc, + generatedSpine, + )) + testSources.from( + generatedTestJava, + generatedTestKotlin, + generatedTestGrpc, + generatedTestSpine, ) - testSourceDirs.add(file(generatedTestJavaDir)) - isDownloadJavadoc = true isDownloadSources = true } } +} + +/** + * Forces dependencies of this project. + */ +fun Subproject.forceConfigurations() { + configurations { + forceVersions() + excludeProtobufLite() + + all { + 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 + for the gRPC plugin. + See `io.spine.tools.mc.java.gradle.plugins.JavaProtocConfigurationPlugin + .configureProtocPlugins()` method which sets the version from resources. */ + Grpc.ProtocPlugin.artifact, + Grpc.api, + JUnit.runner, + Guava.lib, + + Spine.base, + Validation.runtime, + Spine.time, + Spine.Logging.lib, + Spine.Logging.backend, + Spine.Logging.floggerApi, + Spine.baseTypes, + Spine.change, + Spine.testlib, + Spine.toolBase, + Spine.pluginBase, + + Grpc.api, + Grpc.auth, + Grpc.core, + Grpc.context, + Grpc.stub, + Grpc.protobuf, + Grpc.protobufLite, + GoogleApis.AuthLibrary.credentials, + GoogleApis.commonProtos, + + ApacheHttp.core, + CommonsCodec.lib, + PerfMark.api + ) + } + } + } +} - updateGitHubPages(spineBaseVersion) { +/** + * Configures publishing for this subproject. + */ +fun Subproject.setupPublishing() { + updateGitHubPages(project.version.toString()) { allowInternalJavadoc.set(true) rootFolder.set(rootDir) } - project.tasks.named("publish") { + tasks.named("publish") { dependsOn("${project.path}:updateGitHubPages") } } -JacocoConfig.applyTo(project) -PomGenerator.applyTo(project) -LicenseReporter.mergeAllReports(project) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 591c5ae3..c2d415b0 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -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. @@ -34,7 +34,6 @@ plugins { java groovy `kotlin-dsl` - pmd val licenseReportVersion = "2.1" id("com.github.jk1.dependency-license-report").version(licenseReportVersion) } @@ -51,11 +50,11 @@ repositories { * Please keep this value in sync. with `io.spine.internal.dependency.Jackson.version`. * It's not a requirement, but would be good in terms of consistency. */ -val jacksonVersion = "2.13.0" +val jacksonVersion = "2.13.4" val googleAuthToolVersion = "2.1.2" val licenseReportVersion = "2.1" -val grGitVersion = "3.1.1" +val grGitVersion = "4.1.1" /** * The version of the Kotlin Gradle plugin. @@ -63,7 +62,7 @@ val grGitVersion = "3.1.1" * Please check that this value matches one defined in * [io.spine.internal.dependency.Kotlin.version]. */ -val kotlinVersion = "1.6.10" +val kotlinVersion = "1.8.22" /** * The version of Guava used in `buildSrc`. @@ -71,7 +70,7 @@ val kotlinVersion = "1.6.10" * 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.0.1-jre" +val guavaVersion = "32.1.2-jre" /** * The version of ErrorProne Gradle plugin. @@ -81,7 +80,7 @@ val guavaVersion = "31.0.1-jre" * @see * Error Prone Gradle Plugin Releases */ -val errorProneVersion = "2.0.2" +val errorPronePluginVersion = "3.1.0" /** * The version of Protobuf Gradle Plugin. @@ -91,7 +90,61 @@ val errorProneVersion = "2.0.2" * @see * Protobuf Gradle Plugins Releases */ -val protobufPluginVersion = "0.8.18" +val protobufPluginVersion = "0.9.4" + +/** + * The version of Dokka Gradle Plugins. + * + * Please keep in sync with [io.spine.internal.dependency.Dokka.version]. + * + * @see + * Dokka Releases + */ +val dokkaVersion = "1.8.10" + +/** + * The version of Detekt Gradle Plugin. + * + * @see Detekt Releases + */ +val detektVersion = "1.23.0" + +/** + * @see [io.spine.internal.dependency.Kotest] + */ +val kotestJvmPluginVersion = "0.4.10" + +/** + * @see [io.spine.internal.dependency.Kover] + */ +val koverVersion = "0.7.2" + +configurations.all { + resolutionStrategy { + force( + "com.google.guava:guava:$guavaVersion", + + "com.google.protobuf:protobuf-gradle-plugin:$protobufPluginVersion", + + // Force Kotlin lib versions avoiding using those bundled with Gradle. + "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion", + "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion", + "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion" + ) + } +} + +val jvmVersion = JavaLanguageVersion.of(11) + +java { + toolchain.languageVersion.set(jvmVersion) +} + +tasks.withType { + kotlinOptions { + jvmTarget = jvmVersion.toString() + } +} dependencies { implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion") @@ -102,7 +155,20 @@ dependencies { implementation("com.google.guava:guava:$guavaVersion") api("com.github.jk1:gradle-license-report:$licenseReportVersion") implementation("org.ajoberstar.grgit:grgit-core:${grGitVersion}") - implementation("net.ltgt.gradle:gradle-errorprone-plugin:${errorProneVersion}") - implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}") - implementation("gradle.plugin.com.google.protobuf:protobuf-gradle-plugin:$protobufPluginVersion") + implementation("net.ltgt.gradle:gradle-errorprone-plugin:${errorPronePluginVersion}") + + // Add explicit dependency to avoid warning on different Kotlin runtime versions. + implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion") + implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion") + + implementation("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$detektVersion") + implementation("com.google.protobuf:protobuf-gradle-plugin:$protobufPluginVersion") + implementation("org.jetbrains.dokka:dokka-gradle-plugin:${dokkaVersion}") + implementation("org.jetbrains.dokka:dokka-base:${dokkaVersion}") + + // https://github.com/srikanth-lingala/zip4j + implementation("net.lingala.zip4j:zip4j:2.10.0") + + implementation("io.kotest:kotest-gradle-plugin:$kotestJvmPluginVersion") + implementation("org.jetbrains.kotlinx:kover-gradle-plugin:$koverVersion") } diff --git a/buildSrc/src/main/groovy/dart/build-tasks.gradle b/buildSrc/src/main/groovy/dart/build-tasks.gradle deleted file mode 100644 index 6206a93b..00000000 --- a/buildSrc/src/main/groovy/dart/build-tasks.gradle +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -import org.apache.tools.ant.taskdefs.condition.Os - -println("`build-tasks.gradle` script is deprecated. " + - "Please use `DartTasks.build()` extension instead.") - -final def GROUP = 'Dart' -final def packageIndex = "$projectDir/.packages" as File -final def extension = Os.isFamily(Os.FAMILY_WINDOWS) ? '.bat' : '' -final def PUB_EXECUTABLE = 'pub' + extension - -task resolveDependencies(type: Exec) { - group = GROUP - description = 'Fetches the dependencies declared via `pubspec.yaml`.' - - inputs.file "$projectDir/pubspec.yaml" - outputs.file packageIndex - - commandLine PUB_EXECUTABLE, 'get' - - mustRunAfter 'cleanPackageIndex' -} - -tasks['assemble'].dependsOn 'resolveDependencies' - -task cleanPackageIndex(type: Delete) { - group = GROUP - description = 'Deletes the `.packages` file on this Dart module.' - delete = [packageIndex] -} - -tasks['clean'].dependsOn 'cleanPackageIndex' - -task testDart(type: Exec) { - group = GROUP - description = 'Runs Dart tests declared in the `./test` directory. See `https://pub.dev/packages/test#running-tests`.' - - commandLine PUB_EXECUTABLE, 'run', 'test' - - dependsOn 'resolveDependencies' -} - -tasks['check'].dependsOn 'testDart' diff --git a/buildSrc/src/main/groovy/dart/pub-publish-tasks.gradle b/buildSrc/src/main/groovy/dart/pub-publish-tasks.gradle deleted file mode 100644 index 7e625e57..00000000 --- a/buildSrc/src/main/groovy/dart/pub-publish-tasks.gradle +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -import org.apache.tools.ant.taskdefs.condition.Os - -println("`pub-publish-tasks.gradle` script is deprecated. " + - "Please use `DartTasks.publish()` extension instead.") - -final def publicationDir = "$buildDir/pub/publication/$project.name" -final def extension = Os.isFamily(Os.FAMILY_WINDOWS) ? '.bat' : '' -final def PUB_EXECUTABLE = 'pub' + extension - -task stagePubPublication(type: Copy) { - description = 'Prepares the Dart package for Pub publication.' - - from fileTree(projectDir) { - include '**/*.dart', 'pubspec.yaml', '**/*.md' - exclude 'proto/', 'generated/', 'build/', '**/.*' - } - from "$rootDir/LICENSE" - into publicationDir - - doLast { - logger.debug("Prepared Pub publication in directory `$publicationDir`.") - } - - dependsOn 'assemble' -} - -/** - * A Dart analog of {@code publish}. - */ -task publishToPub(type: Exec) { - description = 'Publishes this package to Pub.' - - workingDir publicationDir - commandLine PUB_EXECUTABLE, 'publish', '--trace' - final sayYes = new ByteArrayInputStream('y'.getBytes()) - standardInput(sayYes) - - dependsOn 'stagePubPublication' -} - -/** - * A Dart analog of {@code publishToMavenLocal}. - */ -task activateLocally(type: Exec) { - description = 'Activates this package locally.' - - commandLine PUB_EXECUTABLE, 'global', 'activate', '--source', 'path', publicationDir, '--trace' - - workingDir publicationDir - dependsOn 'stagePubPublication' -} - -tasks['publish'].dependsOn 'publishToPub' diff --git a/buildSrc/src/main/groovy/dependencies.gradle b/buildSrc/src/main/groovy/dependencies.gradle deleted file mode 100644 index 793d71ce..00000000 --- a/buildSrc/src/main/groovy/dependencies.gradle +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -//file:noinspection GrDeprecatedAPIUsage -//file:noinspection UnnecessaryQualifiedReference - -/* - * This file describes shared dependencies of Spine sub-projects. - * - * Inspired by dependency management of the Uber's NullAway project: - * https://github.com/uber/NullAway/blob/master/gradle/dependencies.gradle - */ - -// Specific repositories. -ext.repos = [ - // Snapshots of Error Prone and Guava. - sonatypeSnapshots : 'https://oss.sonatype.org/content/repositories/snapshots', - gradlePlugins : 'https://plugins.gradle.org/m2/' -] - -final def build = [ - errorProneJavac : io.spine.internal.dependency.ErrorProne.javacPlugin, - errorProneAnnotations : io.spine.internal.dependency.ErrorProne.INSTANCE.annotations.toArray(), - errorProneCheckApi : io.spine.internal.dependency.ErrorProne.INSTANCE.checkApi, - errorProneCore : io.spine.internal.dependency.ErrorProne.INSTANCE.core, - errorProneTestHelpers : io.spine.internal.dependency.ErrorProne.INSTANCE.testHelpers, - - checkerAnnotations : io.spine.internal.dependency.CheckerFramework.INSTANCE.annotations, - checkerDataflow : io.spine.internal.dependency.CheckerFramework.INSTANCE.dataflow.toArray(), - autoCommon : io.spine.internal.dependency.AutoCommon.lib, - autoService : [ - annotations: io.spine.internal.dependency.AutoService.INSTANCE.annotations, - processor : io.spine.internal.dependency.AutoService.processor - ], - - jsr305Annotations : io.spine.internal.dependency.FindBugs.INSTANCE.annotations, - - guava : io.spine.internal.dependency.Guava.lib, - flogger : io.spine.internal.dependency.Flogger.lib, - slf4j : io.spine.internal.dependency.Slf4J.lib, - protobuf : io.spine.internal.dependency.Protobuf.INSTANCE.libs.toArray(), - protoc : io.spine.internal.dependency.Protobuf.compiler, - googleHttpClient : io.spine.internal.dependency.HttpClient.google, - googleHttpClientApache : io.spine.internal.dependency.HttpClient.apache, - appengineApi : io.spine.internal.dependency.AppEngine.sdk, - - firebaseAdmin : io.spine.internal.dependency.Firebase.admin, - jacksonDatabind : io.spine.internal.dependency.Jackson.databind, - - roasterApi : io.spine.internal.dependency.Roaster.api, - roasterJdt : io.spine.internal.dependency.Roaster.jdt, - animalSniffer : io.spine.internal.dependency.AnimalSniffer.lib, - - ci: 'true' == System.getenv('CI'), - - gradlePlugins: [ - errorProne : io.spine.internal.dependency.ErrorProne.GradlePlugin.lib, - protobuf : io.spine.internal.dependency.Protobuf.GradlePlugin.lib, - appengine : io.spine.internal.dependency.AppEngine.GradlePlugin.lib, - licenseReport : io.spine.internal.dependency.LicenseReport.GradlePlugin.lib - ] -] - -final def gen = [ - javaPoet : io.spine.internal.dependency.JavaPoet.lib -] - -final def grpc = [ - grpcCore : io.spine.internal.dependency.Grpc.core, - grpcStub : io.spine.internal.dependency.Grpc.stub, - grpcOkHttp : io.spine.internal.dependency.Grpc.okHttp, - grpcProtobuf : io.spine.internal.dependency.Grpc.protobuf, - grpcNetty : io.spine.internal.dependency.Grpc.netty, - grpcNettyShaded: io.spine.internal.dependency.Grpc.nettyShaded, - grpcContext : io.spine.internal.dependency.Grpc.context -] - -final def runtime = [ - floggerSystemBackend: io.spine.internal.dependency.Flogger.Runtime.systemBackend, - floggerLog4J : io.spine.internal.dependency.Flogger.Runtime.log4J, - floggerSlf4J : io.spine.internal.dependency.Flogger.Runtime.slf4J -] - -final def test = [ - junit4 : io.spine.internal.dependency.JUnit.legacy, - junit5Api : io.spine.internal.dependency.JUnit.INSTANCE.api.toArray(), - junit5Runner : io.spine.internal.dependency.JUnit.runner, - junitPioneer : io.spine.internal.dependency.JUnit.pioneer, - slf4j : io.spine.internal.dependency.Slf4J.lib, - guavaTestlib : io.spine.internal.dependency.Guava.testLib, - truth : io.spine.internal.dependency.Truth.INSTANCE.libs.toArray() -] - -final def dir = "$rootDir/" + io.spine.internal.gradle.Scripts.commonPath -final def scripts = [ - testArtifacts : "$dir/test-artifacts.gradle", - testOutput : "$dir/test-output.gradle", - slowTests : "$dir/slow-tests.gradle", - jacoco : "$dir/jacoco.gradle", - publish : "$dir/publish.gradle", - publishProto : "$dir/publish-proto.gradle", - javacArgs : "$dir/javac-args.gradle", - jsBuildTasks : "$dir/js/build-tasks.gradle", - jsConfigureProto : "$dir/js/configure-proto.gradle", - npmPublishTasks : "$dir/js/npm-publish-tasks.gradle", - npmCli : "$dir/js/npm-cli.gradle", - updatePackageVersion : "$dir/js/update-package-version.gradle", - dartBuildTasks : "$dir/dart/build-tasks.gradle", - pubPublishTasks : "$dir/dart/pub-publish-tasks.gradle", - pmd : "$dir/pmd.gradle", - checkstyle : "$dir/checkstyle.gradle", - runBuild : "$dir/run-build.gradle", - modelCompiler : "$dir/model-compiler.gradle", - licenseReportCommon : "$dir/license-report-common.gradle", - projectLicenseReport : "$dir/license-report-project.gradle", - repoLicenseReport : "$dir/license-report-repo.gradle", - generatePom : "$dir/generate-pom.gradle" -] - -ext.deps = [ - 'build' : build, - 'grpc' : grpc, - 'gen' : gen, - 'runtime' : runtime, - 'test' : test, - 'scripts' : scripts, -] - -/** - * Forces default dependencies for the passed object which has {@code configurations} property. - * - *

Typically this should be applied to {@link ScriptHandler} (if in {@code buildscript} section), - * or to {@link Project} (if in project definition section). - */ -ext.forceConfiguration = { final configurationContainer -> - - configurationContainer.configurations.all { - resolutionStrategy { - failOnVersionConflict() - cacheChangingModulesFor(0, 'seconds') - - // Force deprecated dependencies. - force (Slf4J.lib) - - // Force dependencies internally used by the framework. - //noinspection UnnecessaryQualifiedReference - force( - io.spine.internal.dependency.ErrorProne.annotations, - io.spine.internal.dependency.JavaX.annotations, - io.spine.internal.dependency.CheckerFramework.annotations, - io.spine.internal.dependency.AutoCommon.lib, - io.spine.internal.dependency.Guava.lib, - io.spine.internal.dependency.AnimalSniffer.lib, - io.spine.internal.dependency.Protobuf.lib, - io.spine.internal.dependency.Guava.testLib, - io.spine.internal.dependency.Truth.lib, - io.spine.internal.dependency.JUnit.INSTANCE.api, - io.spine.internal.dependency.JUnit.legacy, - io.spine.internal.dependency.Protobuf.GradlePlugins.lib, - ) - - // Force transitive dependencies of 3rd party components that we don't use directly. - force( - io.spine.internal.dependency.Gson.lib, - io.spine.internal.dependency.J2ObjC.lib, - io.spine.internal.dependency.Plexus.utils, - io.spine.internal.dependency.Okio.lib, - io.spine.internal.dependency.CommonsCli.lib, - io.spine.internal.dependency.CheckerFramework.compatQual, - io.spine.internal.dependency.CommonsLogging.lib - ) - } - } -} - -/** - * Adds default repositories to the passed object which has {@code repositories} property. - * - *

Typically this should be applied to {@link ScriptHandler} (if in {@code buildscript} section), - * or to {@link Project} (if in project definition section). - */ -ext.defaultRepositories = { final repositoryContainer -> - - repositoryContainer.repositories { - mavenLocal() - maven { - url = repos.spine - content { - includeGroup 'io.spine' - includeGroup 'io.spine.tools' - includeGroup 'io.spine.gcloud' - } - mavenContent { - releasesOnly() - } - } - mavenCentral() - gradlePluginPortal() - } -} diff --git a/buildSrc/src/main/groovy/filter-internal-javadoc.gradle b/buildSrc/src/main/groovy/filter-internal-javadoc.gradle deleted file mode 100644 index 87f86142..00000000 --- a/buildSrc/src/main/groovy/filter-internal-javadoc.gradle +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -configurations { - excludeInternalDoclet -} - -dependencies { - /* - The variable spineBaseVersion must be defined in the `ext` section of the `version.gradle` - file of the project which imports `config` as a sub-module. - */ - excludeInternalDoclet "io.spine.tools:spine-javadoc-filter:$spineBaseVersion" -} - -// This task uses constants defined in `javadoc-options.gradle`. -task noInternalJavadoc(type: Javadoc) { - source = sourceSets.main.allJava.filter { - !it.absolutePath.contains('generated') - } - classpath = javadoc.getClasspath() - - options { - tags = javadocOptions.tags - encoding = javadocOptions.encoding - - // Doclet fully qualified name. - doclet = 'io.spine.tools.javadoc.ExcludeInternalDoclet' - - // Path to the JAR containing the doclet. - docletpath = configurations.excludeInternalDoclet.files.asType(List) - } -} diff --git a/buildSrc/src/main/groovy/generate-pom.gradle b/buildSrc/src/main/groovy/generate-pom.gradle deleted file mode 100644 index 2cd39810..00000000 --- a/buildSrc/src/main/groovy/generate-pom.gradle +++ /dev/null @@ -1,611 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -//file:noinspection GroovyVariableCanBeFinal - -import groovy.xml.MarkupBuilder -import org.gradle.api.internal.artifacts.dependencies.AbstractExternalModuleDependency - -import java.util.function.Function - -import static java.util.stream.Collectors.toSet - -/** - * This script generates a {@code pom.xml} file that contains dependencies of the root project as - * well as the dependencies of its subprojects. - * - * The generated {@code pom.xml} is not usable for {@code maven} build tasks and is merely a - * description of project dependencies. - * - * Configures the {@code build} task to generate the {@code pom.xml} file. - * - * To generate the pom, {@code apply} from this file. - * - * Note that the generated {@code pom.xml} includes the group ID, artifact ID and the version of the - * project this script was applied to. In case you want to override the default values, do so in - * the {@code ext} block like so: - * - *

- * {@code
- * ext {
- *     groupId = 'custom-group-id'
- *     artifactId = 'custom-artifact-id'
- *     version = 'custom-version'
- * }
- * }
- * 
- * - * By default, those values are taken from the {@code project} object, which may or may not include - * them. If the project does not have these values and they are not specified in the {@code ext} - * block, the result {@code pom.xml} file is going to contain empty blocks, - * e.g. {@code } - */ - -println("`generate-pom.gradle` script is deprecated. Please use the `PomGenerator` utility instead.") - -// In some cases, the `base` plugin, which is by default is added by e.g. `java`, is not yet added. -// `base` plugin defines the `build` task. This script needs it. -apply plugin: 'base' - -ext { - pomFile = "${projectDir}${File.separator}pom.xml" -} - -task generatePom { - - doLast { - delete pomFile - final ExtraPropertiesExtension extension = rootProject.ext - final RootProjectData projectData = RootProjectData.fromEither(project, extension) - final ProjectPomXml result = ProjectPomXml.from(projectData) - result.writeTo(pomFile) - } -} - -build.finalizedBy generatePom -generatePom.dependsOn assemble - -/** - * A {@code pom.xml} file that contains dependencies of the project and its subprojects. - * - *

It is not usable for {@code maven} build tasks and serves as a description of project first - * level dependencies, i.e. transitive dependencies are not included - */ -class ProjectPomXml { - - private static final String XML_METADATA = "" - private static final String PROJECT_SCHEMA_LOCATION = "" - private static final String MODEL_VERSION = "4.0.0" - private static final String CLOSING_PROJECT_TAG = "" - private static final String SPINE_INCEPTION_YEAR = "2015" - private static final String NEW_LINE = System.lineSeparator() - - private final Project project - private final String groupId - private final String artifactId - private final String version - - private ProjectPomXml(final Project project, - final String groupId, - final String artifactId, - final String version) { - this.project = project - this.groupId = groupId - this.artifactId = artifactId - this.version = version - } - - /** Creates a new instance based on the specified project data. */ - static ProjectPomXml from(final RootProjectData projectData) { - return new ProjectPomXml(projectData.project(), - projectData.groupId(), - projectData.artifactId(), - projectData.version()) - } - - /** - * Writes the {@code pom.xml} file containing dependencies of this project and its subprojects to the specified - * location. - * - *

If a file with the specified location exists, its contents will be substituted with a new - * {@code pom.xml}. - * - * @param filePath path to write {@code pom.xml} file to - */ - void writeTo(final String filePath) { - final FileWriter fileWriter = new FileWriter(filePath) - final StringWriter stringWriter = new StringWriter() - writeHeader(stringWriter) - - writeBlocks(stringWriter, - describingComment(), - rootProjectData(), - inceptionYear(), - licence(), - projectDependencies() - ) - fileWriter.write(stringWriter.toString()) - fileWriter.close() - } - - /** - * Writes the specified lines using the specified writer, dividing them by platforms line - * separator. - * - * The written lines are also padded with platforms line separator from both sides - */ - static void writeBlocks(final StringWriter writer, final String... lines) { - writer.write(NEW_LINE) - for (final String line : lines) { - writer.write(line) - writer.write(NEW_LINE) - writer.write(NEW_LINE) - } - writer.write(NEW_LINE) - } - - /** - * Obtains a String that represents a tag with the inception year of Spine. - */ - private static String inceptionYear() { - final Writer writer = new StringWriter() - final MarkupBuilder xmlBuilder = new MarkupBuilder(writer) - xmlBuilder.inceptionYear(SPINE_INCEPTION_YEAR) - return writer.toString() - } - - /** - * Obtains licence information about Spine. - * - *

More on licences here. - */ - private static String licence() { - final Writer writer = new StringWriter() - SpineLicenceAsXml.writeUsing(writer) - return writer.toString() - } - - /** - * Obtains a string that contains project dependencies as XML. - * - *

Obtained string also contains a closing project tag. - */ - private String projectDependencies() { - Writer writer = new StringWriter() - ProjectDependenciesAsXml projectDeps = ProjectDependenciesAsXml.of(project) - projectDeps.writeUsing(writer) - writer.write(NEW_LINE) - writer.write(CLOSING_PROJECT_TAG) - return writer.toString() - } - - /** - * Obtains a description comment that describes the nature of the generated {@code pom.xml} file. - */ - private static String describingComment() { - String description = - System.lineSeparator() + - "This file was generated using the Gradle `generatePom` task. " + - System.lineSeparator() + - "This file is not suitable for `maven` build tasks. It only describes the " + - "first-level dependencies of " + - System.lineSeparator() + - "all modules and does not describe the project " + - "structure per-subproject." + - System.lineSeparator() - String descriptionComment = - String.format("", - System.lineSeparator(), - description, - System.lineSeparator()) - return descriptionComment - } - - /** - * Obtains a string that contains the name and the version of the current project. - */ - private String rootProjectData() { - Writer writer = new StringWriter() - MarkupBuilder xmlBuilder = new MarkupBuilder(writer) - xmlBuilder.groupId(this.groupId) - xmlBuilder.artifactId(this.artifactId) - xmlBuilder.version(this.version) - return writer.toString() - } - - /** - * Writes the XML metadata using the specified writer. - */ - private static void writeHeader(StringWriter stringWriter) { - stringWriter.write(XML_METADATA) - stringWriter.write(System.lineSeparator()) - stringWriter.write(PROJECT_SCHEMA_LOCATION) - stringWriter.write(System.lineSeparator()) - stringWriter.write(MODEL_VERSION) - stringWriter.write(System.lineSeparator()) - } -} - -/** - * Dependencies of the project expressed as XML. - * - *

Subprojects dependencies are included, transitive dependencies are not included. - * - *

Example: - *

- * {@code
- *  
- *      
- *          io.spine
- *          base
- *          1.0.0-pre7
- *}
- * 
- */ -class ProjectDependenciesAsXml { - - private final Set firstLevelDependencies - - private ProjectDependenciesAsXml(Set dependencySet) { - this.firstLevelDependencies = new TreeSet<>(dependencySet) - } - - /** Creates a new instance based on the specified project. */ - static ProjectDependenciesAsXml of(Project project) { - Set dependencies = projectDependencies(project) - return new ProjectDependenciesAsXml(dependencies) - } - - /** - * Writes the dependencies using the specified writer. - * - *

Used writer will not be closed. - */ - void writeUsing(Writer writer) { - MarkupBuilder xmlBuilder = new MarkupBuilder(writer) - xmlBuilder.dependencies() { - firstLevelDependencies - .forEach { projectDep -> - xmlBuilder.dependency { - groupId(projectDep.dependency().group) - artifactId(projectDep.dependency().name) - version(projectDep.dependency().version) - if (projectDep.hasDefinedScope()) { - scope(projectDep.scopeName()) - } - } - } - } - } - - private static Set projectDependencies(Project project) { - Set firstLevelDependencies = new HashSet<>() - firstLevelDependencies.addAll(dependenciesFromAllConfigurations(project)) - project.subprojects.forEach { subproject -> - Set subprojectDeps = dependenciesFromAllConfigurations(subproject) - firstLevelDependencies.addAll(subprojectDeps) - } - return firstLevelDependencies.stream().sorted().distinct().collect(toSet()) - } - - private static Set dependenciesFromAllConfigurations(Project project) { - Set result = new HashSet<>() - project.configurations.forEach { c -> - def configuration = c - if (isResolvable(c)) { - // Force configuration resolution. - configuration.resolvedConfiguration - } - configuration.dependencies.forEach { - if (isExternal(it)) { - DependencyWithScope dependency = DependencyWithScope.of(it, configuration) - result.add(dependency) - } - } - } - return result - } - - static boolean isResolvable(Configuration config) { - config.hasProperty("canBeResolved") && config.canBeResolved - } - - private static boolean isExternal(Dependency dependency) { - return AbstractExternalModuleDependency.isAssignableFrom(dependency.class) - } -} - -/** - * A project dependency with its scope. - * - * @see - * - * More on dependency scopes . - */ -class DependencyWithScope implements Comparable { - - private final Dependency dependency - private final DependencyScope scope - - /** - * A map that contains the relations of known Gradle configuration names - * to their Maven dependency scope equivalents. - */ - private static Map CONFIG_TO_SCOPE - - - /** - * Performs comparison of {@code DependencyWithScope} instances based on the following rules: - * - *

    - *
  • Compares the scope of the dependency first. Dependencies with lower scope - * {@linkplain #dependencyPriority priority} number goes first. - *
  • For dependencies with same scope does the lexicographical group name comparison. - *
  • For dependencies within the same group does the lexicographical artifact - * name comparison. - *
  • For dependencies with the same artifact name does the lexicographical artifact - * version comparison. - *
- */ - private static final Comparator COMPARATOR = Comparator - .comparingInt { it.dependencyPriority() } - .thenComparing((Function) { it.dependency().group }) - .thenComparing((Function) { it.dependency().name }) - .thenComparing((Function) { it.dependency().version }) - - static { - final DependencyScope compile = DependencyScope.compile - final DependencyScope runtime = DependencyScope.runtime - final DependencyScope provided = DependencyScope.provided - - CONFIG_TO_SCOPE = new HashMap<>() - - /* - * Configurations from the Gradle Java plugin that are known to be mapped to the `compile` - * scope. - * - * Dependencies with the `compile` Maven scope are propagated to dependent projects. - * - * More at https://docs.gradle.org/current/userguide/java_plugin.html#tab:configurations - */ - CONFIG_TO_SCOPE.put("compile", compile) - CONFIG_TO_SCOPE.put("implementation", compile) - CONFIG_TO_SCOPE.put("api", compile) - - /* - * Configurations from the Gradle Java plugin that are known to be mapped to the `runtime` - * scope. - * - * Dependencies with the `runtime` Maven scopes are required for execution only. - */ - CONFIG_TO_SCOPE.put("runtime", runtime) - CONFIG_TO_SCOPE.put("runtimeOnly", runtime) - CONFIG_TO_SCOPE.put("runtimeClasspath", runtime) - CONFIG_TO_SCOPE.put("default", runtime) - - - /* - * Configurations from the Gradle Java plugin that are known to be mapped to the `provided` - * scope. - * - * Dependencies with the `provided` Maven scope are not propagated to dependent projects - * but are required during the compilation. - */ - CONFIG_TO_SCOPE.put("compileOnly", provided) - CONFIG_TO_SCOPE.put("compileOnlyApi", provided) - CONFIG_TO_SCOPE.put("annotationProcessor", provided) - } - - private DependencyWithScope(Dependency dependency, DependencyScope scope) { - this.dependency = dependency - this.scope = scope - } - - /** - * Creates a new instance based on the specified dependency and its configuration. - * - *

The scope of the dependency is based on the name of the configuration. - */ - static DependencyWithScope of(Dependency dependency, Configuration configuration) { - String configurationName = configuration.name - if (CONFIG_TO_SCOPE.containsKey(configurationName)) { - return new DependencyWithScope(dependency, CONFIG_TO_SCOPE.get(configurationName)) - } - if (configurationName.toLowerCase().startsWith("test")) { - return new DependencyWithScope(dependency, DependencyScope.test) - } - return new DependencyWithScope(dependency, DependencyScope.undefined) - } - - /** - * Obtains the layout priority of a scope. - * - * Layout priority determines what scopes come first in the generated {@code pom.xml} file. - * Dependencies with a lower priority number go on top. - */ - int dependencyPriority() { - switch(scope) { - case DependencyScope.compile: - return 0 - case DependencyScope.runtime: - return 1 - case DependencyScope.test: - return 2 - default: - return 3 - } - } - - /** Obtains the scope name of this dependency .*/ - String scopeName() { - return scope.name() - } - - /** Obtains the Gradle dependency. */ - Dependency dependency() { - return this.dependency - } - - /** Obtains the Maven scope of this dependency. */ - DependencyScope scope() { - return this.scope - } - - /** - * Returns {@code true} if this dependency has a defined scope, returns {@code false} otherwise. - */ - boolean hasDefinedScope() { return scope != DependencyScope.undefined } - - @Override - boolean equals(o) { - if (this.is(o)) return true - if (getClass() != o.class) return false - - DependencyWithScope that = (DependencyWithScope) o - - if (dependency.group != that.dependency.group) return false - if (dependency.name != that.dependency.name) return false - if (dependency.version != that.dependency.version) return false - - return true - } - - @Override - int hashCode() { - int result = (dependency != null ? dependency.hashCode() : 0) - return result - } - - @Override - int compareTo(DependencyWithScope o) { - return COMPARATOR.compare(this, o) - } - - /** - * A Maven dependency scope. - */ - static enum DependencyScope { - undefined, - compile, - provided, - runtime, - test, - system - /* - `import` is also a scope, however, it can't be used outside the `` - section, which is outside of the scope of this script - */ - } -} - -/** - * Information about the licences used by Spine in XML form. - */ -class SpineLicenceAsXml { - - private static final String NAME = "Apache License, Version 2.0" - private static final String URL = "https://www.apache.org/licenses/LICENSE-2.0.txt" - private static final String DISTRIBUTION = "repo" - - /** Prevents instantiation. */ - private SpineLicenceAsXml() { - } - - /** - * Writes information about the Spine licence using the specified writer. - */ - static void writeUsing(Writer fileWriter) { - MarkupBuilder xmlBuilder = new MarkupBuilder(fileWriter) - xmlBuilder.licenses { - license { - name(NAME) - url(SpineLicenceAsXml.URL) - distribution(DISTRIBUTION) - } - } - } -} - -/** - * Information about the root project. - * - *

Root project is the project for which the {@code generatePom} is executed. - * - *

Includes group ID, artifact name and the version. - */ -class RootProjectData { - - private final Project project - private final String groupId - private final String artifactId - private final String version - - private RootProjectData(Project project, String group, String artifactId, String version) { - this.project = project - this.groupId = group - this.artifactId = artifactId - this.version = version - } - - /** - * Creates a new instance. - * - *

Data from the specified project is prioritized. - * If a property (group ID, artifact name or version) is not found in the project, - * it is taken from the specified extension. - */ - static RootProjectData fromEither(Project project, /* or */ ExtraPropertiesExtension extension) { - boolean groupMissingFromProject = project.group == null || project.group.isEmpty() - boolean nameMissingFromProject = project.name == null || project.name.isEmpty() - boolean versionMissingFromProject = project.version == null || project.version.isEmpty() - - String groupId = groupMissingFromProject ? extension.groupId : project.group - String name = nameMissingFromProject ? extension.artifactId : project.name - String version = versionMissingFromProject ? extension.version : project.version - - return new RootProjectData(project, groupId, name, version) - } - - /** Obtains the project object matching the root project. */ - Project project() { - return this.project - } - - /** Obtains the group ID of the root project. */ - String groupId() { - return this.groupId - } - - /** Obtains the artifact ID of the root project. */ - String artifactId() { - return this.artifactId - } - - /** Obtains the version of the root project. */ - String version() { - return this.version - } -} diff --git a/buildSrc/src/main/groovy/jacoco.gradle b/buildSrc/src/main/groovy/jacoco.gradle deleted file mode 100644 index cef391a4..00000000 --- a/buildSrc/src/main/groovy/jacoco.gradle +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -// Apply this script to enable the combined JaCoCo test report. -// -// This task combines the XML report results from all Java sub-projects. -// Inspired by: https://gist.github.com/aalmiray/e6f54aa4b3803be0bcac -// -// This task runs after `:check` task. - -import groovy.io.FileType - -import java.util.stream.Collectors - -// Required to grab dependencies for `jacocoRootReport` task. -repositories { - mavenCentral() -} - -println("`jacoco.gradle` script is deprecated. Please use the `JacocoConfig` instead.") - -// Adds the `:check` task. -apply plugin: 'base' - -final def javaProjects = subprojects.findAll { it.pluginManager.hasPlugin('jacoco') } -final def jacocoReports = file("${rootProject.buildDir}/subreports/jacoco/") - -task copyReports(dependsOn: javaProjects.jacocoTestReport, type: Copy) { - description = "Copies JaCoCo reports from subprojects into a single directory in the root project." - - from files(javaProjects.jacocoTestReport.executionData) - into jacocoReports - - rename { "${UUID.randomUUID().toString()}.exec" } -} - -// Create an combined coverage report across Java modules, -// excluding the generated content from the coverage stats. -// -task jacocoRootReport(dependsOn: ':copyReports', type: JacocoReport) { - - final def sourceDirs = CodebaseFilter.nonGeneratedOnly(files(javaProjects.sourceSets.main.java.srcDirs)) - additionalSourceDirs.from sourceDirs - sourceDirectories.from sourceDirs - executionData.from fileTree(jacocoReports) - - final def filter = new CodebaseFilter(project, - javaProjects.sourceSets.main.java.srcDirs, - javaProjects.sourceSets.main.output) - final def nonGeneratedFiles = files(filter.findNonGeneratedCompiledFiles()) - classDirectories.from nonGeneratedFiles - additionalClassDirs.from nonGeneratedFiles - - reports { - html.required.set(true) - xml.required.set(true) - csv.required.set(false) - } - onlyIf = { - true - } -} - -check.dependsOn jacocoRootReport - -/** - * Serves to distinguish the {@code .java} and {@code .class} files built from - * the Protobuf definitions from the human-created production code. - */ -class CodebaseFilter { - - private static final String GENERATED_PATH_MARKER = "generated" - - private static final String JAVA_SRC_FOLDER_MARKER = "/java/" - private static final String SPINE_JAVA_SRC_FOLDER_MARKER = "main/spine/" - private static final String GRPC_SRC_FOLDER_MARKER = "/main/grpc/" - - private static final String JAVA_OUTPUT_FOLDER_MARKER = "/main/" - - private static final String JAVA_SOURCE_FILE_EXTENSION = ".java" - private static final String COMPILED_CLASS_FILE_EXTENSION = ".class" - private static final String ANONYMOUS_CLASS_MARKER = '$' - private static final String ANONYMOUS_CLASS_PATTERN = "\\${ANONYMOUS_CLASS_MARKER}" - - private final Project project - private final def javaSrcDirs - private final def outputDirs - - CodebaseFilter(final Project project, final javaSrcDirs, final outputDirs) { - this.project = project - this.javaSrcDirs = javaSrcDirs - this.outputDirs = outputDirs - } - - static FileCollection nonGeneratedOnly(final FileCollection files) { - return files.filter { - !it.absolutePath.contains(GENERATED_PATH_MARKER) - } - } - - static FileCollection generatedOnly(final FileCollection files) { - return files.filter { - it.absolutePath.contains(GENERATED_PATH_MARKER) - } - } - - private static String parseClassName(final File file, final String sourceFolderMarker, final String extension) { - - final def index = file.absolutePath.lastIndexOf(sourceFolderMarker) - if (index > 0) { - def filePathInFolder = file.absolutePath.substring(index + sourceFolderMarker.length()) - if (filePathInFolder.endsWith(extension)) { - filePathInFolder = filePathInFolder.substring(0, filePathInFolder.length() - extension.length()) - - final def className = filePathInFolder.replace('/', '.') - return className - } else { - return null - } - } else { - return null - } - } - - private LinkedList getGeneratedClassNames() { - final def sourceFiles = project.files(javaSrcDirs) - final def generatedSourceFiles = generatedOnly(sourceFiles) - - final def generatedClassNames = [] - generatedSourceFiles.each { final folder -> - if (folder.exists() && folder.isDirectory()) { - folder.eachFileRecurse(FileType.FILES) { final aFile -> - final def name = parseClassName(aFile, JAVA_SRC_FOLDER_MARKER, JAVA_SOURCE_FILE_EXTENSION) - if (name != null) { - generatedClassNames.add(name) - } else { - // Try another folder prefix; perhaps this file is gRPC service. - final def generatedByGrpc = parseClassName(aFile, - GRPC_SRC_FOLDER_MARKER, - JAVA_SOURCE_FILE_EXTENSION) - if (generatedByGrpc != null) { - generatedClassNames.add(generatedByGrpc) - } else { - // Try one more folder prefix; perhaps this file is generated by Spine. - final def generatedBySpine = - parseClassName(aFile, SPINE_JAVA_SRC_FOLDER_MARKER, JAVA_SOURCE_FILE_EXTENSION) - if (generatedBySpine != null) { - generatedClassNames.add(generatedBySpine) - } - } - } - } - } - } - - return generatedClassNames - } - - List findNonGeneratedCompiledFiles() { - log("Source dirs for code coverage calculation:") - final def srcDirs = project.files(javaSrcDirs) - srcDirs.each { - log(" - ${it}") - } - - final def generatedClassNames = getGeneratedClassNames() - log(generatedClassNames.join('\n')) - final def nonGeneratedClassTree = outputDirs - .stream() - .flatMap { it.getClassesDirs().files.stream() } - .map { final srcFile -> - log("Filtering out the generated classes for ${srcFile}") - - // Return the filtered `fileTree`s as a collected result. - return project.fileTree(dir: srcFile, exclude: { final details -> - def className = parseClassName(details.file, JAVA_OUTPUT_FOLDER_MARKER, COMPILED_CLASS_FILE_EXTENSION) - - // Handling anonymous classes as well. - // They should be associated with the same `.java` file as their parent class. - if (className != null && className.contains(ANONYMOUS_CLASS_MARKER)) { - // Assuming there cannot be more than a single `$`. - className = className.split(ANONYMOUS_CLASS_PATTERN)[0] - } - return generatedClassNames.contains(className) - }) - }.collect(Collectors.toList()) - return nonGeneratedClassTree - } - - private void log(final String message) { - project.logger.debug(message) - } -} diff --git a/buildSrc/src/main/groovy/javac-args.gradle b/buildSrc/src/main/groovy/javac-args.gradle deleted file mode 100644 index 9bfb780e..00000000 --- a/buildSrc/src/main/groovy/javac-args.gradle +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This script configures Java Compiler. - */ - -println("`javac-args.gradle` script is deprecated. Please use `JavaCompile.configureJavac()` " + - "and `JavaCompile.configureErrorProne()` utilities instead.") - -tasks.withType(JavaCompile) { - - if (JavaVersion.current() != JavaVersion.VERSION_1_8) { - throw new GradleException("Spine Event Engine can be built with JDK 8 only." + - " Supporting JDK 11 and above at build-time is planned in 2.0 release." + - " Please use the pre-built binaries available in the Spine Maven repository." + - " See https://github.com/SpineEventEngine/base/issues/457.") - } - - // Explicitly states the encoding of the source and test source files, ensuring - // correct execution of the `javac` task. - // - // Also promotes compiler warnings to errors, so that the build fails on warnings. - // This includes Error Prone warnings - options.encoding = 'UTF-8' - options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" - // The last command line argument is temporarily commented out because of - // this issue: https://github.com/SpineEventEngine/config/issues/173 - // Please restore when the issue is resolved. - // << "-Werror" - - // Configure Error Prone: - // 1. Exclude generated sources from being analyzed by Error Prone. - // 2. Turn the check off until Error Prone can handle `@Nested` JUnit classes. - // See issue: https://github.com/google/error-prone/issues/956 - // 3. Turn off checks which report unused methods and unused method parameters. - // See issue: https://github.com/SpineEventEngine/config/issues/61 - // - // For more config details see: - // https://github.com/tbroyer/gradle-errorprone-plugin/tree/master#usage - - options.errorprone.errorproneArgs.addAll('-XepExcludedPaths:.*/generated/.*', - '-Xep:ClassCanBeStatic:OFF', - '-Xep:UnusedMethod:OFF', - '-Xep:UnusedVariable:OFF', - '-Xep:CheckReturnValue:OFF', - '-Xep:FloggerSplitLogStatement:OFF') -} diff --git a/buildSrc/src/main/groovy/javadoc-options.gradle b/buildSrc/src/main/groovy/javadoc-options.gradle deleted file mode 100644 index 0c3bcbbf..00000000 --- a/buildSrc/src/main/groovy/javadoc-options.gradle +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This script enables the new Javadoc tags in the build. - * - * The tags are: - * 1. @apiNote - the additional notes and commentaries regarding the API - * 2. @implSpec - the implementation specification - * 3. @implNote - the commentaries and notes about the implementation - * - * It also explicitly states the encoding of the source files from which the Javadoc is composed, - * ensuring correct execution of the `javadoc` task. - * - * For the detailed description of the new tags, see: - * https://blog.codefx.org/java/new-javadoc-tags/#apiNote-implSpec-and-implNote - * - * This script should be applied to the `subprojects` section of the root project, - * or to the specific child projects. - */ - -ext { - javadocOptions = [ - - // New tags which are used in the code and titles for them. - "tags" : ["apiNote:a:API Note:", - "implSpec:a:Implementation Requirements:", - "implNote:a:Implementation Note:"], - - // Encoding of the source files. - "encoding" : 'UTF-8' - ] -} - -javadoc { - source = sourceSets.main.allJava - options.tags = javadocOptions.tags - options.encoding = javadocOptions.encoding -} - -// The below config avoids numerous warnings for missing @param tags. -// As suggested by Stephen Colebourne: -// https://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html -// See also: -// https://github.com/GPars/GPars/blob/master/build.gradle#L268 -// -if (JavaVersion.current().isJava8Compatible()) { - tasks.withType(Javadoc) { - options.addStringOption('Xdoclint:none', '-quiet') - } -} diff --git a/buildSrc/src/main/groovy/js/build-tasks.gradle b/buildSrc/src/main/groovy/js/build-tasks.gradle deleted file mode 100644 index 78202430..00000000 --- a/buildSrc/src/main/groovy/js/build-tasks.gradle +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * This script declares common Gradle tasks required for JavaScript modules. - * - *

Most of the tasks launch a separate process which runs an NPM CLI command, so it's necessary - * that the NPM command line tool is installed. - * - *

This script doesn't configure Protobuf plugin and Spine's Protobuf JS plugin. - */ - -println("`build-tasks.gradle` script is deprecated. Please use `javascript` extension instead.") - -ext { - JAVA_SCRIPT_TASK_GROUP = 'JavaScript' - - workDirectory = "$projectDir" - nodeModulesDir = "$projectDir/node_modules" - packageJsonFile = "$projectDir/package.json" - - npm = { final String... command -> - ext.executeNpm(workDirectory as File, command) - } -} - -apply plugin: 'base' -apply from: "$rootDir" + io.spine.internal.gradle.Scripts.commonPath + "js/npm-cli.gradle" -apply from: "$rootDir" + io.spine.internal.gradle.Scripts.commonPath + "js/update-package-version.gradle" - -/** - * Compiles Protobuf sources into JavaScript. - * - *

This is a lifecycle task. It performs no action but triggers all the tasks which perform - * the compilation. - */ -task compileProtoToJs { - group = JAVA_SCRIPT_TASK_GROUP - description = "Compiles Protobuf sources to JavaScript." -} - -/** - * Installs the module dependencies using the `npm install` command. - * - * The `npm install` command is executed with the vulnerability check disabled since - * it cannot fail the task execution despite on vulnerabilities found. - * - * To check installed Node packages for vulnerabilities execute `auditNodePackages` task. - */ -task installNodePackages { - group = JAVA_SCRIPT_TASK_GROUP - description = 'Installs the module`s Node dependencies.' - - inputs.file packageJsonFile - outputs.dir nodeModulesDir - - doLast { - // To turn off npm audit when installing all packages. Use `auditNodePackages` task - // to check installed Node packages for vulnerabilities. - npm 'set', 'audit', 'false' - npm 'install' - } -} - -/** - * Audits the module dependencies using the `npm audit` command. - * - * Sets the minimum level of vulnerability for `npm audit` to exit with a non-zero exit code - * to "high". - */ -task auditNodePackages { - group = JAVA_SCRIPT_TASK_GROUP - description = 'Audits the module`s Node dependencies.' - dependsOn installNodePackages - - inputs.dir nodeModulesDir - - doLast { - npm 'set', 'audit-level', 'critical' - try { - npm 'audit' - } catch (final Exception ignored) { - npm 'audit', '--registry' 'http://registry.npmjs.eu' - } - } -} - -check.dependsOn auditNodePackages - -/** - * Cleans output of `buildJs` and dependant tasks. - */ -task cleanJs { - group = JAVA_SCRIPT_TASK_GROUP - description = 'Cleans the output of JavaScript build.' - - clean.dependsOn cleanJs - - doLast { - delete buildJs.outputs - delete compileProtoToJs.outputs - delete installNodePackages.outputs - } -} - -/** - * Assembles the JS sources. - * - * This task is an analog of `build` for JS. - * - * To include a task into the JS build, depend `buildJs` onto that task. - */ -task buildJs { - group = JAVA_SCRIPT_TASK_GROUP - description = "Assembles the JavaScript source files." - - dependsOn updatePackageVersion - dependsOn installNodePackages - dependsOn compileProtoToJs - assemble.dependsOn buildJs -} - -/** - * Tests the JS sources. - * - * If `check` task is scheduled to run, this task is automatically added to - * the task graph and will be executed after `test` task completion. - */ -task testJs { - group = JAVA_SCRIPT_TASK_GROUP - description = "Tests the JavaScript source files." - - dependsOn installNodePackages - dependsOn compileProtoToJs - check.dependsOn testJs - - testJs.mustRunAfter test -} - -idea.module { - excludeDirs += file(nodeModulesDir) -} diff --git a/buildSrc/src/main/groovy/js/configure-proto.gradle b/buildSrc/src/main/groovy/js/configure-proto.gradle deleted file mode 100644 index d0966a41..00000000 --- a/buildSrc/src/main/groovy/js/configure-proto.gradle +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -import io.spine.internal.dependency.Protobuf -import io.spine.internal.gradle.Scripts - -/** - * Configures how the Proto definitions of the project are compiled into JavaScript and their - * publishing. - * - * Use this script if the project contains Proto files that should be published as a separate NPM - * module. - * - * The prerequisites for using the script are: - * - * 1. The Spine Proto JS plugin applied to the project - * (see https://github.com/SpineEventEngine/base/tree/master/tools/mc-js). - * - * 2. The extension variable `versionToPublishJs` configured to represent the version under which - * the NPM packages should be published. - */ - -println("`configure-proto.gradle` script is deprecated. Please use `javascript` extension instead.") - -ext { - genProtoBaseDir = "$projectDir/generated" - genProtoMain = "$genProtoBaseDir/main/js" - genProtoTest = "$genProtoBaseDir/test/js" -} - -apply from: "$rootDir" + io.spine.internal.gradle.Scripts.commonPath + "js/npm-publish-tasks.gradle" - -/** - * Configures the JS code generation. - */ -protobuf { - generatedFilesBaseDir = genProtoBaseDir - protoc { - artifact = Protobuf.protoc - } - generateProtoTasks { - all().each { final task -> - task.builtins { - // For information on JavaScript code generation please see - // https://github.com/google/protobuf/blob/master/js/README.md - js { - option "import_style=commonjs" - } - - task.generateDescriptorSet = true - final def testClassifier = task.sourceSet.name == "test" ? "_test" : "" - final def descriptorName = - "${project.group}_${project.name}_${project.version}${testClassifier}.desc" - task.descriptorSetOptions.path = - "${projectDir}/build/descriptors/${task.sourceSet.name}/${descriptorName}" - } - compileProtoToJs.dependsOn task - } - } -} - -/** - * Configures the generation of additional features for the Proto messages via - * Spine Proto JS plugin. - */ -protoJs { - mainGenProtoDir = genProtoMain - testGenProtoDir = genProtoTest - - generateParsersTask().dependsOn compileProtoToJs - buildJs.dependsOn generateParsersTask() -} - -/** - * Prepares Proto files for publication, see {@code npm-publish-tasks.gradle}. - */ -prepareJsPublication { - - doLast { - copy { - from (projectDir) { - include 'package.json' - include '.npmrc' - } - - from (genProtoMain) { - include '**' - } - - into publicationDirectory - } - } -} diff --git a/buildSrc/src/main/groovy/js/js.gradle b/buildSrc/src/main/groovy/js/js.gradle deleted file mode 100644 index 963f6b87..00000000 --- a/buildSrc/src/main/groovy/js/js.gradle +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * A script configuring the build of a JavaScript module, which is going to be published to NPM. - * - *

In particular, the script brings tasks to: - *

    - *
  1. Install NPM dependencies. - *
  2. Compile Protobuf sources to JavaScript. - *
  3. Test and generate coverage reports for JavaScript sources. - *
  4. Update the version in `package.json` depending on the `versionToPublishJs` property. - *
  5. Clean up the build output of a JavaScript module. - *
- * - *

The script is based on other scripts from `config` submodule. - */ - -println("`js.gradle` script is deprecated. Please use `javascript` extension instead.") - -ext { - srcDir = "$projectDir/main" - testSrcDir = "$projectDir/test" - genProtoBaseDir = projectDir - genProtoSubDir = "proto" - genProtoMain = "$genProtoBaseDir/main/$genProtoSubDir" - genProtoTest = "$genProtoBaseDir/test/$genProtoSubDir" - nycOutputDir = "$projectDir/.nyc_output" -} - -apply from: "$rootDir" + io.spine.internal.gradle.Scripts.commonPath + "js/npm-publish-tasks.gradle" - -/** - * Cleans old module dependencies and build outputs. - */ -task deleteCompiled { - group = JAVA_SCRIPT_TASK_GROUP - description = 'Cleans old module dependencies and build outputs.' - - clean.dependsOn deleteCompiled - - doLast { - delete genProtoMain - delete genProtoTest - delete coverageJs.outputs - } -} - -/** - * Customizes the task already defined in `config` module by running Webpack build. - */ -buildJs { - - outputs.dir "$projectDir/dist" - - doLast { - npm 'run', 'build' - npm 'run', 'build-dev' - } -} - -/** - * Customizes the task already defined in `config` module by running - * the JavaScript tests. - */ -testJs { - - doLast { - npm 'run', 'test' - } -} - -/** - * Copies bundled JS sources to the temporary NPM publication directory. - */ -task copyBundledJs(type: Copy) { - group = JAVA_SCRIPT_TASK_GROUP - description = 'Copies assembled JavaScript sources to the NPM publication directory.' - - from buildJs.outputs - into "$publicationDirectory/dist" - - dependsOn buildJs -} - -/** - * Transpiles JS sources before publishing them to NPM. - * - * Puts the resulting files to the temporary NPM publication directory. - */ -task transpileSources { - group = JAVA_SCRIPT_TASK_GROUP - description = "Transpiles sources before publishing." - - doLast { - npm 'run', 'transpile-before-publish' - } -} - -/** - * Defines files to copy by the task. - */ -prepareJsPublication { - - doLast { - copy { - from (projectDir) { - include 'package.json' - include '.npmrc' - } - into publicationDirectory - } - } - - //TODO:2019-02-05:dmytro.grankin: temporarily don't publish a bundle, see https://github.com/SpineEventEngine/web/issues/61 - //dependsOn copyBundledJs - dependsOn transpileSources -} - -/** - * Runs the JavaScript tests and collects the code coverage. - */ -task coverageJs { - group = JAVA_SCRIPT_TASK_GROUP - description = 'Runs the JS tests and collects the code coverage info.' - - outputs.dir nycOutputDir - - final def runsOnWindows = org.gradle.internal.os.OperatingSystem.current().isWindows() - final def coverageScript = runsOnWindows ? 'coverage:win' : 'coverage:unix' - - doLast { - npm 'run', coverageScript - } - - dependsOn buildJs - - rootProject.check.dependsOn coverageJs -} - -/** - * Generates the report on NPM dependencies and their licenses. - */ -task npmLicenseReport { - - doLast { - npm 'run', 'license-report' - } -} - -/** - * Runs NPM license report straight after the Gradle license report. - */ -//TODO:2021-09-22:alexander.yevsyukov: Resolve this dependency. -//generateLicenseReport.finalizedBy npmLicenseReport - -apply plugin: 'io.spine.mc-js' - -protoJs { - generatedMainDir = genProtoMain - generatedTestDir = genProtoTest - - generateParsersTask().dependsOn compileProtoToJs - buildJs.dependsOn generateParsersTask() - testJs.dependsOn buildJs -} - - -protobuf { - generatedFilesBaseDir = genProtoBaseDir - protoc { - artifact = io.spine.internal.dependency.Protobuf.compiler - } - generateProtoTasks { - all().each { final task -> - task.builtins { - // Do not use java builtin output in this project. - remove java - - // For information on JavaScript code generation please see - // https://github.com/google/protobuf/blob/master/js/README.md - js { - option "import_style=commonjs" - outputSubDir = genProtoSubDir - } - - task.generateDescriptorSet = true - final def testClassifier = task.sourceSet.name == "test" ? "_test" : "" - final def descriptorName = "${project.group}_${project.name}_${project.version}${testClassifier}.desc" - task.descriptorSetOptions.path = "${projectDir}/build/descriptors/${task.sourceSet.name}/${descriptorName}" - } - compileProtoToJs.dependsOn task - } - } -} diff --git a/buildSrc/src/main/groovy/js/npm-cli.gradle b/buildSrc/src/main/groovy/js/npm-cli.gradle deleted file mode 100644 index cc273357..00000000 --- a/buildSrc/src/main/groovy/js/npm-cli.gradle +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -import org.apache.tools.ant.taskdefs.condition.Os - -/** - * The script allowing to run NPM commands from Gradle. - */ - -println("`npm-cli.gradle` script is deprecated. Please use `javascript` extension instead.") - -/** - * The name of an environmental variable which contains the NPM auth token. - * - *

The token is used for publishing only. - * - *

It is required to set this variable before invoking NPM commands. - */ -ext.NPM_TOKEN_VARIABLE = "NPM_TOKEN" - -/** - * @return the value of `NPM_TOKEN` environmental variable or a stub value, if the token is not set - */ -String npmToken() { - final def tokenVarValue = System.getenv(NPM_TOKEN_VARIABLE) - final def token = tokenVarValue?.isEmpty() ? "PUBLISHING_FORBIDDEN" : tokenVarValue - return token -} - -/** - * Executes the given command depending on the current OS. - * - * @param workingDirArg the directory to execute the command in - * @param windowsCommand the command to execute is the OS is Windows - * @param unixCommand the command to execute is the OS is Unix-like - * @param params the command params, platform-independent - */ -def execMultiplatform(final File workingDirArg, - final String windowsCommand, - final String unixCommand, - final String[] params) { - exec { - final String command = Os.isFamily(Os.FAMILY_WINDOWS) ? windowsCommand : unixCommand - final List resultingParams = [command] + Arrays.asList(params) - workingDir = workingDirArg - commandLine = resultingParams - environment NPM_TOKEN_VARIABLE, npmToken() - } -} - -def runNpm(final File launchDir, final String[] params) { - execMultiplatform launchDir, 'npm.cmd', 'npm', params -} - -ext { - - /** - * Executes an {@code npm} CLI command. - * - * For example, to execute command {@code npm run compile}, invoke this function as follows: - * {@code executeNpm 'run', 'compile'} - * - * @param params the command parameters - */ - executeNpm = { final File from = projectDir, final String... params -> - runNpm(from, params) - } -} diff --git a/buildSrc/src/main/groovy/js/npm-publish-tasks.gradle b/buildSrc/src/main/groovy/js/npm-publish-tasks.gradle deleted file mode 100644 index 63abf673..00000000 --- a/buildSrc/src/main/groovy/js/npm-publish-tasks.gradle +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * The script declares tasks for publishing to NPM. - * - *

In order to publish the NPM module, it is required that the {@code NPM_TOKEN} environment - * variable is set to a valid NPM auth token. If the token is not set, a dummy value is added to - * the NPM execution process, which is sufficient for the local development. - */ - -println("`npm-publish-tasks.gradle` script is deprecated. " + - "Please use `javascript` extension instead.") - -apply from: "$rootDir" + io.spine.internal.gradle.Scripts.commonPath + "js/build-tasks.gradle" - -ext { - publicationDirectory = "$buildDir/npm-publication/" -} - -/** - * A task to prepare files for publication. - * - *

Does nothing by default, so a user should configure this task - * to copy all required files to the {@code publicationDirectory}. - * - *

The task is performed before {@code link} and {@code publishJs} tasks. - * - *

The task isn't a {@code copy} task since it causes side effects - * like a removal of the publication directory. See https://github.com/gradle/gradle/issues/1012. - */ -task prepareJsPublication { - group = JAVA_SCRIPT_TASK_GROUP - description = 'Prepares the NPM package for publish.' - - dependsOn buildJs -} - -/** - * Publishes the NPM package locally with `npm link`. - */ -task link { - group = JAVA_SCRIPT_TASK_GROUP - description = "Publishes the NPM package locally." - - doLast { - executeNpm(publicationDirectory as File, 'link') - } - - dependsOn prepareJsPublication -} - -/** - * Publishes the NPM package with `npm publish`. - */ -task publishJs { - group = JAVA_SCRIPT_TASK_GROUP - description = 'Publishes the NPM package.' - - doLast { - executeNpm(publicationDirectory as File, 'publish') - } - - dependsOn prepareJsPublication - publish.dependsOn publishJs -} diff --git a/buildSrc/src/main/groovy/js/update-package-version.gradle b/buildSrc/src/main/groovy/js/update-package-version.gradle deleted file mode 100644 index b6b64b8f..00000000 --- a/buildSrc/src/main/groovy/js/update-package-version.gradle +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -import groovy.json.JsonOutput -import groovy.json.JsonSlurper - -/** - * This script declares a task to update the version in in a package.json file. - */ - -println("`update-package-version.gradle` script is deprecated. " + - "Please use `javascript` extension instead.") - -/** - * Updates the package.json version to the specified one. - * - *

The path of the package.json and the version to set has default values, - * but can be redefined: - * - *

{@code
- * updatePackageVersion.packageJsonPath = "custom/package.json"
- * updatePackageVersion.newVersion = npmPackageVersion
- * }
- */ -task updatePackageVersion() { - group = JAVA_SCRIPT_TASK_GROUP - description = 'Updates the version in package.json.' - - ext.packageJsonPath = packageJsonFile - ext.newVersion = versionToPublishJs - - doLast { - updatePackageJsonVersion(packageJsonPath as String, newVersion as String) - } -} - -void updatePackageJsonVersion(final String packageJsonPath, final String newVersion) { - def final packageJsonObject = readJsonFile(packageJsonPath) - - packageJsonObject['version'] = newVersion - updatePackageJson(packageJsonObject, packageJsonPath) -} - -Object readJsonFile(final String sourcePath) { - def final packageJsonFile = file(sourcePath) - return new JsonSlurper().parseText(packageJsonFile.text) -} - -static void updatePackageJson(final jsonObject, final String destinationPath) { - def final updatedText = JsonOutput.toJson(jsonObject) - def final prettyText = prettify(updatedText) - new File(destinationPath).text = prettyText -} - -static String prettify(final String jsonText) { - def prettyText = JsonOutput.prettyPrint(jsonText) - prettyText = prettyText.replace(' ', ' ') - prettyText = prettyText.replaceAll(/\{\s+}/, '{}') - prettyText = prettyText + '\n' - return prettyText -} diff --git a/buildSrc/src/main/groovy/license-report-project.gradle b/buildSrc/src/main/groovy/license-report-project.gradle deleted file mode 100644 index d6cfb9f8..00000000 --- a/buildSrc/src/main/groovy/license-report-project.gradle +++ /dev/null @@ -1,211 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -//file:noinspection UnnecessaryQualifiedReference - -import com.github.jk1.license.* -import com.github.jk1.license.render.ReportRenderer -import io.spine.internal.gradle.publish.PublishExtension - -/** - * This script plugin generates the license report for all dependencies used in a project. - * - *

Transitive dependencies are included. - * - *

Use `generateLicenseReport` task to trigger the generation. - */ - -buildscript { - repositories { - gradlePluginPortal() - } - - dependencies { - classpath io.spine.internal.dependency.LicenseReport.lib - } -} - -println("`license-report-project.gradle` script is deprecated. " + - "Please use the `LicenseReporter` utility instead.") - - -apply plugin: io.spine.internal.dependency.LicenseReport.GradlePlugin.id - -final def commonPath = io.spine.internal.gradle.Scripts.commonPath -apply from: "${rootDir}/${commonPath}/license-report-common.gradle" - -final reportOutputDir = "${project.buildDir}" + licenseReportConfig.relativePath -licenseReport { - outputDir = "$reportOutputDir" - excludeGroups = ['io.spine', 'io.spine.tools', 'io.spine.gcloud'] - configurations = ALL - renderers = [new MarkdownReportRenderer(licenseReportConfig.outputFilename)] -} - -/** - * Renders the dependency report in markdown. - */ -class MarkdownReportRenderer implements ReportRenderer { - - private Project project - private LicenseReportExtension config - private File output - private String fileName - - MarkdownReportRenderer(final String fileName) { - this.fileName = fileName - } - - @Input - String getFileNameCache() { return this.fileName } - - void render(final ProjectData data) { - project = data.project - config = project.licenseReport - output = new File(config.outputDir, fileName) - final String prefix = prefixFor(project) - output.text = """ - \n# Dependencies of `${project.group}:$prefix${project.name}:${project.version}` -""" - printDependencies(data) - output << """ - - \n The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -""" - output << "\n\nThis report was generated on **${new Date()}**" - output << " 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)." - } - - /** - * Obtains the artifact prefix for the passed project. - * - *

If the {@code PublishExtension} has the property {@code spinePrefix} set to {@code true} - * returns {@code "spine-"}, otherwise an empty string. - */ - private static String prefixFor(final Project project) { - final publishExtension = project.rootProject.extensions.findByType(PublishExtension.class) - final prefix = (publishExtension?.spinePrefix?.getOrElse(false) ?: false) - ? "spine-" - : "" - prefix - } - - private void printDependencies(final ProjectData data) { - - final runtimeDependencies = new HashSet() - final compileToolingDependencies = new HashSet() - - data.configurations.each { final ConfigurationData config -> - - - if(["runtime", "runtimeClasspath"].indexOf(config.name) != -1) { - runtimeDependencies.addAll(config.dependencies) - } else { - compileToolingDependencies.addAll(config.dependencies) - } - } - - output << "\n## Runtime" - runtimeDependencies.toArray().sort().each { - printModuleDependency(it) - } - - output << "\n## Compile, tests and tooling" - compileToolingDependencies.toArray().sort().each { - printModuleDependency(it) - } - } - - private void printModuleDependency(final ModuleData data) { - boolean projectUrlDone = false - output << "\n1." - - if (data.group) { - output << " **Group:** $data.group" - } - if (data.name) { - output << " **Name:** $data.name" - } - if (data.version) { - output << " **Version:** $data.version" - } - if (data.poms.isEmpty() && data.manifests.isEmpty()) { - output << " **No license information found**" - return - } - - if (!data.manifests.isEmpty() && !data.poms.isEmpty()) { - final ManifestData manifest = data.manifests.first() - final PomData pomData = data.poms.first() - if (manifest.url && pomData.projectUrl && manifest.url == pomData.projectUrl) { - output << "\n * **Project URL:** [$manifest.url]($manifest.url)" - projectUrlDone = true - } - } - - if (!data.manifests.isEmpty()) { - final ManifestData manifest = data.manifests.first() - if (manifest.url && !projectUrlDone) { - output << "\n * **Manifest Project URL:** [$manifest.url]($manifest.url)" - } - if (manifest.license) { - if (manifest.license.startsWith("http")) { - output << "\n * **Manifest license URL:** [$manifest.license]($manifest.license)" - - } else if (manifest.hasPackagedLicense) { - output << "\n * **Packaged License File:** [$manifest.license]($manifest.url)" - } else { - output << "\n * **Manifest License:** $manifest.license (Not packaged)" - - } - } - } - - if (!data.poms.isEmpty()) { - final PomData pomData = data.poms.first() - if (pomData.projectUrl && !projectUrlDone) { - output << "\n * **POM Project URL:** [$pomData.projectUrl]($pomData.projectUrl)" - - } - if (pomData.licenses) { - pomData.licenses.each { final License license -> - output << "\n * **POM License: $license.name**" - - if (license.url) { - if (license.url.startsWith("http")) { - output << " - [$license.url]($license.url)" - } else { - output << " **License:** $license.url" - - } - } - } - } - } - output << '\n' - } -} diff --git a/buildSrc/src/main/groovy/license-report-repo.gradle b/buildSrc/src/main/groovy/license-report-repo.gradle deleted file mode 100644 index c8212a85..00000000 --- a/buildSrc/src/main/groovy/license-report-repo.gradle +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * This script launches the per-project license report generation, concatenates the results - * and puts the resulting file into a repository root folder. - * - * If the repository consists just of a single root project, the generation is configured - * just for it alone. - * - * The script also configures the `build` task to be finalized by the license report routines. - * - * See `license-report-project.gradle` for a per-project license report generation. - */ - -println("`license-report-repo.gradle` script is deprecated. " + - "Please use the `LicenseReporter` utility instead.") - - -final def commonPath = io.spine.internal.gradle.Scripts.commonPath -apply from: "${rootDir}/${commonPath}/license-report-common.gradle" - -task reportLicensesInRepo { final Task task -> - def targetProjects; - if (subprojects.isEmpty()) { - println "Configuring the license report for a single root project." - targetProjects = [task.project] - } else { - println "Configuring the license report for all subprojects of a root project." - targetProjects = subprojects - } - - targetProjects.forEach { - final def generateLicenseReport = it.tasks.findByName('generateLicenseReport') - task.dependsOn(generateLicenseReport) - generateLicenseReport.dependsOn(it.tasks.findByName('assemble')) - } - - doLast { - final paths = targetProjects.stream().collect { - "${it.buildDir}${licenseReportConfig.relativePath}/${licenseReportConfig.outputFilename}" - } - - println "Aggregating the reports from the target projects." - final aggregatedContent = paths.collect { (new File(it)).getText() }.join("\n\n\n") - - (new File("$rootDir/$licenseReportConfig.outputFilename")).text = aggregatedContent - } -} - -build.finalizedBy reportLicensesInRepo -reportLicensesInRepo.dependsOn assemble diff --git a/buildSrc/src/main/groovy/model-compiler.gradle b/buildSrc/src/main/groovy/model-compiler.gradle deleted file mode 100644 index f254efdb..00000000 --- a/buildSrc/src/main/groovy/model-compiler.gradle +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This script configures Spine defaults for the Model Compiler code generation. - * - * Applies the following interfaces generation configurations: - * — all messages in Protobuf files ending with "commands.proto" are marked as `CommandMessage`; - * — all messages in Protobuf files ending with "events.proto" are marked as `EventMessage`; - * — all messages in Protobuf files ending with "rejections.proto" are marked as `RejectionMessage`; - * — all messages that qualify to be UUID messages are marked as `UuidValue`; - * — all messages that represent an entity state are marked as `EntityState`. - * - * And the following method generations are applied: - * — all messages that qualify to be UUID messages have helper `generate` and `of` methods - * generated using `UuidMethodFactory`; - * - * The generation of messages representing an entity state are appended with - * - entity columns for the fields marked as `column`; - * - entity query and entity query builder DSL. - * - * The fields of the messages are marked with certain interfaces: - * - `io.spine.base.EventMessageField` set to those in `*events.proto` and `*rejections.proto`; - * - `io.spine.query.EntityStateField` set to the fields of messages representing an entity state. - * - * - * Be aware that the root project `buildscript` should already have a classpath - * `io.spine.tools:spine-mc-java:` classpath dependency. - */ - -modelCompiler { - - interfaces { - mark messages().inFiles(suffix: "commands.proto"), asType("io.spine.base.CommandMessage") - mark messages().inFiles(suffix: "events.proto"), asType("io.spine.base.EventMessage") - mark messages().inFiles(suffix: "rejections.proto"), asType("io.spine.base.RejectionMessage") - mark messages().uuid(), asType("io.spine.base.UuidValue") - mark messages().entityState(), asType("io.spine.base.EntityState") - } - - methods { - applyFactory "io.spine.tools.java.code.UuidMethodFactory", messages().uuid() - } - - entityQueries { - generate = true - } - - fields { - generateFor messages().inFiles(suffix: "events.proto"), markAs("io.spine.base.EventMessageField") - generateFor messages().inFiles(suffix: "rejections.proto"), markAs("io.spine.base.EventMessageField") - generateFor messages().entityState(), markAs("io.spine.query.EntityStateField") - } -} diff --git a/buildSrc/src/main/groovy/pmd.gradle b/buildSrc/src/main/groovy/pmd.gradle deleted file mode 100644 index d6a1bd47..00000000 --- a/buildSrc/src/main/groovy/pmd.gradle +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - -/* - * This script configures Gradle PMD plugin. - */ -pmd { - toolVersion = "${io.spine.internal.dependency.Pmd.version}" - consoleOutput = true - incrementalAnalysis = true - - // The build is going to fail in case of violations. - ignoreFailures = false - - // Disable the default rule set to use the custom rules (see below). - ruleSets = [] - - // A set of custom rules. - ruleSetFiles = files("$rootDir/config/quality/pmd.xml") - - reportsDir = file("build/reports/pmd") - - // Just analyze the main sources; do not analyze tests. - sourceSets = [sourceSets.main] -} - -// Workaround for https://github.com/pmd/pmd/issues/1705. -pmdMain.classpath += sourceSets.main.runtimeClasspath diff --git a/buildSrc/src/main/groovy/publish-proto.gradle b/buildSrc/src/main/groovy/publish-proto.gradle deleted file mode 100644 index 113743cb..00000000 --- a/buildSrc/src/main/groovy/publish-proto.gradle +++ /dev/null @@ -1,231 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * This plugin enables a project to publish a JAR containing all the {@code .proto} definitions - * found in the project classpath, which is the definitions from {@code sourceSets.main.proto} and - * the proto files extracted from the JAR dependencies of the project. - * - *

The relative file paths are kept. - * - *

To depend onto such artifact of e.g. the spine-client module, use: - *

- *     {@code
- *     dependencies {
- *         compile "io.spine:spine-client:$version@proto"
- *     }
- *     }
- * 
- * - *

To enable the artifact publishing for a project, apply this plugin to it: - *

- *     {@code
- *     apply from: "$rootDir/config/gradle/publish-proto.gradle"
- *     }
- * 
- */ - -buildscript { - repositories { - mavenLocal() - mavenCentral() - } - - dependencies { - //noinspection UnnecessaryQualifiedReference - classpath io.spine.internal.dependency.Guava.lib - } -} - -task assembleProto(type: Jar) { - description "Assembles a JAR artifact with all Proto definitions from the classpath." - from { collectProto() } - include { isProtoFileOrDir(it.file) } - classifier 'proto' -} - -artifacts { - archives assembleProto -} - -/** - * Collects all the directories from current project and its dependencies (including zip tree - * directories) which contain {@code .proto} definitions. - * - *

The directories may in practice include files of other extension. The caller should take care - * of handling those files respectively. - * - *

It's guaranteed that there are no other Proto definitions in the current project classpath - * except those included into the returned {@code Collection}. - */ -Collection collectProto() { - final def dependencies = configurations.runtimeClasspath.files - final def jarFiles = dependencies.collect { JarFileName.ofFile(it) } - final def result = new HashSet<>() - for (final File jarFile in dependencies) { - if (jarFile.name.endsWith(".jar")) { - final def zipTree = zipTree(jarFile) - try { - for (final File file in zipTree) { - if (isProtoFile(file)) { - result.add(getProtoRoot(file, jarFiles)) - } - } - } catch (GradleException e) { - /* - * As the :assembleProto task configuration is resolved first upon the project - * configuration (and we don't have the dependencies there yet) and then upon - * the execution, the task should complete successfully. - * - * To make sure the configuration phase passes, we suppress the GradleException - * thrown by `zipTree()` indicating that the given file, which is a dependency JAR - * file does not exist. - * - * Though, if this error is thrown on the execution phase, this IS an error. Thus, - * we log an error message. - * - * As a side effect, the message is shown upon `./gradlew clean build` or upon - * a newly created version of framework build etc. - */ - logger.debug( - "${e.message}${System.lineSeparator()}The proto artifact may be corrupted." - ) - } - } - } - result.addAll(sourceSets.main.proto.srcDirs) - return result -} - -/** - * Returns the root directory containing a Proto package. - * - * @param member the member File of the Proto package - * @param jarNames the full listing of the project JAR dependencies - */ -static File getProtoRoot(final File member, final Collection jarNames) { - File pkg = member - while (!jarNames.contains(jarName(pkg.parentFile))) { - pkg = pkg.parentFile - } - return pkg.parentFile -} - -/** - * Retrieves the name of the given folder trimmed by {@code ".jar"} suffix. - * - *

More formally, returns the name of the given {@link File} if the name does not contain - * {@code ".jar"} substring or the substring of the name containing the characters from the start - * to the {@code ".jar"} sequence (inclusively). - * - *

This transformation corresponds to finding the name of a JAR file which was extracted to - * the given directory with Gradle {@code zipTree()} API. - * - * @param jar the folder to get the JAR name for - */ -static JarFileName jarName(final File jar) { - final String unpackedJarInfix = ".jar" - final String name = jar.name - final int index = name.lastIndexOf(unpackedJarInfix) - if (index < 0) { - return null - } else { - return JarFileName.ofValue(name.substring(0, index + unpackedJarInfix.length())) - } -} - -/** - * Checks if the given abstract pathname represents either a {@code .proto} file, or a directory - * containing proto files. - * - *

If {@code candidate} is a directory, scans its children recursively. - * - * @param candidate the {@link File} to check - * @return {@code true} if the {@code candidate} {@linkplain #isProtoFile is a Protobuf file} or - * a directory containing at least one Protobuf file - */ -static boolean isProtoFileOrDir(final File candidate) { - final Deque filesToCheck = new LinkedList<>() - filesToCheck.push(candidate) - if (candidate.isDirectory() && candidate.list().length == 0) { - return false - } - while (!filesToCheck.isEmpty()) { - final File file = filesToCheck.pop() - if (isProtoFile(file)) { - return true - } - if (file.isDirectory()) { - file.listFiles().each { filesToCheck.push(it) } - } - } - return false -} - -/** - * Checks if the given file is a {@code .proto} file. - * - * @param file the file to check - * @return {@code true} if the {@code file} is a Protobuf file, {@code false} otherwise - */ -static boolean isProtoFile(final File file) { - return file.isFile() && file.name.endsWith(".proto") -} - -/** - * The filename of a JAR dependency of the project. - */ -final class JarFileName { - - final String value - - private JarFileName(final String value) { - this.value = value - } - - static JarFileName ofFile(final File jar) { - return new JarFileName(jar.name) - } - - static JarFileName ofValue(final String value) { - return new JarFileName(value) - } - - boolean equals(final o) { - if (this.is(o)) return true - if (getClass() != o.class) return false - - final JarFileName that = (JarFileName) o - - if (value != that.value) return false - - return true - } - - int hashCode() { - return (value != null ? value.hashCode() : 0) - } -} diff --git a/buildSrc/src/main/groovy/publish.gradle b/buildSrc/src/main/groovy/publish.gradle deleted file mode 100644 index db93ce2d..00000000 --- a/buildSrc/src/main/groovy/publish.gradle +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - Apply this script to add ability to publish the needed artifacts. - - To publish more artifacts for a certain project, add them to the archives configuration: - ``` - artifacts { - archives myCustomJarTask - } - ``` - */ - -println("`publish.gradle` script is deprecated. Please use the `Publish` plugin instead.") - -task publish { - doLast { - // Keep the task for dynamic generation while publishing. - } -} - -void dependPublish(final project) { - final credentialsTasks = getTasksByName("readPublishingCredentials", false) - project.getTasksByName("publish", false).each { final task -> - task.dependsOn credentialsTasks - } - publish.dependsOn project.getTasksByName("publish", false) -} - -projectsToPublish.each { - project(":$it") { final currentProject -> - apply plugin: 'maven-publish' - - logger.debug("Applying `maven-publish` plugin to ${currentProject.name}.") - - currentProject.artifacts { - archives sourceJar - archives testOutputJar - archives javadocJar - } - - final propertyName = "spinePrefix" - final ext = rootProject.ext - final boolean spinePrefix = ext.has(propertyName) ? ext.get(propertyName) : true - - // Artifact IDs are composed as "spine-". Example: - // - // "spine-mc-java" - // - // That helps to distinguish resulting JARs in the final assembly, such as WAR package. - // - final String artifactIdForPublishing = - spinePrefix ? - "spine-${currentProject.name}" : - currentProject.name - - final def publishingAction = { - currentProject.publishing { - publications { - mavenJava(MavenPublication) { - groupId = "${currentProject.group}" - artifactId = "${artifactIdForPublishing}" - version = "${currentProject.version}" - - from components.java - - artifacts = configurations.archives.allArtifacts - } - } - } - } - if (currentProject.state.executed) { - publishingAction() - } else { - currentProject.afterEvaluate(publishingAction) - } - - final boolean isSnapshots = currentProject.version.matches('.+[-\\.]SNAPSHOT([\\+\\.]\\d+)?') - - publishing { - repositories { - maven { - final String publicRepo = (isSnapshots - ? publishToRepository.snapshots - : publishToRepository.releases - ) - - // Special treatment for CloudRepo URL. - // Reading is performed via public repositories, and publishing via private - // ones that differ in the `/public` infix. - final urlToPublish = publicRepo.replace("/public", "") - - // Assign URL to the plugin property. - url = urlToPublish - - final creds = rootProject.publishToRepository.credentials(project) - - credentials { - username = creds.username - password = creds.password - } - } - } - } - - dependPublish(project) - } -} diff --git a/buildSrc/src/main/groovy/run-build.gradle b/buildSrc/src/main/groovy/run-build.gradle deleted file mode 100644 index fd245957..00000000 --- a/buildSrc/src/main/groovy/run-build.gradle +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * Apply this script if it is needed to execute {@code ./gradlew clean build} task - * from another project. - */ - -configure(project.rootProject) { - - ext { - - /** - * Executes {@code ./gradlew clean build} command, if there is a {@code 'clean'} task. - * Otherwise, executes {@code ./gradlew build}. - * - * @param directory the project root directory in which to execute the build - */ - runBuild = { final String directory -> - final boolean shouldClean = gradle.getTaskGraph().hasTask(':clean') - final def command = [] - final def runsOnWindows = org.gradle.internal.os.OperatingSystem.current().isWindows() - final def script = runsOnWindows ? "gradlew.bat" : "gradlew" - command.add("$rootDir/$script".toString()) - if (shouldClean) { - command.add('clean') - } - command.add('build') - command.add('--console=plain') - command.add('--debug') - command.add('--stacktrace') - - // Ensure build error output log. - // Since we're executing this task in another process, we redirect error output to - // the file under the `build` directory. - final File buildDir = new File(directory, "build") - if (!buildDir.exists()) { - buildDir.mkdir() - } - final File errorOut = new File(buildDir, 'error-out.txt') - final File debugOut = new File(buildDir, 'debug-out.txt') - - final def process = new ProcessBuilder() - .command(command) - .directory(file(directory)) - .redirectError(errorOut) - .redirectOutput(debugOut) - .start() - if (!process.waitFor(10, TimeUnit.MINUTES)) { - /* The timeout is set because of Gradle process execution under Windows. - See the following locations for details: - https://github.com/gradle/gradle/pull/8467#issuecomment-498374289 - https://github.com/gradle/gradle/issues/3987 - https://discuss.gradle.org/t/weirdness-in-gradle-exec-on-windows/13660/6 - */ - throw new GradleException("Build FAILED. See $errorOut for details.") - } - } - } -} - diff --git a/buildSrc/src/main/groovy/slow-tests.gradle b/buildSrc/src/main/groovy/slow-tests.gradle deleted file mode 100644 index 5b9797a7..00000000 --- a/buildSrc/src/main/groovy/slow-tests.gradle +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -println("`slow-tests.gradle` script is deprecated. " + - "Please use `TaskContainer.registerTestTasks()` instead.") - -final def slowTag = 'slow' // See io.spine.testing.SlowTest - -task fastTest(type: Test) { - description = 'Executes all JUnit tests but the ones tagged as "slow".' - group = 'Verification' - - useJUnitPlatform { - excludeTags slowTag - } -} - -task slowTest(type: Test) { - description = 'Executes JUnit tests tagged as "slow".' - group = 'Verification' - - useJUnitPlatform { - includeTags slowTag - } - shouldRunAfter fastTest -} diff --git a/buildSrc/src/main/groovy/test-output.gradle b/buildSrc/src/main/groovy/test-output.gradle deleted file mode 100644 index 4dc27512..00000000 --- a/buildSrc/src/main/groovy/test-output.gradle +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This plugin configured the test output as follows: - * - * - the standard streams of the tests execution are logged; - * - exceptions thrown in tests are logged; - * - after all the tests are executed, a short test summary is logged; the summary shown the number - * of tests and their results. - */ - -println("`test-output.gradle` script is deprecated. Please use `Test.configureLogging()` instead.") - -tasks.withType(Test).each { - it.testLogging { - showStandardStreams = true - showExceptions = true - showStackTraces = true - showCauses = true - exceptionFormat = 'full' - } - - it.afterSuite { final testDescriptor, final result -> - // If the descriptor has no parent, then it is the root test suite, i.e. it includes the - // info about all the run tests. - if (!testDescriptor.parent) { - logger.lifecycle( - """ - Test summary: - >> ${result.testCount} tests - >> ${result.successfulTestCount} succeeded - >> ${result.failedTestCount} failed - >> ${result.skippedTestCount} skipped - """ - ) - } - } -} diff --git a/buildSrc/src/main/groovy/update-gh-pages.gradle b/buildSrc/src/main/groovy/update-gh-pages.gradle deleted file mode 100644 index dcce53f9..00000000 --- a/buildSrc/src/main/groovy/update-gh-pages.gradle +++ /dev/null @@ -1,250 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This script publishes the generated documentation to the `spine.io` site via GitHub pages by - * pushing commits to the `gh-pages` branch. - * - * To configure docs publishing, apply this script to the repositories which should generate - * the doc: - * ``` - * apply(from: io.spine.gradle.internal.Scripts.updateGitHubPages) - * ``` - * After that, the `updateGitHubPages` task will be available for that project. - * - * By default, the non-internal Javadoc is included into the publication. It is possible to publish - * all the Javadoc regardless of API status by setting the value of the `allowInternalJavadoc` - * extension property to `true`. If needed, the publication may be extended to include other files. - * To do so, append more files/file collections to the `generatedDocs` extension property. - * - * In order to work, the script needs a `deploy_key_rsa` private RSA key file in the repository - * root. It is recommended to decrypt it in the repository an then decrypt it on CI upon - * a publication. Also, the script uses the `FORMAL_GIT_HUB_PAGES_AUTHOR` environmental variable to - * set the author email for the commits. The `gh-pages` branch itself should exist before the script - * is run. - */ - -import java.nio.file.Files - -ext { - javadocDir = Files.createTempDirectory("javadoc") - generatedDocs = files(javadocDir) - repositoryTempDir = Files.createTempDirectory("repoTemp") -} - -/** - * Prints a message telling those who read build logs about what happened. - */ -if (isSnapshot()) { - println("GitHub Pages update will be skipped since this project" + - " is a snapshot: `$project.name-$project.version`.") -} - -/** - * Tells whether this project is a snapshot. - */ -def isSnapshot() { - return project.version.toLowerCase().contains("snapshot") -} - -final String propertyName = 'allowInternalJavadoc' - -final boolean allowInternalJavadoc = ext.has(propertyName) && ext.get(propertyName) - -if (!allowInternalJavadoc) { - final def commonPath = io.spine.internal.gradle.Scripts.commonPath - apply from: "${rootDir}/${commonPath}/filter-internal-javadoc.gradle" -} - -/** - * Copies the Javadoc produced by a Javadoc task into a temporary folder. - * - * If `@Internal` Javadoc is allowed, uses the `:javadoc` task. Otherwise, uses - * the `:noInternalJavadoc` task. - * - * To allow `@Internal` Javadoc, set `ext.allowInternalJavadoc` property to `true` before applying - * this script to the project. - */ -task copyJavadoc(type: Copy) { - from allowInternalJavadoc ? tasks['javadoc'] : tasks['noInternalJavadoc'] - into javadocDir -} - -/** - * Updates the Javadoc documentation on the {@code gh-pages} Git branch. - * - *

Run this task when it is required to update the Javadoc e.g. when merging a branch into - * {@code master}. - */ -task updateGitHubPages { - description "Updates the Javadoc published to GitHub Pages website." - dependsOn copyJavadoc -} - -/** - * Prevents this task from execution in case this project is in its `SNAPSHOT` version. - */ -updateGitHubPages.onlyIf { - !isSnapshot() -} - -/** - * Waits for the given {@code process} to finish and retrieves the result of execution. - * - * @param process the process to execute - * @return a tuple of format: [exitCode:, - * out: , - * error: ] - */ -static def executeForResult(final Process process) { - final def outWriter = new StringWriter() - final def errWriter = new StringWriter() - process.consumeProcessOutputStream(outWriter) - process.consumeProcessErrorStream(errWriter) - final int exitCode = process.waitFor() - final def result = [out: outWriter.toString(), error: errWriter.toString(), exitCode: exitCode] - return result -} - -/** - * Executes the given terminal command and retrieves the command output. - * - *

{@link Runtime#exec(String[], String[], File) Executes} the given {@code String} array as - * a CLI command. If the execution is successful, returns the command output. Throws - * an {@link IllegalStateException} otherwise. - * - * @param baseDir the directory of the command execution - * @param command the command to execute - * @return the command line output - * @throws IllegalStateException upon an execution error - */ -static String execute(final File baseDir, final String... command) { - final Runtime runtime = Runtime.getRuntime() - final Process proc = runtime.exec(command, /*env=*/ (String[]) null, baseDir) - final def result = executeForResult(proc) - if (result.exitCode == 0) { - return result.out - } else { - final String errorMsg = "Command `$command` finished with exit code $result.exitCode:" + - " ${System.lineSeparator()}${result.error}" + - " ${System.lineSeparator()}${result.out}." - throw new IllegalStateException(errorMsg) - } -} - -/** - * Executes the given CLI command and retrieves the command output. - * - *

This is a convenience method. Calling this method is equivalent to calling - * {@code execute(project.rootDir, command)}. - */ -String execute(final String... command) { - return execute(rootDir, command) -} - -/** - * The GitHub deploy key used to push the doc changes to the {@code gh-pages} branch. - */ -final File gitHubAccessKey = "$rootDir/deploy_key_rsa" as File - -updateGitHubPages.doLast { - if (!gitHubAccessKey.exists()) { - throw new GradleException("File $gitHubAccessKey does not exist. It should be encrypted" + - " in the repository and decrypted on CI.") - } - - final def GH_PAGES_BRANCH = "gh-pages" - - final String repoSlug = System.getenv('REPO_SLUG') - if (repoSlug == null || repoSlug.isEmpty()) { - throw new GradleException('`REPO_SLUG` environmental variable is not set.') - } - - /** - * The GitHub URL to the project repository. - * - *

A CI instance comes with an RSA key. However, of course, the default key has no - * privileges in Spine repositories. Thus, we add our own RSA key — `deploy_rsa_key`. It must - * have write rights in the associated repository. Also, we don't want that key to be used for - * anything else but GitHub Pages publishing. Thus, we configure the SSH agent to use - * the `deploy_rsa_key` only for specific references, namely in `github.com-publish`. - */ - final String GIT_HOST = "git@github.com-publish:${repoSlug}.git" - - final def repoBaseDir = "$repositoryTempDir/$GH_PAGES_BRANCH" as File - final def docDirPostfix = "reference/$project.name" - final def docDir = "$repoBaseDir/$docDirPostfix" as File - final def versionedDocDir = "$docDir/v/$project.version" as File - - // Create SSH config file to allow pushing commits to the repository. - final File sshConfigFile = file("${System.getProperty("user.home")}/.ssh/config") - if (!sshConfigFile.exists()) { - final File parentDir = sshConfigFile.getCanonicalFile().getParentFile() - parentDir.mkdirs() - sshConfigFile.createNewFile() - } - sshConfigFile << """ -Host github.com-publish - HostName github.com - User git - IdentityFile $gitHubAccessKey.absolutePath -""" - execute "$rootDir/config/scripts/register-ssh-key.sh", gitHubAccessKey.absolutePath - - execute 'git', 'clone', GIT_HOST, "$repoBaseDir" - execute repoBaseDir, "git", "checkout", GH_PAGES_BRANCH - logger.debug("Updating generated documentation on GitHub Pages in directory `$docDir`.") - docDir.mkdir() - - copy { - from generatedDocs - into docDir - } - - logger.debug("Storing the new version of documentation in directory `$versionedDocDir`.") - versionedDocDir.mkdir() - copy { - from generatedDocs - into versionedDocDir - } - - execute repoBaseDir, "git", "add", docDirPostfix - - /** - * Publish the changes under "UpdateGitHubPages Plugin" Git user name and email stored in - * "FORMAL_GIT_HUB_PAGES_AUTHOR" env variable. - * - *

When changing the value of "FORMAL_GIT_HUB_PAGES_AUTHOR", also change the SSH private - * (encrypted `deploy_key_rsa`) and public ("GitHub Pages publisher (Travis CI)" on GitHub) - * keys. - */ - execute repoBaseDir, "git", "config", "user.name", "\"UpdateGitHubPages Plugin\"" - execute repoBaseDir, "git", "config", "user.email", System.env.FORMAL_GIT_HUB_PAGES_AUTHOR - - execute repoBaseDir, "git", "commit", "--allow-empty", "--message=\"Update Javadoc for module $project.name as for version $project.version\"" - execute repoBaseDir, "git", "push" - logger.debug("Updated Javadoc on GitHub Pages in directory `$docDir` successfully.") -} diff --git a/buildSrc/src/main/kotlin/BuildExtensions.kt b/buildSrc/src/main/kotlin/BuildExtensions.kt new file mode 100644 index 00000000..9e51bca3 --- /dev/null +++ b/buildSrc/src/main/kotlin/BuildExtensions.kt @@ -0,0 +1,178 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Redistribution and use in source and/or binary forms, with or without + * modification, must retain the above copyright notice and the following + * disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +@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.ProtoData +import io.spine.internal.dependency.Protobuf +import io.spine.internal.dependency.Spine +import io.spine.internal.gradle.standardToSpineSdk +import org.gradle.api.Project +import org.gradle.api.Task +import org.gradle.kotlin.dsl.ScriptHandlerScope +import org.gradle.plugin.use.PluginDependenciesSpec +import org.gradle.plugin.use.PluginDependencySpec + +/** + * Applies [standard][standardToSpineSdk] repositories to this `buildscript`. + */ +fun ScriptHandlerScope.standardSpineSdkRepositories() { + repositories.standardToSpineSdk() +} + +/** + * Provides shortcuts to reference our dependency objects. + * + * Dependency objects cannot be used under `plugins` section because `io` is a value + * declared in auto-generated `org.gradle.kotlin.dsl.PluginAccessors.kt` file. + * It conflicts with our own declarations. + * + * In such cases, a shortcut to apply a plugin can be created: + * + * ``` + * val PluginDependenciesSpec.`gradle-doctor`: PluginDependencySpec + * get() = id(GradleDoctor.pluginId).version(GradleDoctor.version) + * ``` + * + * But for some plugins, it's impossible to apply them directly to a project. + * For example, when a plugin is not published to Gradle Portal, it can only be + * applied with buildscript's classpath. Thus, it's needed to leave some freedom + * upon how to apply them. In such cases, just a shortcut to a dependency object + * can be declared, without applying of the plugin in-place. + */ +private const val ABOUT_DEPENDENCY_EXTENSIONS = "" + +/** + * Shortcut to [Spine.McJava] dependency object. + * + * This plugin is not published to Gradle Portal and cannot be applied directly to a project. + * Firstly, it should be put to buildscript's classpath and then applied by ID only. + */ +val PluginDependenciesSpec.mcJava: Spine.McJava + get() = Spine.McJava + +/** + * Shortcut to [ProtoData] dependency object. + * + * This plugin is in Gradle Portal. But when used in pair with [mcJava], it cannot be applied + * directly to a project. It is so, because [mcJava] uses [protoData] as its dependency. + * And buildscript's classpath ends up with both of them. + */ +val PluginDependenciesSpec.protoData: ProtoData + get() = ProtoData + +/** + * Provides shortcuts for applying plugins from our dependency objects. + * + * Dependency objects cannot be used under `plugins` section because `io` is a value + * declared in auto-generated `org.gradle.kotlin.dsl.PluginAccessors.kt` file. + * It conflicts with our own declarations. + * + * Declaring of top-level shortcuts eliminates need in applying plugins + * using fully-qualified name of dependency objects. + * + * It is still possible to apply a plugin with a custom version, if needed. + * Just declare a version again on the returned [PluginDependencySpec]. + * + * For example: + * + * ``` + * plugins { + * protobuf version("0.8.19-custom") + * } + * ``` + */ +private const val ABOUT_PLUGIN_ACCESSORS = "" + +val PluginDependenciesSpec.errorprone: PluginDependencySpec + get() = id(ErrorProne.GradlePlugin.id) + +val PluginDependenciesSpec.protobuf: PluginDependencySpec + get() = id(Protobuf.GradlePlugin.id) + +val PluginDependenciesSpec.`gradle-doctor`: PluginDependencySpec + get() = id(GradleDoctor.pluginId).version(GradleDoctor.version) + +val PluginDependenciesSpec.kotest: PluginDependencySpec + get() = Kotest.MultiplatformGradlePlugin.let { + return id(it.id).version(it.version) + } + +val PluginDependenciesSpec.kover: PluginDependencySpec + get() = id(Kover.id).version(Kover.version) + +/** + * Configures the dependencies between third-party Gradle tasks + * and those defined via ProtoData and Spine Model Compiler. + * + * It is required in order to avoid warnings in build logs, detecting the undeclared + * usage of Spine-specific task output by other tasks, + * e.g. the output of `launchProtoData` is used by `compileKotlin`. + */ +@Suppress("unused") +fun Project.configureTaskDependencies() { + + /** + * Creates a dependency between the Gradle task of *this* name + * onto the task with `taskName`. + * + * If either of tasks does not exist in the enclosing `Project`, + * this method does nothing. + * + * This extension is kept local to `configureTaskDependencies` extension + * to prevent its direct usage from outside. + */ + fun String.dependOn(taskName: String) { + val whoDepends = this + val dependOntoTask: Task? = tasks.findByName(taskName) + dependOntoTask?.let { + tasks.findByName(whoDepends)?.dependsOn(it) + } + } + + afterEvaluate { + val launchProtoData = "launchProtoData" + val launchTestProtoData = "launchTestProtoData" + val generateProto = "generateProto" + val createVersionFile = "createVersionFile" + "compileKotlin".dependOn(launchProtoData) + "compileTestKotlin".dependOn(launchTestProtoData) + val sourcesJar = "sourcesJar" + sourcesJar.dependOn(generateProto) + sourcesJar.dependOn(launchProtoData) + sourcesJar.dependOn(createVersionFile) + sourcesJar.dependOn("prepareProtocConfigVersions") + val dokkaHtml = "dokkaHtml" + dokkaHtml.dependOn(generateProto) + dokkaHtml.dependOn(launchProtoData) + "dokkaJavadoc".dependOn(launchProtoData) + "publishPluginJar".dependOn(createVersionFile) + } +} diff --git a/buildSrc/src/main/kotlin/force-jacoco.gradle.kts b/buildSrc/src/main/kotlin/BuildSettings.kt similarity index 75% rename from buildSrc/src/main/kotlin/force-jacoco.gradle.kts rename to buildSrc/src/main/kotlin/BuildSettings.kt index 310f4243..1adbb92b 100644 --- a/buildSrc/src/main/kotlin/force-jacoco.gradle.kts +++ b/buildSrc/src/main/kotlin/BuildSettings.kt @@ -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. @@ -24,16 +24,13 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -// TODO:2021-07-05:dmytro.dashenkov: https://github.com/SpineEventEngine/config/issues/214. +import org.gradle.jvm.toolchain.JavaLanguageVersion -allprojects { - configurations.all { - resolutionStrategy { - eachDependency { - if (requested.group == "org.jacoco") { - useVersion("0.8.7") - } - } - } - } +/** + * This object provides high-level constants, like version of JVM, to be used + * throughout the project. + */ +object BuildSettings { + private const val JVM_VERSION = 11 + val javaVersion: JavaLanguageVersion = JavaLanguageVersion.of(JVM_VERSION) } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/DependencyResolution.kt b/buildSrc/src/main/kotlin/DependencyResolution.kt similarity index 79% rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/DependencyResolution.kt rename to buildSrc/src/main/kotlin/DependencyResolution.kt index 168c0798..5f2c6750 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/DependencyResolution.kt +++ b/buildSrc/src/main/kotlin/DependencyResolution.kt @@ -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. @@ -24,32 +24,37 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package io.spine.internal.gradle - 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.CommonsLogging +import io.spine.internal.dependency.Dokka import io.spine.internal.dependency.ErrorProne 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 import org.gradle.api.artifacts.ConfigurationContainer import org.gradle.api.artifacts.ResolutionStrategy -import org.gradle.api.artifacts.dsl.RepositoryHandler /** * The function to be used in `buildscript` when a fully-qualified call must be made. @@ -81,19 +86,20 @@ private fun ResolutionStrategy.forceProductionDependencies() { AutoCommon.lib, AutoService.annotations, CheckerFramework.annotations, + 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 ) } @@ -101,10 +107,12 @@ private fun ResolutionStrategy.forceTestDependencies() { force( Guava.testLib, JUnit.api, - JUnit.platformCommons, - JUnit.platformLauncher, + JUnit.bom, + JUnit.Platform.commons, + JUnit.Platform.launcher, JUnit.legacy, - Truth.libs + Truth.libs, + Kotest.assertions, ) } @@ -113,17 +121,32 @@ private fun ResolutionStrategy.forceTestDependencies() { */ private fun ResolutionStrategy.forceTransitiveDependencies() { force( + Asm.lib, AutoValue.annotations, + CommonsCli.lib, + CommonsLogging.lib, Gson.lib, + Hamcrest.core, J2ObjC.annotations, - Plexus.utils, + JUnit.Platform.engine, + JUnit.Platform.suiteApi, + JUnit.runner, + Jackson.annotations, + Jackson.bom, + Jackson.core, + Jackson.databind, + Jackson.dataformatXml, + Jackson.dataformatYaml, + Jackson.moduleKotlin, + JavaDiffUtils.lib, + Kotlin.jetbrainsAnnotations, Okio.lib, - CommonsCli.lib, - CheckerFramework.compatQual, - CommonsLogging.lib + OpenTest4J.lib, + Plexus.utils, ) } +@Suppress("unused") fun NamedDomainObjectContainer.excludeProtobufLite() { fun excludeProtoLite(configurationName: String) { @@ -138,30 +161,3 @@ fun NamedDomainObjectContainer.excludeProtobufLite() { excludeProtoLite("runtimeOnly") excludeProtoLite("testRuntimeOnly") } - -@Suppress("unused") -object DependencyResolution { - @Deprecated( - "Please use `configurations.forceVersions()`.", - ReplaceWith("configurations.forceVersions()") - ) - fun forceConfiguration(configurations: ConfigurationContainer) { - configurations.forceVersions() - } - - @Deprecated( - "Please use `configurations.excludeProtobufLite()`.", - ReplaceWith("configurations.excludeProtobufLite()") - ) - fun excludeProtobufLite(configurations: ConfigurationContainer) { - configurations.excludeProtobufLite() - } - - @Deprecated( - "Please use `applyStandard(repositories)` instead.", - replaceWith = ReplaceWith("applyStandard(repositories)") - ) - fun defaultRepositories(repositories: RepositoryHandler) { - repositories.applyStandard() - } -} diff --git a/buildSrc/src/main/kotlin/DokkaExts.kt b/buildSrc/src/main/kotlin/DokkaExts.kt new file mode 100644 index 00000000..9756dc3b --- /dev/null +++ b/buildSrc/src/main/kotlin/DokkaExts.kt @@ -0,0 +1,184 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Redistribution and use in source and/or binary forms, with or without + * modification, must retain the above copyright notice and the following + * disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +import io.spine.internal.dependency.Dokka +import io.spine.internal.gradle.publish.getOrCreate +import java.io.File +import java.time.LocalDate +import org.gradle.api.Project +import org.gradle.api.artifacts.Dependency +import org.gradle.api.artifacts.dsl.DependencyHandler +import org.gradle.api.file.FileCollection +import org.gradle.api.tasks.TaskContainer +import org.gradle.api.tasks.TaskProvider +import org.gradle.api.tasks.bundling.Jar +import org.gradle.configurationcache.extensions.capitalized +import org.gradle.kotlin.dsl.DependencyHandlerScope +import org.jetbrains.dokka.DokkaConfiguration +import org.jetbrains.dokka.base.DokkaBase +import org.jetbrains.dokka.base.DokkaBaseConfiguration +import org.jetbrains.dokka.gradle.DokkaTask +import org.jetbrains.dokka.gradle.GradleDokkaSourceSetBuilder + +/** + * To generate the documentation as seen from Java perspective, the `kotlin-as-java` + * plugin was added to the Dokka classpath. + * + * @see + * Dokka output formats + */ +fun DependencyHandlerScope.useDokkaForKotlinAsJava() { + dokkaPlugin(Dokka.KotlinAsJavaPlugin.lib) +} + +/** + * To exclude pieces of code annotated with `@Internal` from the documentation + * a custom plugin is added to the Dokka's classpath. + * + * @see + * Custom Dokka Plugins + */ +fun DependencyHandlerScope.useDokkaWithSpineExtensions() { + dokkaPlugin(Dokka.SpineExtensions.lib) +} + +private fun DependencyHandler.dokkaPlugin(dependencyNotation: Any): Dependency? = + add("dokkaPlugin", dependencyNotation) + +private fun Project.dokkaOutput(language: String): File = + buildDir.resolve("docs/dokka${language.capitalized()}") + +private fun Project.dokkaConfigFile(file: String): File { + val dokkaConfDir = project.rootDir.resolve("buildSrc/src/main/resources/dokka") + return dokkaConfDir.resolve(file) +} + +private fun DokkaTask.configureFor(language: String) { + dokkaSourceSets.configureEach { + /** + * Configures links to the external Java documentation. + */ + jdkVersion.set(BuildSettings.javaVersion.asInt()) + + skipEmptyPackages.set(true) + + documentedVisibilities.set( + setOf( + DokkaConfiguration.Visibility.PUBLIC, + DokkaConfiguration.Visibility.PROTECTED + ) + ) + } + + outputDirectory.set(project.dokkaOutput(language)) + + /** + * Dokka Base plugin allows to set a few properties to customize the output: + * + * - `customStyleSheets` property to which CSS files are passed overriding + * styles generated by Dokka; + * - `customAssets` property to provide resources. The image with the name + * "logo-icon.svg" is passed to override the default logo used by Dokka; + * - `separateInheritedMembers` when set to `true`, creates a separate tab in + * type-documentation for inherited members. + * + * @see + * Dokka modifying frontend assets + */ + pluginConfiguration { + customStyleSheets = listOf(project.dokkaConfigFile("styles/custom-styles.css")) + customAssets = listOf(project.dokkaConfigFile("assets/logo-icon.svg")) + separateInheritedMembers = true + footerMessage = "Copyright ${LocalDate.now().year}, TeamDev" + } +} + +/** + * Configures this [DokkaTask] to accept only Kotlin files. + */ +fun DokkaTask.configureForKotlin() { + configureFor("kotlin") +} + +/** + * Configures this [DokkaTask] to accept only Java files. + */ +fun DokkaTask.configureForJava() { + configureFor("java") +} + +/** + * Finds the `dokkaHtml` Gradle task. + */ +fun TaskContainer.dokkaHtmlTask(): DokkaTask? = this.findByName("dokkaHtml") as DokkaTask? + +/** + * Returns only Java source roots out of all present in the source set. + * + * It is a helper method for generating documentation by Dokka only for Java code. + * It is helpful when both Java and Kotlin source files are present in a source set. + * Dokka can properly generate documentation for either Kotlin or Java depending on + * the configuration, but not both. + */ +internal fun GradleDokkaSourceSetBuilder.onlyJavaSources(): FileCollection { + return sourceRoots.filter(File::isJavaSourceDirectory) +} + +private fun File.isJavaSourceDirectory(): Boolean { + return isDirectory && name == "java" +} + +/** + * Locates or creates `dokkaKotlinJar` task in this [Project]. + * + * The output of this task is a `jar` archive. The archive contains the Dokka output, generated upon + * Kotlin sources from `main` source set. Requires Dokka to be configured in the target project by + * applying `dokka-for-kotlin` plugin. + */ +fun Project.dokkaKotlinJar(): TaskProvider = tasks.getOrCreate("dokkaKotlinJar") { + archiveClassifier.set("dokka") + from(files(dokkaOutput("kotlin"))) + + tasks.dokkaHtmlTask()?.let{ dokkaTask -> + this@getOrCreate.dependsOn(dokkaTask) + } +} + +/** + * Locates or creates `dokkaJavaJar` task in this [Project]. + * + * The output of this task is a `jar` archive. The archive contains the Dokka output, generated upon + * Kotlin sources from `main` source set. Requires Dokka to be configured in the target project by + * applying `dokka-for-java` and/or `dokka-for-kotlin` script plugin. + */ +fun Project.dokkaJavaJar(): TaskProvider = tasks.getOrCreate("dokkaJavaJar") { + archiveClassifier.set("dokka-java") + from(files(dokkaOutput("java"))) + + tasks.dokkaHtmlTask()?.let{ dokkaTask -> + this@getOrCreate.dependsOn(dokkaTask) + } +} diff --git a/buildSrc/src/main/kotlin/compile-protobuf.gradle.kts b/buildSrc/src/main/kotlin/compile-protobuf.gradle.kts new file mode 100644 index 00000000..baffe251 --- /dev/null +++ b/buildSrc/src/main/kotlin/compile-protobuf.gradle.kts @@ -0,0 +1,45 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Redistribution and use in source and/or binary forms, with or without + * modification, must retain the above copyright notice and the following + * disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +import io.spine.internal.dependency.Protobuf +import io.spine.internal.gradle.protobuf.setup + +plugins { + id("java-library") + id("com.google.protobuf") +} + + +// For generating test fixtures. See `src/test/proto`. +protobuf { + configurations.excludeProtobufLite() + protoc { + artifact = Protobuf.compiler + } + generateProtoTasks.all().configureEach { + setup() + } +} diff --git a/buildSrc/src/main/kotlin/config-tester.gradle.kts b/buildSrc/src/main/kotlin/config-tester.gradle.kts new file mode 100644 index 00000000..14a236c6 --- /dev/null +++ b/buildSrc/src/main/kotlin/config-tester.gradle.kts @@ -0,0 +1,57 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Redistribution and use in source and/or binary forms, with or without + * modification, must retain the above copyright notice and the following + * disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +import io.spine.internal.gradle.ConfigTester +import io.spine.internal.gradle.SpineRepos +import io.spine.internal.gradle.cleanFolder +import java.nio.file.Path +import java.nio.file.Paths + +// A reference to `config` to use along with the `ConfigTester`. +val config: Path = Paths.get("./") + +// A temp folder to use to check out the sources of other repositories with the `ConfigTester`. +val tempFolder = File("./tmp") + +// Creates a Gradle task which checks out and builds the selected Spine repositories +// with the local version of `config` and `config/buildSrc`. +ConfigTester(config, tasks, tempFolder) + .addRepo(SpineRepos.baseTypes) // Builds `base-types` at `master`. + .addRepo(SpineRepos.base) // Builds `base` at `master`. + .addRepo(SpineRepos.coreJava) // Builds `core-java` at `master`. + + // This is how one builds a specific branch of some repository: + // .addRepo(SpineRepos.coreJava, Branch("grpc-concurrency-fixes")) + + // Register the produced task under the selected name to invoke manually upon need. + .registerUnder("buildDependants") + +// Cleans the temp folder used to check out the sources from Git. +tasks.register("clean") { + doLast { + cleanFolder(tempFolder) + } +} diff --git a/buildSrc/src/main/kotlin/detekt-code-analysis.gradle.kts b/buildSrc/src/main/kotlin/detekt-code-analysis.gradle.kts new file mode 100644 index 00000000..89151fb0 --- /dev/null +++ b/buildSrc/src/main/kotlin/detekt-code-analysis.gradle.kts @@ -0,0 +1,85 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Redistribution and use in source and/or binary forms, with or without + * modification, must retain the above copyright notice and the following + * disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +import io.gitlab.arturbosch.detekt.Detekt + +/** + * This script-plugin sets up Kotlin code analyzing with Detekt. + * + * After applying, Detekt is configured to use `${rootDir}/config/quality/detekt-config.yml` file. + * Projects can append their own config files to override some parts of the default one or drop + * it at all in a favor of their own one. + * + * An example of appending a custom config file to the default one: + * + * ``` + * detekt { + * config.from("config/detekt-custom-config.yml") + * } + * ``` + * + * To totally substitute it, just overwrite the corresponding property: + * + * ``` + * detekt { + * config = files("config/detekt-custom-config.yml") + * } + * ``` + * + * Also, it's possible to suppress Detekt findings using [baseline](https://detekt.dev/docs/introduction/baseline/) + * file instead of suppressions in source code. + * + * An example of passing a baseline file: + * + * ``` + * detekt { + * baseline = file("config/detekt-baseline.yml") + * } + * ``` + */ +@Suppress("unused") +private val about = "" + +plugins { + id("io.gitlab.arturbosch.detekt") +} + +detekt { + buildUponDefaultConfig = true + config.from(files("${rootDir}/config/quality/detekt-config.yml")) +} + +tasks { + withType().configureEach { + reports { + html.required.set(true) // Only HTML report is generated. + xml.required.set(false) + txt.required.set(false) + sarif.required.set(false) + md.required.set(false) + } + } +} diff --git a/buildSrc/src/main/kotlin/dokka-for-java.gradle.kts b/buildSrc/src/main/kotlin/dokka-for-java.gradle.kts new file mode 100644 index 00000000..0e5087a1 --- /dev/null +++ b/buildSrc/src/main/kotlin/dokka-for-java.gradle.kts @@ -0,0 +1,40 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Redistribution and use in source and/or binary forms, with or without + * modification, must retain the above copyright notice and the following + * disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +import org.jetbrains.dokka.gradle.DokkaTask + +plugins { + id("org.jetbrains.dokka") // Cannot use `Dokka` dependency object here yet. +} + +dependencies { + useDokkaForKotlinAsJava() + useDokkaWithSpineExtensions() +} + +tasks.withType().configureEach { + configureForJava() +} diff --git a/buildSrc/src/main/kotlin/dokka-for-kotlin.gradle.kts b/buildSrc/src/main/kotlin/dokka-for-kotlin.gradle.kts new file mode 100644 index 00000000..0b12a0dd --- /dev/null +++ b/buildSrc/src/main/kotlin/dokka-for-kotlin.gradle.kts @@ -0,0 +1,39 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Redistribution and use in source and/or binary forms, with or without + * modification, must retain the above copyright notice and the following + * disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +import org.jetbrains.dokka.gradle.DokkaTask + +plugins { + id("org.jetbrains.dokka") // Cannot use `Dokka` dependency object here yet. +} + +dependencies { + useDokkaWithSpineExtensions() +} + +tasks.withType().configureEach { + configureForKotlin() +} diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/AnimalSniffer.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/AnimalSniffer.kt index 068ae59c..09b2403c 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/AnimalSniffer.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/AnimalSniffer.kt @@ -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. @@ -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}" diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/ApacheHttp.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/ApacheHttp.kt index dd518a0c..1eff6a0b 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/ApacheHttp.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/ApacheHttp.kt @@ -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. @@ -26,7 +26,7 @@ package io.spine.internal.dependency -@Suppress("unused") +@Suppress("unused", "ConstPropertyName") object ApacheHttp { // https://hc.apache.org/downloads.cgi diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/AppEngine.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/AppEngine.kt index 0d7fee39..be15a8cf 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/AppEngine.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/AppEngine.kt @@ -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. @@ -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" diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/AutoCommon.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Asm.kt similarity index 85% rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/AutoCommon.kt rename to buildSrc/src/main/kotlin/io/spine/internal/dependency/Asm.kt index 4053ef58..82550efe 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/AutoCommon.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Asm.kt @@ -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. @@ -26,8 +26,9 @@ package io.spine.internal.dependency -// https://github.com/google/auto -object AutoCommon { - private const val version = "1.2.1" - const val lib = "com.google.auto:auto-common:${version}" +// https://asm.ow2.io/ +@Suppress("unused", "ConstPropertyName") +object Asm { + private const val version = "9.2" + const val lib = "org.ow2.asm:asm:$version" } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/AssertK.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/AssertK.kt index 8d42b619..b23ccabd 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/AssertK.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/AssertK.kt @@ -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. @@ -31,8 +31,8 @@ package io.spine.internal.dependency * * [AssertK](https://github.com/willowtreeapps/assertk) */ -@Suppress("unused") +@Suppress("unused", "ConstPropertyName") object AssertK { - private const val version = "0.25" + private const val version = "0.26.1" const val libJvm = "com.willowtreeapps.assertk:assertk-jvm:${version}" } diff --git a/buildSrc/src/main/groovy/test-artifacts.gradle b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Auto.kt similarity index 61% rename from buildSrc/src/main/groovy/test-artifacts.gradle rename to buildSrc/src/main/kotlin/io/spine/internal/dependency/Auto.kt index 06a5e055..21674394 100644 --- a/buildSrc/src/main/groovy/test-artifacts.gradle +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Auto.kt @@ -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. @@ -24,22 +24,26 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -// Apply this script if it is needed to use test classes of the current project in other projects. -// The dependency looks like this: -// -// testCompile project(path: ":projectWithTests", configuration: 'testArtifacts') -// +@file:Suppress("unused", "ConstPropertyName") -println("`test-artifacts.gradle` script is deprecated. " + - "Please use the `Project.exposeTestArtifacts()` utility instead.") +package io.spine.internal.dependency -configurations { - testArtifacts.extendsFrom testRuntime +// https://github.com/google/auto +object AutoCommon { + private const val version = "1.2.2" + const val lib = "com.google.auto:auto-common:${version}" } -task testJar(type: Jar) { - classifier "test" - from sourceSets.test.output + +// https://github.com/google/auto +object AutoService { + private const val version = "1.1.1" + const val annotations = "com.google.auto.service:auto-service-annotations:${version}" + @Suppress("unused") + const val processor = "com.google.auto.service:auto-service:${version}" } -artifacts { - testArtifacts testJar + +// https://github.com/google/auto +object AutoValue { + private const val version = "1.10.2" + const val annotations = "com.google.auto.value:auto-value-annotations:${version}" } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/BouncyCastle.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/BouncyCastle.kt index c0567edd..445d57e5 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/BouncyCastle.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/BouncyCastle.kt @@ -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. @@ -27,7 +27,7 @@ package io.spine.internal.dependency // https://www.bouncycastle.org/java.html -@Suppress("unused") +@Suppress("unused", "ConstPropertyName") object BouncyCastle { const val libPkcsJdk15 = "org.bouncycastle:bcpkix-jdk15on:1.68" } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/CheckStyle.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/CheckStyle.kt index 1e3effba..e9800161 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/CheckStyle.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/CheckStyle.kt @@ -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. @@ -28,7 +28,7 @@ package io.spine.internal.dependency // https://checkstyle.sourceforge.io/ // See `io.spine.internal.gradle.checkstyle.CheckStyleConfig`. -@Suppress("unused") +@Suppress("unused", "ConstPropertyName") object CheckStyle { - const val version = "10.1" + const val version = "10.3.4" } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/CheckerFramework.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/CheckerFramework.kt index 75cc67f2..f355a0fa 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/CheckerFramework.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/CheckerFramework.kt @@ -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. @@ -27,18 +27,13 @@ package io.spine.internal.dependency // https://checkerframework.org/ +@Suppress("unused", "ConstPropertyName") object CheckerFramework { - private const val version = "3.21.3" + private const val version = "3.36.0" const val annotations = "org.checkerframework:checker-qual:${version}" @Suppress("unused") val dataflow = listOf( "org.checkerframework:dataflow:${version}", "org.checkerframework:javacutil:${version}" ) - /** - * This is discontinued artifact, which we do not use directly. - * This is a transitive dependency for us, which we force in - * [DependencyResolution.forceConfiguration] - */ - const val compatQual = "org.checkerframework:checker-compat-qual:2.5.5" } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/CommonsCli.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/CommonsCli.kt index 79a4036c..5d8c0929 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/CommonsCli.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/CommonsCli.kt @@ -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. @@ -28,10 +28,11 @@ package io.spine.internal.dependency /** * Commons CLI is a transitive dependency which we don't use directly. - * We `force` it in [DependencyResolution.forceConfiguration]. + * We `force` it in [forceVersions]. * * [Commons CLI](https://commons.apache.org/proper/commons-cli/) */ +@Suppress("unused", "ConstPropertyName") object CommonsCli { private const val version = "1.5.0" const val lib = "commons-cli:commons-cli:${version}" diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/CommonsCodec.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/CommonsCodec.kt index 97dbed87..641c9ee0 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/CommonsCodec.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/CommonsCodec.kt @@ -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. @@ -27,8 +27,8 @@ package io.spine.internal.dependency // https://commons.apache.org/proper/commons-codec/changes-report.html -@Suppress("unused") +@Suppress("unused", "ConstPropertyName") object CommonsCodec { - private const val version = "1.15" + private const val version = "1.16.0" const val lib = "commons-codec:commons-codec:$version" } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/CommonsLogging.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/CommonsLogging.kt index e9d148f1..c63890fc 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/CommonsLogging.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/CommonsLogging.kt @@ -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. @@ -30,6 +30,7 @@ package io.spine.internal.dependency * [Commons Logging](https://commons.apache.org/proper/commons-logging/) is a transitive * dependency which we don't use directly. This object is used for forcing the version. */ +@Suppress("unused", "ConstPropertyName") object CommonsLogging { // https://commons.apache.org/proper/commons-logging/ private const val version = "1.2" diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Dokka.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Dokka.kt index af26ad74..4d732398 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Dokka.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Dokka.kt @@ -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. @@ -27,8 +27,58 @@ package io.spine.internal.dependency // https://github.com/Kotlin/dokka -@Suppress("unused") +@Suppress("unused", "ConstPropertyName") object Dokka { - const val version = "1.6.10" - const val pluginId = "org.jetbrains.dokka" + private const val group = "org.jetbrains.dokka" + + /** + * When changing the version, also change the version used in the + * `buildSrc/build.gradle.kts`. + */ + const val version = "1.8.10" + + object GradlePlugin { + const val id = "org.jetbrains.dokka" + + /** + * The version of this plugin is already specified in `buildSrc/build.gradle.kts` + * file. Thus, when applying the plugin in project's build files, only the [id] + * should be used. + */ + const val lib = "${group}:dokka-gradle-plugin:${version}" + } + + object BasePlugin { + const val lib = "${group}:dokka-base:${version}" + } + + const val analysis = "org.jetbrains.dokka:dokka-analysis:${version}" + + object CorePlugin { + const val lib = "${group}:dokka-core:${version}" + } + + /** + * To generate the documentation as seen from Java perspective use this plugin. + * + * @see + * Dokka output formats + */ + object KotlinAsJavaPlugin { + const val lib = "${group}:kotlin-as-java-plugin:${version}" + } + + /** + * Custom Dokka plugins developed for Spine-specific needs like excluding by + * `@Internal` annotation. + * + * @see + * Custom Dokka Plugins + */ + object SpineExtensions { + private const val group = "io.spine.tools" + + const val version = "2.0.0-SNAPSHOT.4" + const val lib = "${group}:spine-dokka-extensions:${version}" + } } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/ErrorProne.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/ErrorProne.kt index ca73fedc..ac1de17e 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/ErrorProne.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/ErrorProne.kt @@ -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. @@ -27,10 +27,10 @@ package io.spine.internal.dependency // https://errorprone.info/ -@Suppress("unused") +@Suppress("unused", "ConstPropertyName") object ErrorProne { // https://github.com/google/error-prone - private const val version = "2.10.0" + private const val version = "2.20.0" // https://github.com/tbroyer/gradle-errorprone-plugin/blob/v0.8/build.gradle.kts private const val javacPluginVersion = "9+181-r4173-1" @@ -53,7 +53,7 @@ object ErrorProne { * When the plugin is used as a library (e.g. in tools), its version and the library * artifacts are of importance. */ - const val version = "2.0.2" + const val version = "3.1.0" const val lib = "net.ltgt.gradle:gradle-errorprone-plugin:${version}" } } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/ExecForkPlugin.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/ExecForkPlugin.kt index 97f55936..58cee4c3 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/ExecForkPlugin.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/ExecForkPlugin.kt @@ -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. @@ -26,13 +26,10 @@ package io.spine.internal.dependency +// https://github.com/psxpaul/gradle-execfork-plugin object ExecForkPlugin { - const val version = "0.1.16" + const val version = "0.2.2" - // The name of the GitHub repository where the plugin is published using GitHub Packages. - const val repository = "gradle-execfork-plugin" - - // The argument to be passed to the `classpath()` clause in `buildscript` for using the plugin. - const val classpath = "io.spine.tools:gradle-execfork-plugin:$version" + const val id = "com.github.psxpaul.execfork" } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/FindBugs.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/FindBugs.kt index 52b05f75..42b6683e 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/FindBugs.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/FindBugs.kt @@ -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. @@ -33,6 +33,7 @@ package io.spine.internal.dependency * but no alternatives are known for some of them so far. Please see * [this issue](https://github.com/SpineEventEngine/base/issues/108) for more details. */ +@Suppress("unused", "ConstPropertyName") object FindBugs { private const val version = "3.0.2" const val annotations = "com.google.code.findbugs:jsr305:${version}" diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Firebase.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Firebase.kt index 5e471caa..499c1ce3 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Firebase.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Firebase.kt @@ -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. @@ -27,7 +27,7 @@ package io.spine.internal.dependency // https://firebase.google.com/docs/admin/setup#java -@Suppress("unused") +@Suppress("unused", "ConstPropertyName") object Firebase { private const val adminVersion = "8.1.0" const val admin = "com.google.firebase:firebase-admin:${adminVersion}" diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Flogger.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Flogger.kt index 4332178f..f684bf53 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Flogger.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Flogger.kt @@ -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. @@ -27,13 +27,15 @@ package io.spine.internal.dependency // https://github.com/google/flogger +@Suppress("unused", "ConstPropertyName") object Flogger { internal const val version = "0.7.4" - const val lib = "com.google.flogger:flogger:${version}" - @Suppress("unused") + const val lib = "com.google.flogger:flogger:${version}" + object Runtime { const val systemBackend = "com.google.flogger:flogger-system-backend:${version}" - const val log4J = "com.google.flogger:flogger-log4j:${version}" - const val slf4J = "com.google.flogger:slf4j-backend-factory:${version}" + const val log4j2Backend = "com.google.flogger:flogger-log4j2-backend:${version}" + const val slf4JBackend = "com.google.flogger:flogger-slf4j-backend:${version}" + const val grpcContext = "com.google.flogger:flogger-grpc-context:${version}" } } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/GoogleApis.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/GoogleApis.kt index af663dc1..421915ca 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/GoogleApis.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/GoogleApis.kt @@ -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. @@ -29,7 +29,7 @@ package io.spine.internal.dependency /** * Provides dependencies on [GoogleApis projects](https://github.com/googleapis/). */ -@Suppress("unused") +@Suppress("unused", "ConstPropertyName") object GoogleApis { // https://github.com/googleapis/google-api-java-client diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/GoogleCloud.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/GoogleCloud.kt index a764af27..50913645 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/GoogleCloud.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/GoogleCloud.kt @@ -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. @@ -26,7 +26,7 @@ package io.spine.internal.dependency -@Suppress("unused") +@Suppress("unused", "ConstPropertyName") object GoogleCloud { // https://github.com/googleapis/java-core diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/GradleDoctor.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/GradleDoctor.kt new file mode 100644 index 00000000..707fac33 --- /dev/null +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/GradleDoctor.kt @@ -0,0 +1,38 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Redistribution and use in source and/or binary forms, with or without + * modification, must retain the above copyright notice and the following + * disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package io.spine.internal.dependency + +/** + * Helps optimize Gradle Builds by ensuring recommendations at build time. + * + * See [plugin site](https://runningcode.github.io/gradle-doctor) for features and usage. + */ +@Suppress("unused", "ConstPropertyName") +object GradleDoctor { + const val version = "0.8.1" + const val pluginId = "com.osacky.doctor" +} diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Grpc.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Grpc.kt index 22996e4d..785b3281 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Grpc.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Grpc.kt @@ -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. @@ -27,10 +27,10 @@ package io.spine.internal.dependency // https://github.com/grpc/grpc-java -@Suppress("unused") +@Suppress("unused", "ConstPropertyName") object Grpc { @Suppress("MemberVisibilityCanBePrivate") - const val version = "1.45.0" + const val version = "1.57.0" const val api = "io.grpc:grpc-api:${version}" const val auth = "io.grpc:grpc-auth:${version}" const val core = "io.grpc:grpc-core:${version}" @@ -39,7 +39,11 @@ object Grpc { const val okHttp = "io.grpc:grpc-okhttp:${version}" const val protobuf = "io.grpc:grpc-protobuf:${version}" const val protobufLite = "io.grpc:grpc-protobuf-lite:${version}" - const val protobufPlugin = "io.grpc:protoc-gen-grpc-java:${version}" const val netty = "io.grpc:grpc-netty:${version}" const val nettyShaded = "io.grpc:grpc-netty-shaded:${version}" + + object ProtocPlugin { + const val id = "grpc" + const val artifact = "io.grpc:protoc-gen-grpc-java:${version}" + } } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Gson.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Gson.kt index e161ee1e..0a58187c 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Gson.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Gson.kt @@ -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. @@ -32,6 +32,7 @@ package io.spine.internal.dependency * * [Gson](https://github.com/google/gson) */ +@Suppress("unused", "ConstPropertyName") object Gson { private const val version = "2.9.0" const val lib = "com.google.code.gson:gson:${version}" diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Guava.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Guava.kt index faaf3b8b..1c747d91 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Guava.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Guava.kt @@ -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. @@ -32,10 +32,20 @@ package io.spine.internal.dependency * When changing the version, also change the version used in the `build.gradle.kts`. We need * to synchronize the version used in `buildSrc` and in Spine modules. Otherwise, when testing * Gradle plugins, errors may occur due to version clashes. + * + * @see Guava at GitHub. */ -// https://github.com/google/guava +@Suppress("unused", "ConstPropertyName") object Guava { - private const val version = "31.1-jre" - const val lib = "com.google.guava:guava:${version}" - const val testLib = "com.google.guava:guava-testlib:${version}" + private const val version = "32.1.2-jre" + private const val group = "com.google.guava" + + const val lib = "${group}:guava:${version}" + const val testLib = "${group}:guava-testlib:${version}" + + object ListenableFuture { + private const val version = "9999.0-empty-to-avoid-conflict-with-guava" + + const val lib = "${group}:listenablefuture:${version}" + } } diff --git a/buildSrc/src/main/groovy/checkstyle.gradle b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Hamcrest.kt similarity index 71% rename from buildSrc/src/main/groovy/checkstyle.gradle rename to buildSrc/src/main/kotlin/io/spine/internal/dependency/Hamcrest.kt index db3d5c52..297b9692 100644 --- a/buildSrc/src/main/groovy/checkstyle.gradle +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Hamcrest.kt @@ -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. @@ -24,20 +24,17 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* - * This script configures Gradle Checkstyle plugin. - */ - -import io.spine.internal.dependency.CheckStyle - -println("`checkstyle.gradle` script is deprecated. Please use the `CheckStyleConfig` utility instead.") +package io.spine.internal.dependency -apply plugin: 'checkstyle' - -checkstyle { - toolVersion = "${CheckStyle.version}" - configFile = file("$rootDir/config/quality/checkstyle.xml") - - // Disable checking the test sources. - checkstyleTest.enabled = false +/** + * The dependency on the Hamcrest, which is transitive for us. + * + * If you need assertions in Java, please use Google [Truth] instead. + * For Kotlin, please use [Kotest]. + */ +@Suppress("unused", "ConstPropertyName") +object Hamcrest { + // https://github.com/hamcrest/JavaHamcrest/releases + private const val version = "2.2" + const val core = "org.hamcrest:hamcrest-core:${version}" } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/HttpClient.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/HttpClient.kt index 849f1f4a..1df0768d 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/HttpClient.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/HttpClient.kt @@ -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. @@ -29,7 +29,7 @@ package io.spine.internal.dependency /** * Google implementations of [HTTP client](https://github.com/googleapis/google-http-java-client). */ -@Suppress("unused") +@Suppress("unused", "ConstPropertyName") object HttpClient { // https://github.com/googleapis/google-http-java-client const val version = "1.41.5" diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/J2ObjC.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/J2ObjC.kt index 9ed18f26..dd9d9302 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/J2ObjC.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/J2ObjC.kt @@ -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. @@ -30,6 +30,7 @@ package io.spine.internal.dependency * [J2ObjC](https://developers.google.com/j2objc) is a transitive dependency * which we don't use directly. This object is used for forcing the version. */ +@Suppress("unused", "ConstPropertyName") object J2ObjC { // https://github.com/google/j2objc/releases // `1.3.` is the latest version available from Maven Central. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/JUnit.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/JUnit.kt index 0c436ce4..122c6579 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/JUnit.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/JUnit.kt @@ -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. @@ -27,27 +27,38 @@ package io.spine.internal.dependency // https://junit.org/junit5/ -@Suppress("unused") +@Suppress("unused", "ConstPropertyName") object JUnit { - const val version = "5.8.2" - private const val platformVersion = "1.8.2" - private const val legacyVersion = "4.13.1" + const val version = "5.10.0" + private const val legacyVersion = "4.13.1" // https://github.com/apiguardian-team/apiguardian private const val apiGuardianVersion = "1.1.2" + // https://github.com/junit-pioneer/junit-pioneer - private const val pioneerVersion = "1.5.0" + private const val pioneerVersion = "2.0.1" const val legacy = "junit:junit:${legacyVersion}" + val api = listOf( "org.apiguardian:apiguardian-api:${apiGuardianVersion}", "org.junit.jupiter:junit-jupiter-api:${version}", "org.junit.jupiter:junit-jupiter-params:${version}" ) - const val bom = "org.junit:junit-bom:${version}" - const val runner = "org.junit.jupiter:junit-jupiter-engine:${version}" - const val pioneer = "org.junit-pioneer:junit-pioneer:${pioneerVersion}" - const val platformCommons = "org.junit.platform:junit-platform-commons:${platformVersion}" - const val platformLauncher = "org.junit.platform:junit-platform-launcher:${platformVersion}" + const val bom = "org.junit:junit-bom:${version}" + + const val runner = "org.junit.jupiter:junit-jupiter-engine:${version}" const val params = "org.junit.jupiter:junit-jupiter-params:${version}" + + const val pioneer = "org.junit-pioneer:junit-pioneer:${pioneerVersion}" + + object Platform { + // https://junit.org/junit5/ + const val version = "1.10.0" + internal const val group = "org.junit.platform" + const val commons = "$group:junit-platform-commons:$version" + const val launcher = "$group:junit-platform-launcher:$version" + const val engine = "$group:junit-platform-engine:$version" + const val suiteApi = "$group:junit-platform-suite-api:$version" + } } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Jackson.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Jackson.kt index 71f7e08c..3b282166 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Jackson.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Jackson.kt @@ -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. @@ -26,18 +26,31 @@ package io.spine.internal.dependency -@Suppress("unused") +// https://github.com/FasterXML/jackson/wiki/Jackson-Releases +@Suppress("unused", "ConstPropertyName") object Jackson { - private const val version = "2.13.2" - private const val databindVersion = "2.13.2.2" + const val version = "2.15.2" + private const val databindVersion = "2.15.2" + + private const val coreGroup = "com.fasterxml.jackson.core" + private const val dataformatGroup = "com.fasterxml.jackson.dataformat" + private const val moduleGroup = "com.fasterxml.jackson.module" + // https://github.com/FasterXML/jackson-core - const val core = "com.fasterxml.jackson.core:jackson-core:${version}" + const val core = "$coreGroup:jackson-core:${version}" // https://github.com/FasterXML/jackson-databind - const val databind = "com.fasterxml.jackson.core:jackson-databind:${databindVersion}" + const val databind = "$coreGroup:jackson-databind:${databindVersion}" + // https://github.com/FasterXML/jackson-annotations + const val annotations = "$coreGroup:jackson-annotations:${version}" + // https://github.com/FasterXML/jackson-dataformat-xml/releases - const val dataformatXml = "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${version}" + const val dataformatXml = "$dataformatGroup:jackson-dataformat-xml:${version}" // https://github.com/FasterXML/jackson-dataformats-text/releases - const val dataformatYaml = "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${version}" + const val dataformatYaml = "$dataformatGroup:jackson-dataformat-yaml:${version}" + // https://github.com/FasterXML/jackson-module-kotlin/releases - const val moduleKotlin = "com.fasterxml.jackson.module:jackson-module-kotlin:${version}" + const val moduleKotlin = "$moduleGroup:jackson-module-kotlin:${version}" + + // https://github.com/FasterXML/jackson-bom + const val bom = "com.fasterxml.jackson:jackson-bom:${version}" } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/JavaDiffUtils.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/JavaDiffUtils.kt new file mode 100644 index 00000000..c04aeddc --- /dev/null +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/JavaDiffUtils.kt @@ -0,0 +1,42 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Redistribution and use in source and/or binary forms, with or without + * modification, must retain the above copyright notice and the following + * disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package io.spine.internal.dependency + +/** + * The dependency on the `java-diff-utils` library, which is transitive for us at the time + * of writing. + * + * It might become our dependency as a part of + * the [Spine Text](https://github.com/SpineEventEngine/text) library. + */ +@Suppress("unused", "ConstPropertyName") +object JavaDiffUtils { + + // https://github.com/java-diff-utils/java-diff-utils/releases + private const val version = "4.12" + const val lib = "io.github.java-diff-utils:java-diff-utils:${version}" +} diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/JavaJwt.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/JavaJwt.kt index 424c45fb..6e6c3121 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/JavaJwt.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/JavaJwt.kt @@ -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. @@ -31,8 +31,16 @@ package io.spine.internal.dependency * * [Java JWT](https://github.com/auth0/java-jwt) */ -@Suppress("unused") +@Suppress("unused", "ConstPropertyName") object JavaJwt { - private const val version = "3.19.1" + + /** + * The last version in the v3.x.x series. + * + * There's a v4.x.x series (e.g. https://github.com/auth0/java-jwt/releases/tag/4.4.0), but + * it introduces breaking changes. Consider upgrading to it when we're ready to migrate. + */ + private const val version = "3.19.4" + const val lib = "com.auth0:java-jwt:${version}" } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/JavaPoet.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/JavaPoet.kt index e9bdb9b3..44ddb2ca 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/JavaPoet.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/JavaPoet.kt @@ -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. @@ -27,7 +27,7 @@ package io.spine.internal.dependency // https://github.com/square/javapoet -@Suppress("unused") +@Suppress("unused", "ConstPropertyName") object JavaPoet { private const val version = "1.13.0" const val lib = "com.squareup:javapoet:${version}" diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/JavaX.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/JavaX.kt index 9fb7bd59..44cbbd59 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/JavaX.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/JavaX.kt @@ -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. @@ -26,7 +26,7 @@ package io.spine.internal.dependency -@Suppress("unused") +@Suppress("unused", "ConstPropertyName") object JavaX { // This artifact which used to be a part of J2EE moved under Eclipse EE4J project. // https://github.com/eclipse-ee4j/common-annotations-api diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Klaxon.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Klaxon.kt index 160fdbfb..a2d81ce2 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Klaxon.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Klaxon.kt @@ -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. @@ -27,10 +27,11 @@ package io.spine.internal.dependency /** - * A JSON parser in Kotlin + * A JSON parser in Kotlin. * * [Klaxon](https://github.com/cbeust/klaxon) */ +@Suppress("unused", "ConstPropertyName") object Klaxon { private const val version = "5.6" const val lib = "com.beust:klaxon:${version}" diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Kotest.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Kotest.kt new file mode 100644 index 00000000..d4942f48 --- /dev/null +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Kotest.kt @@ -0,0 +1,60 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Redistribution and use in source and/or binary forms, with or without + * modification, must retain the above copyright notice and the following + * disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +@file:Suppress("unused") + +package io.spine.internal.dependency + +/** + * Testing framework for Kotlin. + * + * @see Kotest site + */ +@Suppress("unused", "ConstPropertyName") +object Kotest { + const val version = "5.6.2" + const val group = "io.kotest" + const val assertions = "$group:kotest-assertions-core:$version" + const val runnerJUnit5 = "$group:kotest-runner-junit5:$version" + const val runnerJUnit5Jvm = "$group:kotest-runner-junit5-jvm:$version" + const val frameworkApi = "$group:kotest-framework-api:$version" + const val datatest = "$group:kotest-framework-datatest:$version" + const val frameworkEngine = "$group:kotest-framework-engine:$version" + + // https://plugins.gradle.org/plugin/io.kotest.multiplatform + object MultiplatformGradlePlugin { + const val version = Kotest.version + const val id = "io.kotest.multiplatform" + const val classpath = "$group:kotest-framework-multiplatform-plugin-gradle:$version" + } + + // https://github.com/kotest/kotest-gradle-plugin + object JvmGradlePlugin { + const val version = "0.4.10" + const val id = "io.kotest" + const val classpath = "$group:kotest-gradle-plugin:$version" + } +} diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Kotlin.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Kotlin.kt index 5fc4cace..9f53be46 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Kotlin.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Kotlin.kt @@ -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. @@ -28,11 +28,39 @@ package io.spine.internal.dependency // https://github.com/JetBrains/kotlin // https://github.com/Kotlin +@Suppress("unused", "ConstPropertyName") object Kotlin { + + /** + * When changing the version, also change the version used in the `buildSrc/build.gradle.kts`. + */ @Suppress("MemberVisibilityCanBePrivate") // used directly from outside - const val version = "1.6.10" - const val reflect = "org.jetbrains.kotlin:kotlin-reflect:${version}" - const val stdLib = "org.jetbrains.kotlin:kotlin-stdlib:${version}" - const val stdLibCommon = "org.jetbrains.kotlin:kotlin-stdlib-common:${version}" - const val stdLibJdk8 = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${version}" + const val version = "1.9.0" + + /** + * The version of the JetBrains annotations library, which is a transitive + * dependency for us via Kotlin libraries. + * + * https://github.com/JetBrains/java-annotations + */ + private const val annotationsVersion = "23.0.0" + + private const val group = "org.jetbrains.kotlin" + + const val stdLib = "$group:kotlin-stdlib:$version" + const val stdLibCommon = "$group:kotlin-stdlib-common:$version" + + @Deprecated("Please use `stdLib` instead.") + const val stdLibJdk7 = "$group:kotlin-stdlib-jdk7:$version" + + @Deprecated("Please use `stdLib` instead.") + const val stdLibJdk8 = "$group:kotlin-stdlib-jdk8:$version" + + const val reflect = "$group:kotlin-reflect:$version" + const val testJUnit5 = "$group:kotlin-test-junit5:$version" + + const val gradlePluginApi = "$group:kotlin-gradle-plugin-api:$version" + const val gradlePluginLib = "$group:kotlin-gradle-plugin:$version" + + const val jetbrainsAnnotations = "org.jetbrains:annotations:$annotationsVersion" } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/KotlinSemver.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/KotlinSemver.kt index 47fd7de4..c8e8029b 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/KotlinSemver.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/KotlinSemver.kt @@ -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. @@ -27,8 +27,8 @@ package io.spine.internal.dependency // https://github.com/z4kn4fein/kotlin-semver -@Suppress("unused") +@Suppress("unused", "ConstPropertyName") object KotlinSemver { - private const val version = "1.2.1" + private const val version = "1.4.2" const val lib = "io.github.z4kn4fein:semver:$version" } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/AutoService.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Kover.kt similarity index 78% rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/AutoService.kt rename to buildSrc/src/main/kotlin/io/spine/internal/dependency/Kover.kt index 80b79975..6acfff68 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/AutoService.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Kover.kt @@ -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. @@ -26,10 +26,10 @@ package io.spine.internal.dependency -// https://github.com/google/auto -object AutoService { - private const val version = "1.0.1" - const val annotations = "com.google.auto.service:auto-service-annotations:${version}" - @Suppress("unused") - const val processor = "com.google.auto.service:auto-service:${version}" +// https://github.com/Kotlin/kotlinx-kover +@Suppress("unused", "ConstPropertyName") +object Kover { + const val version = "0.7.2" + const val id = "org.jetbrains.kotlinx.kover" + const val classpath = "org.jetbrains.kotlinx:kover-gradle-plugin:$version" } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Netty.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Netty.kt index dfcd80ef..c4d009f1 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Netty.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Netty.kt @@ -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. @@ -26,10 +26,10 @@ package io.spine.internal.dependency -@Suppress("unused") +@Suppress("unused", "ConstPropertyName") object Netty { // https://github.com/netty/netty/releases - private const val version = "4.1.72.Final" + private const val version = "4.1.95.Final" const val common = "io.netty:netty-common:${version}" const val buffer = "io.netty:netty-buffer:${version}" const val transport = "io.netty:netty-transport:${version}" diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Okio.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Okio.kt index 4ad91c6f..cdbd7396 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Okio.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Okio.kt @@ -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. @@ -28,9 +28,11 @@ package io.spine.internal.dependency /** * Okio is a transitive dependency which we don't use directly. - * We `force` it in [DependencyResolution.forceConfiguration]. + * We `force` it in [forceVersions] (see `DependencyResolution.kt`). */ +@Suppress("unused", "ConstPropertyName") object Okio { + // This is the last version before next major. private const val version = "1.17.5" const val lib = "com.squareup.okio:okio:${version}" diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/OpenTest4J.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/OpenTest4J.kt new file mode 100644 index 00000000..0b189f0d --- /dev/null +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/OpenTest4J.kt @@ -0,0 +1,38 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Redistribution and use in source and/or binary forms, with or without + * modification, must retain the above copyright notice and the following + * disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package io.spine.internal.dependency + +/** + * The dependency on the OpenTest4j library, which is transitive for us. + */ +@Suppress("unused", "ConstPropertyName") +object OpenTest4J { + + // https://github.com/ota4j-team/opentest4j/releases + private const val version = "1.3.0" + const val lib = "org.opentest4j:opentest4j:${version}" +} diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/OsDetector.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/OsDetector.kt index 7f4bb16b..a11cec2f 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/OsDetector.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/OsDetector.kt @@ -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. @@ -26,9 +26,10 @@ package io.spine.internal.dependency +@Suppress("unused", "ConstPropertyName") object OsDetector { // https://github.com/google/osdetector-gradle-plugin - const val version = "1.7.0" + const val version = "1.7.3" const val id = "com.google.osdetector" const val lib = "com.google.gradle:osdetector-gradle-plugin:${version}" const val classpath = lib diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/PerfMark.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/PerfMark.kt index 8fd1ed2a..afd8bb0c 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/PerfMark.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/PerfMark.kt @@ -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. @@ -26,7 +26,8 @@ package io.spine.internal.dependency +// https://github.com/perfmark/perfmark object PerfMark { - const val api = "io.perfmark:perfmark-api:0.23.0" -} + const val api = "io.perfmark:perfmark-api:0.26.0" +} \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Plexus.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Plexus.kt index 27d27206..45a8ef15 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Plexus.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Plexus.kt @@ -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. @@ -24,15 +24,26 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +@file:Suppress("MaxLineLength") + package io.spine.internal.dependency /** * Plexus Utils is a transitive dependency which we don't use directly. - * We `force` it in [DependencyResolution.forceConfiguration]. + * We `force` it in [forceVersions] (see `DependencyResolution.kt`). * - * [Plexus Utils](https://codehaus-plexus.github.io/plexus-utils/) + * [Plexus Utils](https://github.com/codehaus-plexus/plexus-utils) */ +@Suppress("unused", "ConstPropertyName") object Plexus { - private const val version = "3.4.0" + + /** + * This is the last version in the 3.x series. + * + * There's a major update to 4.x. + * + * @see plexus-utils-4.0.0 + */ + private const val version = "3.5.1" const val utils = "org.codehaus.plexus:plexus-utils:${version}" } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Pmd.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Pmd.kt index badd7717..8d27f55a 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Pmd.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Pmd.kt @@ -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. @@ -24,10 +24,19 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +@file:Suppress("MaxLineLength") + package io.spine.internal.dependency -// https://pmd.github.io/ -@Suppress("unused") // Will be used when `config/gradle/pmd.gradle` migrates to Kotlin. +// https://github.com/pmd/pmd/releases +@Suppress("unused", "ConstPropertyName") object Pmd { - const val version = "6.44.0" + /** + * This is the last version in the 6.x series. + * + * There's a major update to 7.x series. + * + * @see spine-base + */ + const val base = "2.0.0-SNAPSHOT.187" + + /** + * The version of [Spine.reflect]. + * + * @see spine-reflect + */ + const val reflect = "2.0.0-SNAPSHOT.182" + + /** + * The version of [Spine.logging]. + * + * @see spine-logging + */ + const val logging = "2.0.0-SNAPSHOT.206" + + /** + * The version of [Spine.testlib]. + * + * @see spine-testlib + */ + const val testlib = "2.0.0-SNAPSHOT.184" + + /** + * The version of `core-java`. + * + * @see [Spine.CoreJava.client] + * @see [Spine.CoreJava.server] + * @see core-java + */ + const val core = "2.0.0-SNAPSHOT.155" + + /** + * The version of [Spine.modelCompiler]. + * + * @see spine-model-compiler + */ + const val mc = "2.0.0-SNAPSHOT.132" + + /** + * The version of [McJava]. + * + * @see spine-mc-java + */ + const val mcJava = "2.0.0-SNAPSHOT.168" + + /** + * The version of [Spine.baseTypes]. + * + * @see spine-base-types + */ + const val baseTypes = "2.0.0-SNAPSHOT.124" + + /** + * The version of [Spine.time]. + * + * @see spine-time + */ + const val time = "2.0.0-SNAPSHOT.133" + + /** + * The version of [Spine.change]. + * + * @see spine-change + */ + const val change = "2.0.0-SNAPSHOT.118" + + /** + * The version of [Spine.text]. + * + * @see spine-text + */ + const val text = "2.0.0-SNAPSHOT.5" + + /** + * The version of [Spine.toolBase]. + */ + const val toolBase = "2.0.0-SNAPSHOT.180" + + /** + * The version of [Spine.javadocTools]. + * + * @see spine-javadoc-tools + */ + const val javadocTools = "2.0.0-SNAPSHOT.75" + } + + const val base = "$group:spine-base:${ArtifactVersion.base}" + + @Deprecated("Use `Logging.lib` instead.", ReplaceWith("Logging.lib")) + const val logging = "$group:spine-logging:${ArtifactVersion.logging}" + @Deprecated("Use `Logging.context` instead.", ReplaceWith("Logging.context")) + const val loggingContext = "$group:spine-logging-context:${ArtifactVersion.logging}" + @Deprecated("Use `Logging.backend` instead.", ReplaceWith("Logging.backend")) + const val loggingBackend = "$group:spine-logging-backend:${ArtifactVersion.logging}" + + const val reflect = "$group:spine-reflect:${ArtifactVersion.reflect}" + const val baseTypes = "$group:spine-base-types:${ArtifactVersion.baseTypes}" + const val time = "$group:spine-time:${ArtifactVersion.time}" + const val change = "$group:spine-change:${ArtifactVersion.change}" + const val text = "$group:spine-text:${ArtifactVersion.text}" + + const val testlib = "$toolsGroup:spine-testlib:${ArtifactVersion.testlib}" + const val testUtilTime = "$toolsGroup:spine-testutil-time:${ArtifactVersion.time}" + const val toolBase = "$toolsGroup:spine-tool-base:${ArtifactVersion.toolBase}" + const val pluginBase = "$toolsGroup:spine-plugin-base:${ArtifactVersion.toolBase}" + const val pluginTestlib = "$toolsGroup:spine-plugin-testlib:${ArtifactVersion.toolBase}" + const val modelCompiler = "$toolsGroup:spine-model-compiler:${ArtifactVersion.mc}" + + /** + * Dependencies on the artifacts of the Spine Logging library. + * + * @see spine-logging + */ + 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 floggerApi = "$group:spine-flogger-api:$version" + const val floggerGrpcContext = "$group:spine-flogger-grpc-context:$version" + const val smokeTest = "$group:spine-logging-smoke-test:$version" + } + + + /** + * Dependencies on Spine Model Compiler for Java. + * + * See [mc-java](https://github.com/SpineEventEngine/mc-java). + */ + object McJava { + const val version = ArtifactVersion.mcJava + const val pluginId = "io.spine.mc-java" + const val pluginLib = "$toolsGroup:spine-mc-java-plugins:${version}:all" + } + + @Deprecated("Please use `javadocFilter` instead.", ReplaceWith("javadocFilter")) + const val javadocTools = "$toolsGroup::${ArtifactVersion.javadocTools}" + const val javadocFilter = "$toolsGroup:spine-javadoc-filter:${ArtifactVersion.javadocTools}" + + const val client = CoreJava.client // Added for brevity. + const val server = CoreJava.server // Added for brevity. + + /** + * Dependencies on `core-java` modules. + * + * See [`SpineEventEngine/core-java`](https://github.com/SpineEventEngine/core-java/). + */ + object CoreJava { + const val version = ArtifactVersion.core + const val core = "$group:spine-core:$version" + const val client = "$group:spine-client:$version" + const val server = "$group:spine-server:$version" + const val serverTests = "$server:test" + const val testUtilServer = "$toolsGroup:spine-testutil-server:$version" + } +} diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/TestKitTruth.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/TestKitTruth.kt index 8d572d9b..a345b0fb 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/TestKitTruth.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/TestKitTruth.kt @@ -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. @@ -24,19 +24,18 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +@file:Suppress("MaxLineLength") + package io.spine.internal.dependency /** * Gradle TestKit extension for Google Truth. * - * Source code: - * https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin/tree/main/testkit-truth - * - * Usage description: - * https://dev.to/autonomousapps/gradle-all-the-way-down-testing-your-gradle-plugin-with-gradle-testkit-2hmc + * @see TestKit source code + * @see Usage description */ -@Suppress("unused") +@Suppress("unused", "ConstPropertyName") object TestKitTruth { - private const val version = "1.1" + private const val version = "1.20.0" const val lib = "com.autonomousapps:testkit-truth:$version" } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Truth.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Truth.kt index 48c1f2df..31354171 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/Truth.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Truth.kt @@ -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. @@ -27,8 +27,9 @@ package io.spine.internal.dependency // https://github.com/google/truth +@Suppress("unused", "ConstPropertyName") object Truth { - private const val version = "1.1.3" + private const val version = "1.1.5" val libs = listOf( "com.google.truth:truth:${version}", "com.google.truth.extensions:truth-java8-extension:${version}", diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/TestJar.kt b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Validation.kt similarity index 65% rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/TestJar.kt rename to buildSrc/src/main/kotlin/io/spine/internal/dependency/Validation.kt index 97233992..e663ca1d 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/TestJar.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/dependency/Validation.kt @@ -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. @@ -24,27 +24,19 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package io.spine.internal.gradle.publish +package io.spine.internal.dependency /** - * A DSL element of [SpinePublishing] extension which allows enabling publishing - * of [testJar] artifact. + * Dependencies on Spine Validation SDK. * - * This artifact contains compilation output of `test` source set. By default, it is not published. - * - * Take a look on [SpinePublishing.testJar] for a usage example. - - * @see [registerArtifacts] + * See [`SpineEventEngine/validation`](https://github.com/SpineEventEngine/validation/). */ -class TestJar { - - /** - * Set of modules, for which a test JAR will be published. - */ - var inclusions: Set = emptySet() - - /** - * Enables test JAR publishing for all published modules. - */ - var enabled = false +@Suppress("unused", "ConstPropertyName") +object Validation { + const val version = "2.0.0-SNAPSHOT.99" + 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 model = "$group:spine-validation-model:$version" + const val config = "$group:spine-validation-configuration:$version" } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/Build.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/Build.kt index c42a3c08..f1c0331c 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/Build.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/Build.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/Clean.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/Clean.kt index ad5c1c59..1f9b1cc3 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/Clean.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/Clean.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/ConfigTester.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/ConfigTester.kt index 8a3db510..65e00ad8 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/ConfigTester.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/ConfigTester.kt @@ -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. @@ -60,6 +60,15 @@ class ConfigTester( private val tasks: TaskContainer, private val tempFolder: File = File("./tmp") ) { + + companion object { + + /** + * Gradle build timeout. + */ + private const val BUILD_TIMEOUT_MINUTES = 30L + } + private val buildSrc: Path = config.resolve("buildSrc") /** @@ -132,7 +141,7 @@ class ConfigTester( println("*** `${gitRepo.name}`: Gradle build completed. ***") } directory = gitRepo.prepareCheckout(tempFolder).absolutePath - maxDurationMins = 30 + maxDurationMins = BUILD_TIMEOUT_MINUTES } } @@ -302,31 +311,31 @@ class ClonedRepo( @Suppress("TooGenericExceptionCaught") private fun copyFolder(sourceFolder: Path, ignoredFolder: Path?, destinationFolder: Path) { try { - Files.walk(sourceFolder).forEach { file: Path -> - if (ignoredFolder != null) { - if (file.toAbsolutePath().startsWith(ignoredFolder.toAbsolutePath())) { - return@forEach - } - } - try { - val destination = destinationFolder.resolve(sourceFolder.relativize(file)) - if (Files.isDirectory(file)) { - if (!Files.exists(destination)) Files.createDirectory(destination) - return@forEach - } - Files.copy(file, destination) - } catch (e: Exception) { - throw IllegalStateException( - "Error copying folder `$sourceFolder` to `$destinationFolder`.", e - ) - } - } + copyRecursively(sourceFolder, ignoredFolder, destinationFolder) } catch (e: Exception) { throw IllegalStateException( "Error copying folder `$sourceFolder` to `$destinationFolder`.", e ) } } + + private fun copyRecursively(sourceFolder: Path, ignoredFolder: Path?, destinationFolder: Path) { + fun Path.isIgnored(): Boolean = ignoredFolder + ?.let { toAbsolutePath().startsWith(it.toAbsolutePath()) } + ?: false + + val flattenedTree = Files.walk(sourceFolder).filter { it.isIgnored().not() } + val filesToDestinations = flattenedTree.map { file -> + val destination = destinationFolder.resolve(sourceFolder.relativize(file)) + file to destination + } + + val directories = filesToDestinations.filter { Files.isDirectory(it.first) } + directories.forEach { Files.createDirectories(it.second) } + + val files = filesToDestinations.filter { Files.isDirectory(it.first).not() } + files.forEach { Files.copy(it.first, it.second) } + } } /** diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/ProjectExtensions.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/ProjectExtensions.kt index a2e34b3a..2ef4bd8e 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/ProjectExtensions.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/ProjectExtensions.kt @@ -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. @@ -69,7 +69,8 @@ fun Project.applyPlugin(cls: Class>) { @Suppress("UNCHECKED_CAST") /* See the method docs. */ fun Project.findTask(name: String): T { val task = this.tasks.findByName(name) - return task!! as T + ?: error("Unable to find a task named `$name` in the project `${this.name}`.") + return task as T } /** diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/RepoSlug.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/RepoSlug.kt index 48a49385..b713a3b8 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/RepoSlug.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/RepoSlug.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/Repositories.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/Repositories.kt index db807672..8c5015e3 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/Repositories.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/Repositories.kt @@ -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. @@ -24,6 +24,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +@file:Suppress("TooManyFunctions") // Deprecated functions will be kept for a while. + package io.spine.internal.gradle import io.spine.internal.gradle.publish.CloudRepo @@ -35,106 +37,38 @@ import java.util.* import org.gradle.api.Project import org.gradle.api.artifacts.dsl.RepositoryHandler import org.gradle.api.artifacts.repositories.MavenArtifactRepository +import org.gradle.kotlin.dsl.ScriptHandlerScope /** - * A Maven repository. - */ -data class Repository( - val releases: String, - val snapshots: String, - private val credentialsFile: String? = null, - private val credentialValues: ((Project) -> Credentials?)? = null, - val name: String = "Maven repository `$releases`" -) { - - /** - * Obtains the publishing password credentials to this repository. - * - * If the credentials are represented by a `.properties` file, reads the file and parses - * the credentials. The file must have properties `user.name` and `user.password`, which store - * the username and the password for the Maven repository auth. - */ - fun credentials(project: Project): Credentials? { - if (credentialValues != null) { - return credentialValues.invoke(project) - } - credentialsFile!! - val log = project.logger - log.info("Using credentials from `$credentialsFile`.") - val file = project.rootProject.file(credentialsFile) - if (!file.exists()) { - return null - } - val creds = file.readCredentials() - log.info("Publishing build as `${creds.username}`.") - return creds - } - - private fun File.readCredentials(): Credentials { - val properties = Properties() - properties.load(inputStream()) - val username = properties.getProperty("user.name") - val password = properties.getProperty("user.password") - return Credentials(username, password) - } - - override fun toString(): String { - return name - } -} - -/** - * Password credentials for a Maven repository. - */ -data class Credentials( - val username: String?, - val password: String? -) - -/** - * Defines names of additional repositories commonly used in the framework projects. + * Applies [standard][doApplyStandard] repositories to this [ScriptHandlerScope] + * optionally adding [gitHub] repositories for Spine-only components, if + * names of such repositories are given. * - * @see [applyStandard] + * @param buildscript + * a [ScriptHandlerScope] to work with. Pass `this` under `buildscript { }`. + * @param rootProject + * a root project where the `buildscript` is declared. + * @param gitHubRepo + * a list of short repository names, or empty list if only + * [standard repositories][doApplyStandard] are required. */ @Suppress("unused") -object Repos { - @Deprecated( - message = "Please use another repository.", - replaceWith = ReplaceWith("artifactRegistry"), - level = DeprecationLevel.ERROR - ) - val oldSpine = PublishingRepos.mavenTeamDev.releases - - @Deprecated( - message = "Please use another repository.", - replaceWith = ReplaceWith("artifactRegistrySnapshots"), - level = DeprecationLevel.ERROR - ) - val oldSpineSnapshots = PublishingRepos.mavenTeamDev.snapshots - - val spine = CloudRepo.published.releases - val spineSnapshots = CloudRepo.published.snapshots - - val artifactRegistry = PublishingRepos.cloudArtifactRegistry.releases - val artifactRegistrySnapshots = PublishingRepos.cloudArtifactRegistry.snapshots - - @Deprecated( - message = "Sonatype release repository redirects to the Maven Central", - replaceWith = ReplaceWith("sonatypeSnapshots"), - level = DeprecationLevel.ERROR - ) - const val sonatypeReleases = "https://oss.sonatype.org/content/repositories/snapshots" - const val sonatypeSnapshots = "https://oss.sonatype.org/content/repositories/snapshots" +@Deprecated( + message = "Please use `standardSpineSdkRepositories()`.", + replaceWith = ReplaceWith("standardSpineSdkRepositories()") +) +fun applyWithStandard( + buildscript: ScriptHandlerScope, + rootProject: Project, + vararg gitHubRepo: String +) { + val repositories = buildscript.repositories + gitHubRepo.iterator().forEachRemaining { repo -> + repositories.applyGitHubPackages(repo, rootProject) + } + repositories.standardToSpineSdk() } -/** - * Registers the standard set of Maven repositories. - * - * To be used in `buildscript` clauses when a fully-qualified call must be made. - */ -@Suppress("unused") -fun doApplyStandard(repositories: RepositoryHandler) = repositories.applyStandard() - /** * Registers the selected GitHub Packages repos as Maven repositories. * @@ -145,11 +79,14 @@ fun doApplyStandard(repositories: RepositoryHandler) = repositories.applyStandar * @param shortRepositoryName * the short name of the GitHub repository (e.g. "core-java") * @param project - * the project which is going to consume or publish artifacts from - * the registered repository + * the project which is going to consume artifacts from the repository * @see applyGitHubPackages */ @Suppress("unused") +@Deprecated( + message = "Please use `standardSpineSdkRepositories()`.", + replaceWith = ReplaceWith("standardSpineSdkRepositories()") +) fun doApplyGitHubPackages( repositories: RepositoryHandler, shortRepositoryName: String, @@ -157,16 +94,27 @@ fun doApplyGitHubPackages( ) = repositories.applyGitHubPackages(shortRepositoryName, project) /** - * Applies the repositories hosted at GitHub Packages, to which Spine artifacts were published. + * Registers the standard set of Maven repositories. + * + * To be used in `buildscript` clauses when a fully-qualified call must be made. + */ +@Suppress("unused") +@Deprecated( + message = "Please use `standardSpineSdkRepositories()`.", + replaceWith = ReplaceWith("standardSpineSdkRepositories()") +) +fun doApplyStandard(repositories: RepositoryHandler) = repositories.standardToSpineSdk() + +/** + * Applies the repository hosted at GitHub Packages, to which Spine artifacts were published. * * This method should be used by those wishing to have Spine artifacts published * to GitHub Packages as dependencies. * * @param shortRepositoryName - * the short name of the GitHub repository (e.g. "core-java") + * short names of the GitHub repository (e.g. "base", "core-java", "model-tools") * @param project - * the project which is going to consume or publish artifacts from - * the registered repository + * the project which is going to consume artifacts from repositories */ fun RepositoryHandler.applyGitHubPackages(shortRepositoryName: String, project: Project) { val repository = gitHub(shortRepositoryName) @@ -179,17 +127,98 @@ fun RepositoryHandler.applyGitHubPackages(shortRepositoryName: String, project: } /** - * Applies repositories commonly used by Spine Event Engine projects. + * Applies the repositories hosted at GitHub Packages, to which Spine artifacts were published. * - * Does not include the repositories hosted at GitHub Packages. + * This method should be used by those wishing to have Spine artifacts published + * to GitHub Packages as dependencies. * - * @see applyGitHubPackages + * @param shortRepositoryName + * the short name of the GitHub repository (e.g. "core-java") + * @param project + * the project which is going to consume or publish artifacts from + * the registered repository + */ +fun RepositoryHandler.applyGitHubPackages(project: Project, vararg shortRepositoryName: String) { + for (name in shortRepositoryName) { + applyGitHubPackages(name, project) + } +} + +/** + * Applies [standard][applyStandard] repositories to this [RepositoryHandler] + * optionally adding [applyGitHubPackages] repositories for Spine-only components, if + * names of such repositories are given. + * + * @param project + * a project to which we add dependencies + * @param gitHubRepo + * a list of short repository names, or empty list if only + * [standard repositories][applyStandard] are required. */ @Suppress("unused") -fun RepositoryHandler.applyStandard() { +@Deprecated( + message = "Please use `standardToSpineSdk()`.", + replaceWith = ReplaceWith("standardToSpineSdk()") +) +fun RepositoryHandler.applyStandardWithGitHub(project: Project, vararg gitHubRepo: String) { + gitHubRepo.iterator().forEachRemaining { repo -> + applyGitHubPackages(repo, project) + } + standardToSpineSdk() +} - gradlePluginPortal() - mavenLocal() +/** + * A scrambled version of PAT generated with the only "read:packages" scope. + * + * The scrambling around PAT is necessary because GitHub analyzes commits for the presence + * of tokens and invalidates them. + * + * @see + * How to make GitHub packages to the public + */ +object Pat { + private const val shade = "_phg->8YlN->MFRA->gxIk->HVkm->eO6g->FqHJ->z8MS->H4zC->ZEPq" + private const val separator = "->" + private val chunks: Int = shade.split(separator).size - 1 + + fun credentials(): Credentials { + val pass = shade.replace(separator, "").splitAndReverse(chunks, "") + return Credentials("public", pass) + } + + /** + * Splits this string to the chunks, reverses each chunk, and joins them + * back to a string using the [separator]. + */ + private fun String.splitAndReverse(numChunks: Int, separator: String): String { + check(length / numChunks >= 2) { + "The number of chunks is too big. Must be <= ${length / 2}." + } + val chunks = chunked(length / numChunks) + val reversedChunks = chunks.map { chunk -> chunk.reversed() } + return reversedChunks.joinToString(separator) + } +} + +/** + * Adds a read-only view to all artifacts of the SpineEventEngine + * GitHub organization. + */ +fun RepositoryHandler.spineArtifacts(): MavenArtifactRepository = maven { + url = URI("https://maven.pkg.github.com/SpineEventEngine/*") + includeSpineOnly() + val pat = Pat.credentials() + credentials { + username = pat.username + password = pat.password + } +} + +/** + * Applies repositories commonly used by Spine Event Engine projects. + */ +fun RepositoryHandler.standardToSpineSdk() { + spineArtifacts() val spineRepos = listOf( Repos.spine, @@ -207,10 +236,99 @@ fun RepositoryHandler.applyStandard() { } } - mavenCentral() maven { url = URI(Repos.sonatypeSnapshots) } + + mavenCentral() + gradlePluginPortal() + mavenLocal().includeSpineOnly() +} + +@Deprecated( + message = "Please use `standardToSpineSdk() instead.", + replaceWith = ReplaceWith("standardToSpineSdk()") +) +fun RepositoryHandler.applyStandard() = this.standardToSpineSdk() + +/** + * A Maven repository. + */ +data class Repository( + val releases: String, + val snapshots: String, + private val credentialsFile: String? = null, + private val credentialValues: ((Project) -> Credentials?)? = null, + val name: String = "Maven repository `$releases`" +) { + + /** + * Obtains the publishing password credentials to this repository. + * + * If the credentials are represented by a `.properties` file, reads the file and parses + * the credentials. The file must have properties `user.name` and `user.password`, which store + * the username and the password for the Maven repository auth. + */ + fun credentials(project: Project): Credentials? = when { + credentialValues != null -> credentialValues.invoke(project) + credentialsFile != null -> credsFromFile(credentialsFile, project) + else -> throw IllegalArgumentException( + "Credentials file or a supplier function should be passed." + ) + } + + private fun credsFromFile(fileName: String, project: Project): Credentials? { + val file = project.rootProject.file(fileName) + if (file.exists().not()) { + return null + } + + val log = project.logger + log.info("Using credentials from `$fileName`.") + val creds = file.parseCredentials() + log.info("Publishing build as `${creds.username}`.") + return creds + } + + private fun File.parseCredentials(): Credentials { + val properties = Properties().apply { load(inputStream()) } + val username = properties.getProperty("user.name") + val password = properties.getProperty("user.password") + return Credentials(username, password) + } + + override fun toString(): String { + return name + } +} + +/** + * Password credentials for a Maven repository. + */ +data class Credentials( + val username: String?, + val password: String? +) + +/** + * Defines names of additional repositories commonly used in the Spine SDK projects. + * + * @see [applyStandard] + */ +private object Repos { + val spine = CloudRepo.published.releases + val spineSnapshots = CloudRepo.published.snapshots + val artifactRegistry = PublishingRepos.cloudArtifactRegistry.releases + val artifactRegistrySnapshots = PublishingRepos.cloudArtifactRegistry.snapshots + + @Suppress("unused") + @Deprecated( + message = "Sonatype release repository redirects to the Maven Central", + replaceWith = ReplaceWith("sonatypeSnapshots"), + level = DeprecationLevel.ERROR + ) + const val sonatypeReleases = "https://oss.sonatype.org/content/repositories/snapshots" + const val sonatypeSnapshots = "https://oss.sonatype.org/content/repositories/snapshots" } /** diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/RunBuild.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/RunBuild.kt index 03cef701..a39ffed5 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/RunBuild.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/RunBuild.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/RunGradle.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/RunGradle.kt index 12ad0111..926b237f 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/RunGradle.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/RunGradle.kt @@ -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. @@ -27,6 +27,7 @@ package io.spine.internal.gradle import java.io.File +import java.io.FileOutputStream import java.util.concurrent.TimeUnit import org.gradle.api.DefaultTask import org.gradle.api.GradleException @@ -46,6 +47,14 @@ import org.gradle.internal.os.OperatingSystem @Suppress("unused") open class RunGradle : DefaultTask() { + companion object { + + /** + * Default Gradle build timeout. + */ + private const val BUILD_TIMEOUT_MINUTES: Long = 10 + } + /** * Path to the directory which contains a Gradle wrapper script. */ @@ -61,7 +70,7 @@ open class RunGradle : DefaultTask() { * For how many minutes to wait for the Gradle build to complete. */ @Internal - var maxDurationMins: Long = 10 + var maxDurationMins: Long = BUILD_TIMEOUT_MINUTES /** * Names of Gradle properties to copy into the launched build. @@ -94,13 +103,17 @@ open class RunGradle : DefaultTask() { private fun execute() { // Ensure build error output log. // Since we're executing this task in another process, we redirect error output to - // the file under the `build` directory. - val buildDir = File(directory, "build") + // the file under the `_out` directory. Using the `build` directory for this purpose + // proved to cause problems under Windows when executing the `clean` command, which + // fails because another process holds files. + val buildDir = File(directory, "_out") if (!buildDir.exists()) { buildDir.mkdir() } val errorOut = File(buildDir, "error-out.txt") + errorOut.truncate() val debugOut = File(buildDir, "debug-out.txt") + debugOut.truncate() val command = buildCommand() val process = startProcess(command, errorOut, debugOut) @@ -154,7 +167,7 @@ open class RunGradle : DefaultTask() { } private fun buildScript(): String { - val runsOnWindows = OperatingSystem.current().isWindows() + val runsOnWindows = OperatingSystem.current().isWindows return if (runsOnWindows) "gradlew.bat" else "gradlew" } @@ -166,3 +179,10 @@ open class RunGradle : DefaultTask() { .redirectOutput(debugOut) .start() } + +private fun File.truncate() { + val stream = FileOutputStream(this) + stream.use { + it.channel.truncate(0) + } +} diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/Runtime.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/Runtime.kt index eced40e4..6594a2a2 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/Runtime.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/Runtime.kt @@ -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. @@ -26,17 +26,17 @@ package io.spine.internal.gradle -import com.google.common.base.Joiner -import io.spine.internal.dependency.Flogger import java.io.File import java.io.InputStream import java.io.StringWriter +import java.lang.ProcessBuilder.Redirect.PIPE import java.util.* -object Runtime { - @Suppress("unused") - val flogger = Flogger.Runtime -} +/** + * Utilities for working with processes from Gradle code. + */ +@Suppress("unused") +private const val ABOUT = "" /** * Executor of CLI commands. @@ -60,23 +60,26 @@ class Cli(private val workingFolder: File) { val outWriter = StringWriter() val errWriter = StringWriter() - val process = ProcessBuilder(*command) - .directory(workingFolder) - .redirectOutput(ProcessBuilder.Redirect.PIPE) - .redirectError(ProcessBuilder.Redirect.PIPE) - .start() + val process = ProcessBuilder(*command).apply { + directory(workingFolder) + redirectOutput(PIPE) + redirectError(PIPE) + }.start() - process.inputStream!!.pourTo(outWriter) - process.errorStream!!.pourTo(errWriter) - val exitCode = process.waitFor() + val exitCode = process.run { + inputStream!!.pourTo(outWriter) + errorStream!!.pourTo(errWriter) + waitFor() + } if (exitCode == 0) { return outWriter.toString() } else { - val cmdAsString = Joiner.on(" ").join(command.iterator()) - val errorMsg = "Command `$cmdAsString` finished with exit code $exitCode:" + - " ${System.lineSeparator()}$errWriter" + - " ${System.lineSeparator()}$outWriter." + val commandLine = command.joinToString(" ") + val nl = System.lineSeparator() + val errorMsg = "Command `$commandLine` finished with exit code $exitCode:" + + "$nl$errWriter" + + "$nl$outWriter." throw IllegalStateException(errorMsg) } } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/Scripts.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/Scripts.kt deleted file mode 100644 index 7baf9454..00000000 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/Scripts.kt +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package io.spine.internal.gradle - -import org.gradle.api.Project - -@Suppress("unused") -object Scripts { - @Suppress("MemberVisibilityCanBePrivate") // is used from Groovy-based scripts. - const val commonPath = "/buildSrc/src/main/groovy/" - - fun testArtifacts(p: Project) = p.script("test-artifacts.gradle") - fun testOutput(p: Project) = p.script("test-output.gradle") - fun slowTests(p: Project) = p.script("slow-tests.gradle") - fun jacoco(p: Project) = p.script("jacoco.gradle") - fun publish(p: Project) = p.script("publish.gradle") - fun publishProto(p: Project) = p.script("publish-proto.gradle") - fun javacArgs(p: Project) = p.script("javac-args.gradle") - fun jsBuildTasks(p: Project) = p.script("js/build-tasks.gradle") - fun jsConfigureProto(p: Project) = p.script("js/configure-proto.gradle") - fun npmPublishTasks(p: Project) = p.script("js/npm-publish-tasks.gradle") - fun npmCli(p: Project) = p.script("js/npm-cli.gradle") - fun updatePackageVersion(p: Project) = p.script("js/update-package-version.gradle") - fun dartBuildTasks(p: Project) = p.script("dart/build-tasks.gradle") - fun pubPublishTasks(p: Project) = p.script("dart/pub-publish-tasks.gradle") - - @Deprecated("Use `pmd-settings` script plugin instead") - fun pmd(p: Project) = p.script("pmd.gradle") - - fun runBuild(p: Project) = p.script("run-build.gradle") - fun licenseReportCommon(p: Project) = p.script("license-report-common.gradle") - fun projectLicenseReport(p: Project) = p.script("license-report-project.gradle") - fun repoLicenseReport(p: Project) = p.script("license-report-repo.gradle") - - private fun Project.script(name: String) = "${rootDir}$commonPath${name}" -} diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/StringExtensions.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/StringExtensions.kt index ae19007b..9d5253b7 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/StringExtensions.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/StringExtensions.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/TaskName.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/TaskName.kt index e6967b47..24b587f0 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/TaskName.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/TaskName.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/VersionWriter.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/VersionWriter.kt index bcec4a56..3dc7ef29 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/VersionWriter.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/VersionWriter.kt @@ -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. @@ -97,7 +97,7 @@ abstract class WriteVersions : DefaultTask() { * `versions-spine-tools.properties`. */ @TaskAction - private fun writeFile() { + fun writeFile() { versions.finalizeValue() versionsFileLocation.finalizeValue() diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/base/Tasks.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/base/Tasks.kt index 10290712..6fb9fbb6 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/base/Tasks.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/base/Tasks.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/checkstyle/CheckStyleConfig.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/checkstyle/CheckStyleConfig.kt index e3a0ef29..42d1f62c 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/checkstyle/CheckStyleConfig.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/checkstyle/CheckStyleConfig.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/DartContext.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/DartContext.kt index 2f33b281..ed2eff70 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/DartContext.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/DartContext.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/DartEnvironment.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/DartEnvironment.kt index 7b10f64c..160e1ff8 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/DartEnvironment.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/DartEnvironment.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/DartExtension.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/DartExtension.kt index cf585a9f..d4bd4d84 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/DartExtension.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/DartExtension.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/plugin/DartPlugins.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/plugin/DartPlugins.kt index 061e2add..43d8bb01 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/plugin/DartPlugins.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/plugin/DartPlugins.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/plugin/Protobuf.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/plugin/Protobuf.kt index 350f0fbd..65f6fb2f 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/plugin/Protobuf.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/plugin/Protobuf.kt @@ -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. @@ -26,10 +26,8 @@ package io.spine.internal.gradle.dart.plugin -import com.google.protobuf.gradle.builtins import com.google.protobuf.gradle.id -import com.google.protobuf.gradle.plugins -import com.google.protobuf.gradle.protobuf +import com.google.protobuf.gradle.ProtobufExtension import com.google.protobuf.gradle.remove import io.spine.internal.dependency.Protobuf @@ -42,9 +40,10 @@ fun DartPlugins.protobuf() { plugins.apply(Protobuf.GradlePlugin.id) - project.protobuf { - generateProtoTasks.all().forEach { task -> - task.apply { + val protobufExtension = project.extensions.getByType(ProtobufExtension::class.java) + protobufExtension.apply { + generateProtoTasks.all().configureEach { + apply { plugins { id("dart") } builtins { remove("java") } } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/task/Build.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/task/Build.kt index 79c387c3..55ec5ca1 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/task/Build.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/task/Build.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/task/DartTasks.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/task/DartTasks.kt index 5ebe9272..50574dee 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/task/DartTasks.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/task/DartTasks.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/task/IntegrationTest.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/task/IntegrationTest.kt index f12b96fd..69c691a2 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/task/IntegrationTest.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/task/IntegrationTest.kt @@ -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. @@ -71,6 +71,7 @@ val TaskContainer.integrationTest: TaskProvider * } * ``` */ +@Suppress("unused") fun DartTasks.integrationTest() = register(integrationTestName) { diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/task/Publish.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/task/Publish.kt index 92eb2904..08b7b009 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/task/Publish.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/dart/task/Publish.kt @@ -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. @@ -110,7 +110,7 @@ private fun DartTasks.stagePubPublication(): TaskProvider = into(publicationDir) doLast { - logger.debug("Pub publication is prepared in directory `$publicationDir`.") + logger.debug("Pub publication is prepared in directory `{}`.", publicationDir) } } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/ProtoJar.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/dokka/DokkaExtensions.kt similarity index 62% rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/ProtoJar.kt rename to buildSrc/src/main/kotlin/io/spine/internal/gradle/dokka/DokkaExtensions.kt index b9ffb592..a912d50b 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/ProtoJar.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/dokka/DokkaExtensions.kt @@ -24,28 +24,24 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package io.spine.internal.gradle.publish +package io.spine.internal.gradle.dokka + +import java.io.File +import org.gradle.api.file.FileCollection +import org.jetbrains.dokka.gradle.GradleDokkaSourceSetBuilder /** - * A DSL element of [SpinePublishing] extension which allows disabling publishing - * of [protoJar] artifact. - * - * This artifact contains all the `.proto` definitions from `sourceSets.main.proto`. By default, - * it is published. - * - * Take a look on [SpinePublishing.protoJar] for a usage example. + * Returns only Java source roots out of all present in the source set. * - * @see [registerArtifacts] + * It is a helper method for generating documentation by Dokka only for Java code. + * It is helpful when both Java and Kotlin source files are present in a source set. + * Dokka can properly generate documentation for either Kotlin or Java depending on + * the configuration, but not both. */ -class ProtoJar { - - /** - * Set of modules, for which a proto JAR will not be published. - */ - var exclusions: Set = emptySet() +internal fun GradleDokkaSourceSetBuilder.onlyJavaSources(): FileCollection { + return sourceRoots.filter(File::isJavaSourceDirectory) +} - /** - * Disables proto JAR publishing for all published modules. - */ - var disabled = false +private fun File.isJavaSourceDirectory(): Boolean { + return isDirectory && name == "java" } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/dependency/AutoValue.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/dokka/TaskContainerExtensions.kt similarity index 83% rename from buildSrc/src/main/kotlin/io/spine/internal/dependency/AutoValue.kt rename to buildSrc/src/main/kotlin/io/spine/internal/gradle/dokka/TaskContainerExtensions.kt index 5b630bf1..058eb992 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/dependency/AutoValue.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/dokka/TaskContainerExtensions.kt @@ -24,10 +24,12 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package io.spine.internal.dependency +package io.spine.internal.gradle.dokka -// https://github.com/google/auto -object AutoValue { - private const val version = "1.9" - const val annotations = "com.google.auto.value:auto-value-annotations:${version}" -} +import org.gradle.api.tasks.TaskContainer +import org.jetbrains.dokka.gradle.DokkaTask + +/** + * Finds the `dokkaHtml` Gradle task. + */ +fun TaskContainer.dokkaHtmlTask() = this.getByName("dokkaHtml") as DokkaTask diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/fs/LazyTempPath.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/fs/LazyTempPath.kt index 595e07a1..325d8e99 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/fs/LazyTempPath.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/fs/LazyTempPath.kt @@ -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. @@ -42,29 +42,22 @@ import java.nio.file.WatchService * After the first usage, the instances of this type delegate all calls to the internally * created instance of [Path] created with [createTempDirectory]. */ +@Suppress("TooManyFunctions") class LazyTempPath(private val prefix: String) : Path { - private lateinit var tempPath: Path + private val delegate: Path by lazy { createTempDirectory(prefix) } - private val delegate: Path - get() { - if (!::tempPath.isInitialized) { - tempPath = createTempDirectory(prefix) - } - return tempPath - } - - override fun compareTo(other: Path?): Int = delegate.compareTo(other) + override fun compareTo(other: Path): Int = delegate.compareTo(other) override fun iterator(): MutableIterator = delegate.iterator() override fun register( - watcher: WatchService?, - events: Array>?, + watcher: WatchService, + events: Array>, vararg modifiers: WatchEvent.Modifier? ): WatchKey = delegate.register(watcher, events, *modifiers) - override fun register(watcher: WatchService?, vararg events: WatchEvent.Kind<*>?): WatchKey = + override fun register(watcher: WatchService, vararg events: WatchEvent.Kind<*>?): WatchKey = delegate.register(watcher, *events) override fun getFileSystem(): FileSystem = delegate.fileSystem @@ -111,4 +104,6 @@ class LazyTempPath(private val prefix: String) : Path { override fun toRealPath(vararg options: LinkOption?): Path = delegate.toRealPath(*options) override fun toFile(): File = delegate.toFile() + + override fun toString(): String = delegate.toString() } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/git/Branch.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/git/Branch.kt new file mode 100644 index 00000000..63bae4e6 --- /dev/null +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/git/Branch.kt @@ -0,0 +1,43 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Redistribution and use in source and/or binary forms, with or without + * modification, must retain the above copyright notice and the following + * disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package io.spine.internal.gradle.git + +/** + * Branch names. + */ +object Branch { + + /** + * The default branch. + */ + const val master = "master" + + /** + * The branch used for publishing documentation to GitHub Pages. + */ + const val documentation = "gh-pages" +} diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/git/Repository.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/git/Repository.kt new file mode 100644 index 00000000..229973d8 --- /dev/null +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/git/Repository.kt @@ -0,0 +1,164 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Redistribution and use in source and/or binary forms, with or without + * modification, must retain the above copyright notice and the following + * disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package io.spine.internal.gradle.git + +import io.spine.internal.gradle.Cli +import io.spine.internal.gradle.fs.LazyTempPath + +/** + * Interacts with a real Git repository. + * + * Clones the repository with the provided SSH URL in a temporal folder. Provides + * functionality to configure a user, checkout branches, commit changes and push them + * to the remote repository. + * + * It is assumed that before using this class an appropriate SSH key that has + * sufficient rights to perform described above operations was registered + * in `ssh-agent`. + * + * NOTE: This class creates a temporal folder, so it holds resources. For the proper + * release of resources please use the provided functionality inside a `use` block or + * call the `close` method manually. + */ +class Repository private constructor( + + /** + * The GitHub SSH URL to the underlying repository. + */ + private val sshUrl: String, + + /** + * Current user configuration. + * + * This configuration determines what ends up in author and committer fields of a commit. + */ + private var user: UserInfo, + + /** + * Currently checked out branch. + */ + private var currentBranch: String + +) : AutoCloseable { + + /** + * Path to the temporal folder for a clone of the underlying repository. + */ + val location = LazyTempPath("repoTemp") + + /** + * Clones the repository with [the SSH url][sshUrl] into the [temporal folder][location]. + */ + private fun clone() { + repoExecute("git", "clone", sshUrl, ".") + } + + /** + * Executes a command in the [location]. + */ + private fun repoExecute(vararg command: String): String = + Cli(location.toFile()).execute(*command) + + /** + * Checks out the branch by its name. + */ + fun checkout(branch: String) { + repoExecute("git", "checkout", branch) + + currentBranch = branch + } + + /** + * Configures the username and the email of the user. + * + * Overwrites `user.name` and `user.email` settings locally in [location] with + * values from [user]. These settings determine what ends up in author and + * committer fields of a commit. + */ + fun configureUser(user: UserInfo) { + repoExecute("git", "config", "user.name", user.name) + repoExecute("git", "config", "user.email", user.email) + + this.user = user + } + + /** + * Stages all changes and commits with the provided message. + */ + fun commitAllChanges(message: String) { + stageAllChanges() + commit(message) + } + + private fun stageAllChanges() { + repoExecute("git", "add", "--all") + } + + private fun commit(message: String) { + repoExecute( + "git", + "commit", + "--allow-empty", + "--message=${message}" + ) + } + + /** + * Pushes local repository to the remote. + */ + fun push() { + repoExecute("git", "push") + } + + override fun close() { + location.toFile().deleteRecursively() + } + + companion object Factory { + /** + * Clones the repository with the provided SSH URL in a temporal folder. + * Configures the username and the email of the Git user. See [configureUser] + * documentation for more information. Performs checkout of the branch in + * case it was passed. By default, [master][Branch.master] is checked out. + * + * @throws IllegalArgumentException if SSH URL is an empty string. + */ + fun of(sshUrl: String, user: UserInfo, branch: String = Branch.master): Repository { + require(sshUrl.isNotBlank()) { "SSH URL cannot be an empty string." } + + val repo = Repository(sshUrl, user, branch) + repo.clone() + repo.configureUser(user) + + if (branch != Branch.master) { + repo.checkout(branch) + } + + return repo + } + } +} diff --git a/buildSrc/src/main/groovy/license-report-common.gradle b/buildSrc/src/main/kotlin/io/spine/internal/gradle/git/UserInfo.kt similarity index 69% rename from buildSrc/src/main/groovy/license-report-common.gradle rename to buildSrc/src/main/kotlin/io/spine/internal/gradle/git/UserInfo.kt index f506cf24..898eb5b3 100644 --- a/buildSrc/src/main/groovy/license-report-common.gradle +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/git/UserInfo.kt @@ -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. @@ -24,19 +24,19 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +package io.spine.internal.gradle.git + /** - * This script defines the common configuration for license report scripts. + * Contains information about a Git user. + * + * Determines the author and committer fields of a commit. + * + * @constructor throws an [IllegalArgumentException] if the name or the email + * is an empty string. */ - -println("`license-report-common.gradle` script is deprecated. " + - "Please use the `LicenseReporter` utility instead.") - -apply plugin: 'base' - -ext.licenseReportConfig = [ - // The output filename - outputFilename : "license-report.md", - - // The path to a directory, to which a per-project report is generated. - relativePath : "/reports/dependency-license/dependency" -] +data class UserInfo(val name: String, val email: String) { + init { + require(name.isNotBlank()) { "Name cannot be an empty string." } + require(email.isNotBlank()) { "Email cannot be an empty string." } + } +} diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/AuthorEmail.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/AuthorEmail.kt index cac6e41a..0f48f009 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/AuthorEmail.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/AuthorEmail.kt @@ -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. @@ -45,10 +45,8 @@ class AuthorEmail(val value: String) { */ fun fromVar() : AuthorEmail { val envValue = System.getenv(environmentVariable) - if (envValue.isNullOrEmpty()) { - throw IllegalStateException( - "Unable to obtain an author from `${environmentVariable}`." - ) + check(envValue != null && envValue.isNotBlank()) { + "Unable to obtain an author from `${environmentVariable}`." } return AuthorEmail(envValue) } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/RepositoryExtensions.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/RepositoryExtensions.kt new file mode 100644 index 00000000..4dacb62a --- /dev/null +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/RepositoryExtensions.kt @@ -0,0 +1,58 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Redistribution and use in source and/or binary forms, with or without + * modification, must retain the above copyright notice and the following + * disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package io.spine.internal.gradle.github.pages + +import io.spine.internal.gradle.RepoSlug +import io.spine.internal.gradle.git.Branch +import io.spine.internal.gradle.git.Repository +import io.spine.internal.gradle.git.UserInfo + +/** + * Clones the current project repository with the branch dedicated to publishing + * documentation to GitHub Pages checked out. + * + * The repository's GitHub SSH URL is derived from the `REPO_SLUG` environment + * variable. The [branch][Branch.documentation] dedicated to publishing documentation + * is automatically checked out in this repository. Also, the username and the email + * of the git user are automatically configured. The username is set + * to "UpdateGitHubPages Plugin", and the email is derived from + * the `FORMAL_GIT_HUB_PAGES_AUTHOR` environment variable. + * + * @throws org.gradle.api.GradleException if any of the environment variables described above + * is not set. + */ +internal fun Repository.Factory.forPublishingDocumentation(): Repository { + val host = RepoSlug.fromVar().gitHost() + + val username = "UpdateGitHubPages Plugin" + val userEmail = AuthorEmail.fromVar().toString() + val user = UserInfo(username, userEmail) + + val branch = Branch.documentation + + return of(host, user, branch) +} diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/SshKey.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/SshKey.kt new file mode 100644 index 00000000..7b1746ae --- /dev/null +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/SshKey.kt @@ -0,0 +1,104 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Redistribution and use in source and/or binary forms, with or without + * modification, must retain the above copyright notice and the following + * disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package io.spine.internal.gradle.github.pages + +import io.spine.internal.gradle.Cli +import java.io.File +import org.gradle.api.GradleException + +/** + * Registers SSH key for further operations with GitHub Pages. + */ +internal class SshKey(private val rootProjectFolder: File) { + /** + * Creates an SSH key with the credentials and registers it by invoking the + * `register-ssh-key.sh` script. + */ + fun register() { + val gitHubAccessKey = gitHubKey() + val sshConfigFile = sshConfigFile() + sshConfigFile.appendPublisher(gitHubAccessKey) + + execute( + "${rootProjectFolder.absolutePath}/config/scripts/register-ssh-key.sh", + gitHubAccessKey.absolutePath + ) + } + + /** + * Locates `deploy_key_rsa` in the [rootProjectFolder] and returns it as a [File]. + * + * A CI instance comes with an RSA key. However, of course, the default key has + * no privileges in Spine repositories. Thus, we add our own RSA key — + * `deploy_rsa_key`. It must have `write` rights in the associated repository. + * Also, we don't want that key to be used for anything else but GitHub Pages + * publishing. + * + * Thus, we configure the SSH agent to use the `deploy_rsa_key` only for specific + * references, namely in `github.com-publish`. + * + * @throws GradleException if `deploy_key_rsa` is not found. + */ + private fun gitHubKey(): File { + val gitHubAccessKey = File("${rootProjectFolder.absolutePath}/deploy_key_rsa") + + if (!gitHubAccessKey.exists()) { + throw GradleException( + "File $gitHubAccessKey does not exist. It should be encrypted" + + " in the repository and decrypted on CI." + ) + } + return gitHubAccessKey + } + + private fun sshConfigFile(): File { + val sshConfigFile = File("${System.getProperty("user.home")}/.ssh/config") + + if (!sshConfigFile.exists()) { + val parentDir = sshConfigFile.canonicalFile.parentFile + parentDir.mkdirs() + sshConfigFile.createNewFile() + } + + return sshConfigFile + } + + private fun File.appendPublisher(privateKey: File) { + val nl = System.lineSeparator() + this.appendText( + nl + + "Host github.com-publish" + nl + + "User git" + nl + + "IdentityFile ${privateKey.absolutePath}" + nl + ) + } + + /** + * Executes a command in the project [rootProjectFolder]. + */ + private fun execute(vararg command: String): String = Cli(rootProjectFolder).execute(*command) +} diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/TaskName.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/TaskName.kt index 2823416d..98e47722 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/TaskName.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/TaskName.kt @@ -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. @@ -34,7 +34,14 @@ object TaskName { const val updateGitHubPages = "updateGitHubPages" /** - * The name of the helper task to gather the generated Javadoc before updating GitHub Pages. + * The name of the helper task to gather the generated Javadoc before updating + * GitHub Pages. */ const val copyJavadoc = "copyJavadoc" + + /** + * The name of the helper task to gather Dokka-generated documentation before + * updating GitHub Pages. + */ + const val copyDokka = "copyDokka" } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/Update.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/Update.kt index 283405dd..f27858fa 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/Update.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/Update.kt @@ -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. @@ -26,11 +26,9 @@ package io.spine.internal.gradle.github.pages -import io.spine.internal.gradle.Cli -import io.spine.internal.gradle.RepoSlug +import io.spine.internal.gradle.git.Repository import java.io.File import java.nio.file.Path -import org.gradle.api.GradleException import org.gradle.api.Project import org.gradle.api.Task import org.gradle.api.file.ConfigurableFileCollection @@ -42,63 +40,86 @@ import org.gradle.api.logging.Logger */ fun Task.updateGhPages(project: Project) { val plugin = project.plugins.getPlugin(UpdateGitHubPages::class.java) - val op = with(plugin) { - Operation(project, rootFolder, checkoutTempFolder, javadocOutputPath, logger) + + with(plugin) { + SshKey(rootFolder).register() + } + + val repository = Repository.forPublishingDocumentation() + + val updateJavadoc = with(plugin) { + UpdateJavadoc(project, javadocOutputFolder, repository, logger) + } + + val updateDokka = with(plugin) { + UpdateDokka(project, dokkaOutputFolder, repository, logger) + } + + repository.use { + updateJavadoc.run() + updateDokka.run() + repository.push() } - op.run() } -private class Operation( +private abstract class UpdateDocumentation( private val project: Project, - private val rootFolder: File, - checkoutTempFolder: Path, - private val javadocOutputPath: Path, + private val docsSourceFolder: Path, + private val repository: Repository, private val logger: Logger ) { - private val ghRepoFolder: File = File("${checkoutTempFolder}/${Branch.ghPages}") - private val docDirPostfix = "reference/$project.name" - private val mostRecentDocDir = File("$ghRepoFolder/$docDirPostfix") + /** + * The folder under the repository's root(`/`) for storing documentation. + * + * The value should not contain any leading or trailing file separators. + * + * The absolute path to the project's documentation is made by appending its + * name to the end, making `/docsDestinationFolder/project.name`. + */ + protected abstract val docsDestinationFolder: String - fun run() { - SshKey(rootFolder).register() - checkoutDocs() - val generatedDocs = replaceMostRecentDocs() - copyIntoVersionDir(generatedDocs) - addCommitAndPush() - logger.debug("The GitHub Pages contents were successfully updated.") + /** + * The name of the tool used to generate the documentation to update. + * + * This name will appear in logs as part of a message. + */ + protected abstract val toolName: String + + private val mostRecentFolder by lazy { + File("${repository.location}/${docsDestinationFolder}/${project.name}") } - /** Executes a command in the project [rootFolder]. */ - private fun execute(vararg command: String): String = Cli(rootFolder).execute(*command) + private fun logDebug(message: () -> String) { + if (logger.isDebugEnabled) { + logger.debug(message()) + } + } - /** Executes a command in the [ghRepoFolder] */ - private fun pagesExecute(vararg command: String): String = Cli(ghRepoFolder).execute(*command) + fun run() { + val module = project.name + logDebug {"Update of the $toolName documentation for module `$module` started." } + + val documentation = replaceMostRecentDocs() + copyIntoVersionDir(documentation) - private fun checkoutDocs() { - val gitHost = RepoSlug.fromVar().gitHost() + val version = project.version + val updateMessage = + "Update `$toolName` documentation for module `$module` as for version $version" + repository.commitAllChanges(updateMessage) - execute("git", "clone", gitHost, ghRepoFolder.absolutePath) - pagesExecute("git", "checkout", Branch.ghPages) + logDebug { "Update of the `$toolName` documentation for `$module` successfully finished." } } private fun replaceMostRecentDocs(): ConfigurableFileCollection { - logger.debug("Replacing the most recent docs in `$mostRecentDocDir`.") - val generatedDocs = project.files(javadocOutputPath) - copyDocs(generatedDocs, mostRecentDocDir) - return generatedDocs - } + val generatedDocs = project.files(docsSourceFolder) - private fun copyIntoVersionDir(generatedDocs: ConfigurableFileCollection) { - val versionedDocDir = File("$mostRecentDocDir/v/$project.version") - logger.debug("Storing the new version of docs in the directory `$versionedDocDir`.") - copyDocs(generatedDocs, versionedDocDir) - } + logDebug { + "Replacing the most recent `$toolName` documentation in `${mostRecentFolder}`." + } + copyDocs(generatedDocs, mostRecentFolder) - private fun addCommitAndPush() { - pagesExecute("git", "add", docDirPostfix) - configureCommitter() - commitAndPush() + return generatedDocs } private fun copyDocs(source: FileCollection, destination: File) { @@ -109,89 +130,38 @@ private class Operation( } } - /** - * Configures Git to publish the changes under "UpdateGitHubPages Plugin" Git user name - * and email stored in "FORMAL_GIT_HUB_PAGES_AUTHOR" env variable. - */ - private fun configureCommitter() { - pagesExecute("git", "config", "user.name", "\"UpdateGitHubPages Plugin\"") - val authorEmail = AuthorEmail.fromVar().toString() - pagesExecute("git", "config", "user.email", authorEmail) - } - - private fun commitAndPush() { - pagesExecute( - "git", - "commit", - "--allow-empty", - "--message=\"Update Javadoc for module ${project.name}" + - " as for version ${project.version}\"" - ) - pagesExecute("git", "push") - } -} - -/** - * Registers SSH key for further operations with GitHub Pages. - */ -private class SshKey(private val rootFolder: File) { - - /** - * Creates an SSH key with the credentials and registers it - * by invoking the `register-ssh-key.sh` script. - */ - fun register() { - val gitHubAccessKey = gitHubKey() - val sshConfigFile = sshConfigFile() - val nl = System.lineSeparator() - sshConfigFile.appendText( - nl + - "Host github.com-publish" + nl + - "User git" + nl + - "IdentityFile ${gitHubAccessKey.absolutePath}" + nl - ) - - execute( - "${rootFolder.absolutePath}/config/scripts/register-ssh-key.sh", - gitHubAccessKey.absolutePath - ) - } + private fun copyIntoVersionDir(generatedDocs: ConfigurableFileCollection) { + val versionedDocDir = File("$mostRecentFolder/v/${project.version}") - /** - * Locates `deploy_key_rsa` in the [rootFolder] and returns it as a [File]. - * - * If it is not found, a [GradleException] is thrown. - * - *

A CI instance comes with an RSA key. However, of course, the default key has no - * privileges in Spine repositories. Thus, we add our own RSA key — `deploy_rsa_key`. - * It must have `write` rights in the associated repository. - * Also, we don't want that key to be used for anything else but GitHub Pages publishing. - * - * Thus, we configure the SSH agent to use the `deploy_rsa_key` - * only for specific references, namely in `github.com-publish`. - */ - private fun gitHubKey(): File { - val gitHubAccessKey = File("${rootFolder.absolutePath}/deploy_key_rsa") - - if (!gitHubAccessKey.exists()) { - throw GradleException( - "File $gitHubAccessKey does not exist. It should be encrypted" + - " in the repository and decrypted on CI." - ) + logDebug { + "Storing the new version of `$toolName` documentation in `${versionedDocDir}`." } - return gitHubAccessKey + copyDocs(generatedDocs, versionedDocDir) } +} - private fun sshConfigFile(): File { - val sshConfigFile = File("${System.getProperty("user.home")}/.ssh/config") - if (!sshConfigFile.exists()) { - val parentDir = sshConfigFile.canonicalFile.parentFile - parentDir.mkdirs() - sshConfigFile.createNewFile() - } - return sshConfigFile - } +private class UpdateJavadoc( + project: Project, + docsSourceFolder: Path, + repository: Repository, + logger: Logger +) : UpdateDocumentation(project, docsSourceFolder, repository, logger) { + + override val docsDestinationFolder: String + get() = "reference" + override val toolName: String + get() = "Javadoc" +} - /** Executes a command in the project [rootFolder]. */ - private fun execute(vararg command: String): String = Cli(rootFolder).execute(*command) +private class UpdateDokka( + project: Project, + docsSourceFolder: Path, + repository: Repository, + logger: Logger +) : UpdateDocumentation(project, docsSourceFolder, repository, logger) { + + override val docsDestinationFolder: String + get() = "dokka-reference" + override val toolName: String + get() = "Dokka" } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/UpdateGitHubPages.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/UpdateGitHubPages.kt index e3c1e6ce..ba8c2900 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/UpdateGitHubPages.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/UpdateGitHubPages.kt @@ -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. @@ -26,7 +26,9 @@ package io.spine.internal.gradle.github.pages +import dokkaHtmlTask import io.spine.internal.gradle.fs.LazyTempPath +import io.spine.internal.gradle.github.pages.TaskName.copyDokka import io.spine.internal.gradle.github.pages.TaskName.copyJavadoc import io.spine.internal.gradle.github.pages.TaskName.updateGitHubPages import io.spine.internal.gradle.isSnapshot @@ -41,21 +43,24 @@ import org.gradle.api.tasks.TaskContainer import org.gradle.api.tasks.TaskProvider /** - * Registers the `updateGitHubPages` task which performs the update of the GitHub Pages - * with the Javadoc generated for a particular Gradle project. The generated documentation - * is appended to the `spine.io` site via GitHub pages by pushing commits to the `gh-pages` branch. + * Registers the `updateGitHubPages` task which performs the update of the GitHub + * Pages with the documentation generated by Javadoc and Dokka for a particular + * Gradle project. The generated documentation is appended to the `spine.io` site + * via GitHub pages by pushing commits to the `gh-pages` branch. * - * Please note that the update is only performed for the projects which are NOT snapshots. + * Please note that the update is only performed for the projects which are + * NOT snapshots. * - * Users may supply [allowInternalJavadoc][UpdateGitHubPagesExtension.allowInternalJavadoc] option, - * which if `true`, includes the documentation for types marked `@Internal`. - * By default, this option is `false`. + * Users may supply [allowInternalJavadoc][UpdateGitHubPagesExtension.allowInternalJavadoc] + * to configure documentation generated by Javadoc. The documentation for the code + * marked `@Internal` is included when the option is set to `true`. By default, this + * option is `false`. * * Usage: * ``` * updateGitHubPages { * - * // Include `@Internal`-annotated types. + * // Include `@Internal`-annotated code. * allowInternalJavadoc.set(true) * * // Propagate the full path to the local folder of the repository root. @@ -63,25 +68,26 @@ import org.gradle.api.tasks.TaskProvider * } * ``` * - * In order to work, the script needs a `deploy_key_rsa` private RSA key file in the repository - * root. It is recommended to decrypt it in the repository and then decrypt it on CI upon - * publication. Also, the script uses the `FORMAL_GIT_HUB_PAGES_AUTHOR` environment variable to - * set the author email for the commits. The `gh-pages` branch itself should exist before the plugin - * is run. + * In order to work, the script needs a `deploy_key_rsa` private RSA key file in the + * repository root. It is recommended to encrypt it in the repository and then decrypt + * it on CI upon publication. Also, the script uses the `FORMAL_GIT_HUB_PAGES_AUTHOR` + * environment variable to set the author email for the commits. The `gh-pages` + * branch itself should exist before the plugin is run. * * NOTE: when changing the value of "FORMAL_GIT_HUB_PAGES_AUTHOR", one also must change - * the SSH private (encrypted `deploy_key_rsa`) and the public ("GitHub Pages publisher (Travis CI)" - * on GitHub) keys. + * the SSH private (encrypted `deploy_key_rsa`) and the public + * ("GitHub Pages publisher" on GitHub) keys. * - * Another requirement is an environment variable `REPO_SLUG`, which is set by the CI environment, - * such as `Publish` GitHub Actions workflow. It points to the repository for which the update - * is executed. E.g.: + * Another requirement is an environment variable `REPO_SLUG`, which is set by the CI + * environment, such as `Publish` GitHub Actions workflow. It points to the repository + * for which the update is executed. E.g.: * * ``` * REPO_SLUG: SpineEventEngine/base * ``` * - * @see UpdateGitHubPagesExtension for the extension which is used to configure this plugin + * @see UpdateGitHubPagesExtension for the extension which is used to configure + * this plugin */ class UpdateGitHubPages : Plugin { @@ -98,24 +104,25 @@ class UpdateGitHubPages : Plugin { private lateinit var includedInputs: Set /** - * Path to the temp folder used to gather the Javadoc output - * before submitting it to the GitHub Pages update. + * Path to the temp folder used to gather the Javadoc output before submitting it + * to the GitHub Pages update. */ - internal val javadocOutputPath = LazyTempPath("javadoc") + internal val javadocOutputFolder = LazyTempPath("javadoc") /** - * Path to the temp folder used checkout the original GitHub Pages branch. + * Path to the temp folder used to gather the documentation generated by Dokka + * before submitting it to the GitHub Pages update. */ - internal val checkoutTempFolder = LazyTempPath("repoTemp") + internal val dokkaOutputFolder = LazyTempPath("dokka") /** * Applies the plugin to the specified [project]. * * If the project version says it is a snapshot, the plugin registers a no-op task. * - * Even in such a case, the extension object is still created in the given project, to allow - * customization of the parameters in its build script, for later usage when the project - * version changes to non-snapshot. + * Even in such a case, the extension object is still created in the given project + * to allow customization of the parameters in its build script for later usage + * when the project version changes to non-snapshot. */ override fun apply(project: Project) { val extension = UpdateGitHubPagesExtension.createIn(project) @@ -129,32 +136,53 @@ class UpdateGitHubPages : Plugin { } } + /** + * Registers `updateGitHubPages` task which performs no actual update, but prints + * the message telling the update is skipped, since the project is in + * its `SNAPSHOT` version. + */ + private fun Project.registerNoOpTask() { + tasks.register(updateGitHubPages) { + doLast { + val project = this@registerNoOpTask + println( + "GitHub Pages update will be skipped since this project is a snapshot: " + + "`${project.name}-${project.version}`." + ) + } + } + } + private fun Project.registerTasks(extension: UpdateGitHubPagesExtension) { val allowInternalJavadoc = extension.allowInternalJavadoc() rootFolder = extension.rootFolder() includedInputs = extension.includedInputs() + if (!allowInternalJavadoc) { val doclet = ExcludeInternalDoclet(extension.excludeInternalDocletVersion) doclet.registerTaskIn(this) } + tasks.registerCopyJavadoc(allowInternalJavadoc) + tasks.registerCopyDokka() + val updatePagesTask = tasks.registerUpdateTask() updatePagesTask.configure { dependsOn(copyJavadoc) + dependsOn(copyDokka) } } private fun TaskContainer.registerCopyJavadoc(allowInternalJavadoc: Boolean) { - val inputs = composeInputs(allowInternalJavadoc) + val inputs = composeJavadocInputs(allowInternalJavadoc) + register(copyJavadoc, Copy::class.java) { - doLast { - from(*inputs.toTypedArray()) - into(javadocOutputPath) - } + inputs.forEach { from(it) } + into(javadocOutputFolder) } } - private fun TaskContainer.composeInputs(allowInternalJavadoc: Boolean): MutableList { + private fun TaskContainer.composeJavadocInputs(allowInternalJavadoc: Boolean): List { val inputs = mutableListOf() if (allowInternalJavadoc) { inputs.add(javadocTask()) @@ -165,6 +193,26 @@ class UpdateGitHubPages : Plugin { return inputs } + private fun TaskContainer.registerCopyDokka() { + val inputs = composeDokkaInputs() + + register(copyDokka, Copy::class.java) { + inputs.forEach { from(it) } + into(dokkaOutputFolder) + } + } + + private fun TaskContainer.composeDokkaInputs(): List { + val inputs = mutableListOf() + + dokkaHtmlTask()?.let { + inputs.add(it) + } + inputs.addAll(includedInputs) + + return inputs + } + private fun TaskContainer.registerUpdateTask(): TaskProvider { return register(updateGitHubPages) { doLast { @@ -178,25 +226,9 @@ class UpdateGitHubPages : Plugin { } private fun cleanup() { - val folders = listOf(checkoutTempFolder, javadocOutputPath) + val folders = listOf(dokkaOutputFolder, javadocOutputFolder) folders.forEach { it.toFile().deleteRecursively() } } } - -/** - * Registers `updateGitHubPages` task which performs no actual update, but prints the message - * telling the update is skipped, since the project is in its `SNAPSHOT` version. - */ -private fun Project.registerNoOpTask() { - tasks.register(updateGitHubPages) { - doLast { - val project = this@registerNoOpTask - println( - "GitHub Pages update will be skipped since this project is a snapshot: " + - "`${project.name}-${project.version}`." - ) - } - } -} diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/UpdateGitHubPagesExtension.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/UpdateGitHubPagesExtension.kt index ec654fbf..d523d5e9 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/UpdateGitHubPagesExtension.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/github/pages/UpdateGitHubPagesExtension.kt @@ -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. @@ -54,7 +54,8 @@ class UpdateGitHubPagesExtension private constructor( /** - * Tells whether the types marked `@Internal` should be included into the doc generation. + * Tells whether the types marked `@Internal` should be included into + * the doc generation. */ val allowInternalJavadoc: Property, @@ -64,10 +65,11 @@ private constructor( var rootFolder: Property, /** - * The external inputs, which output should be included - * into the GitHub Pages update. + * The external inputs, which output should be included into + * the GitHub Pages update. * - * The values are interpreted according to [org.gradle.api.tasks.Copy.from] specification. + * The values are interpreted according to + * [org.gradle.api.tasks.Copy.from] specification. * * This property is optional. */ @@ -80,8 +82,8 @@ private constructor( * used when updating documentation at GitHub Pages. * * This value is used when adding dependency on the doclet when the plugin tasks - * are registered. Since the doclet dependency is required, its value passed as a parameter for - * the extension, rather than a property. + * are registered. Since the doclet dependency is required, its value passed as + * a parameter for the extension, rather than a property. */ internal lateinit var excludeInternalDocletVersion: String @@ -104,23 +106,24 @@ private constructor( } /** - * Returns `true` if the `@Internal`-annotated types should be included into the generated - * documentation, `false` otherwise. + * Returns `true` if the `@Internal`-annotated code should be included into the + * generated documentation, `false` otherwise. */ fun allowInternalJavadoc(): Boolean { return allowInternalJavadoc.get() } /** - * Returns the local root folder of the repository, to which the handled Gradle Project belongs. + * Returns the local root folder of the repository, to which the handled Gradle + * Project belongs. */ fun rootFolder(): File { return rootFolder.get() } /** - * Returns the external inputs, which results should be included - * into the GitHub Pages update. + * Returns the external inputs, which results should be included into the + * GitHub Pages update. */ fun includedInputs(): Set { return includeInputs.get() diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/java/Tasks.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/java/Tasks.kt index 8f2344fe..3e0aad9d 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/java/Tasks.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/java/Tasks.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javac/ErrorProne.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javac/ErrorProne.kt index df31e581..1489c089 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javac/ErrorProne.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javac/ErrorProne.kt @@ -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. @@ -82,6 +82,7 @@ private object ErrorProneConfig { "-Xep:CheckReturnValue:OFF", "-Xep:FloggerSplitLogStatement:OFF", + "-Xep:FloggerLogString:OFF" ) } } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javac/Javac.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javac/Javac.kt index 839252d6..de026874 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javac/Javac.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javac/Javac.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/Encoding.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/Encoding.kt index f7129683..bf8601b9 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/Encoding.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/Encoding.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/ExcludeInternalDoclet.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/ExcludeInternalDoclet.kt index 72d7f6a1..4d5702bf 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/ExcludeInternalDoclet.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/ExcludeInternalDoclet.kt @@ -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. @@ -26,6 +26,7 @@ package io.spine.internal.gradle.javadoc +import io.spine.internal.dependency.Spine import io.spine.internal.gradle.javadoc.ExcludeInternalDoclet.Companion.taskName import io.spine.internal.gradle.sourceSets import org.gradle.api.Project @@ -36,9 +37,13 @@ import org.gradle.external.javadoc.StandardJavadocDocletOptions /** * The doclet which removes Javadoc for `@Internal` things in the Java code. */ -class ExcludeInternalDoclet(val version: String) { +@Suppress("ConstPropertyName") +class ExcludeInternalDoclet( + @Deprecated("`Spine.ArtifactVersion.javadocTools` is used instead.") + val version: String = Spine.ArtifactVersion.javadocTools +) { - private val dependency = "io.spine.tools:spine-javadoc-filter:${version}" + private val dependency = Spine.javadocFilter companion object { diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/JavadocConfig.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/JavadocConfig.kt index f6002cad..debd78d3 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/JavadocConfig.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/JavadocConfig.kt @@ -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. @@ -43,9 +43,9 @@ object JavadocConfig { /** * Link to the documentation for Java 11 Standard Library API. * - * OpenJDK SE 11 is used for the reference. + * Oracle JDK SE 11 is used for the reference. */ - private const val standardLibraryAPI = "https://cr.openjdk.java.net/~iris/se/11/latestSpec/api/" + private const val standardLibraryAPI = "https://docs.oracle.com/en/java/javase/11/docs/api/" @Suppress("MemberVisibilityCanBePrivate") // opened to be visible from docs. val tags = listOf( diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/JavadocTag.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/JavadocTag.kt index 2a278bd9..8eb8b17c 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/JavadocTag.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/JavadocTag.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/TaskContainerExtensions.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/TaskContainerExtensions.kt index f80d53ee..3897118c 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/TaskContainerExtensions.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javadoc/TaskContainerExtensions.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/JsContext.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/JsContext.kt index 8754173f..75cd4011 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/JsContext.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/JsContext.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/JsEnvironment.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/JsEnvironment.kt index f2d10aca..bce4fa8f 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/JsEnvironment.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/JsEnvironment.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/JsExtension.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/JsExtension.kt index 4fe1d3ff..22ebf521 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/JsExtension.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/JsExtension.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/Idea.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/Idea.kt index 51d312c8..5e51155a 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/Idea.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/Idea.kt @@ -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. @@ -49,7 +49,7 @@ fun JsPlugins.idea() { module { sourceDirs.add(srcDir) - testSourceDirs.add(testSrcDir) + testSources.from(testSrcDir) excludeDirs.addAll( listOf( diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/JsPlugins.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/JsPlugins.kt index 6a17820d..60a088a9 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/JsPlugins.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/JsPlugins.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/McJs.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/McJs.kt index 56b1263a..61e59d56 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/McJs.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/McJs.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/Protobuf.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/Protobuf.kt index d99d2a28..c50ddd9e 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/Protobuf.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/plugin/Protobuf.kt @@ -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. @@ -26,11 +26,8 @@ package io.spine.internal.gradle.javascript.plugin -import com.google.protobuf.gradle.builtins -import com.google.protobuf.gradle.generateProtoTasks +import com.google.protobuf.gradle.ProtobufExtension import com.google.protobuf.gradle.id -import com.google.protobuf.gradle.protobuf -import com.google.protobuf.gradle.protoc import com.google.protobuf.gradle.remove import io.spine.internal.dependency.Protobuf @@ -50,7 +47,8 @@ fun JsPlugins.protobuf() { apply(Protobuf.GradlePlugin.id) } - project.protobuf { + val protobufExt = project.extensions.getByType(ProtobufExtension::class.java) + protobufExt.apply { generatedFilesBaseDir = projectDir.path diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Assemble.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Assemble.kt index dbc770df..47393076 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Assemble.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Assemble.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Check.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Check.kt index 4fdd69f9..c15f3e23 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Check.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Check.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Clean.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Clean.kt index 6658b830..46805917 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Clean.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Clean.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/IntegrationTest.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/IntegrationTest.kt index fadcc09c..cf94995d 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/IntegrationTest.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/IntegrationTest.kt @@ -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. @@ -26,10 +26,10 @@ package io.spine.internal.gradle.javascript.task +import io.spine.internal.gradle.TaskName import io.spine.internal.gradle.base.build import io.spine.internal.gradle.named import io.spine.internal.gradle.register -import io.spine.internal.gradle.TaskName import org.gradle.api.Task import org.gradle.api.tasks.TaskContainer import org.gradle.api.tasks.TaskProvider @@ -74,6 +74,7 @@ val TaskContainer.integrationTest: TaskProvider * } * ``` */ +@Suppress("unused") fun JsTasks.integrationTest() { linkSpineWebModule() diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/JsTasks.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/JsTasks.kt index b384fd3a..b13d996d 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/JsTasks.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/JsTasks.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/LicenseReport.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/LicenseReport.kt index 99935edd..2a868d4a 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/LicenseReport.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/LicenseReport.kt @@ -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. @@ -54,6 +54,7 @@ import org.gradle.api.tasks.TaskProvider * } * ``` */ +@Suppress("unused") fun JsTasks.licenseReport() { npmLicenseReport().also { generateLicenseReport.configure { diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Publish.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Publish.kt index 486d831c..01a67f5c 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Publish.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Publish.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Webpack.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Webpack.kt index cbf3aaef..99da3f1d 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Webpack.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/javascript/task/Webpack.kt @@ -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. @@ -26,9 +26,9 @@ package io.spine.internal.gradle.javascript.task +import io.spine.internal.gradle.TaskName import io.spine.internal.gradle.named import io.spine.internal.gradle.register -import io.spine.internal.gradle.TaskName import org.gradle.api.tasks.Copy import org.gradle.api.tasks.TaskContainer import org.gradle.api.tasks.TaskProvider @@ -63,6 +63,7 @@ import org.gradle.api.tasks.TaskProvider * } * ``` */ +@Suppress("unused") fun JsTasks.webpack() { assembleJs.configure { @@ -92,6 +93,7 @@ private val copyBundledJsName = TaskName.of("copyBundledJs", Copy::class) * * The task copies bundled JavaScript sources to the publication directory. */ +@Suppress("unused") val TaskContainer.copyBundledJs: TaskProvider get() = named(copyBundledJsName) diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/kotlin/KotlinConfig.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/kotlin/KotlinConfig.kt index 05bafcb0..b2964cee 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/kotlin/KotlinConfig.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/kotlin/KotlinConfig.kt @@ -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. @@ -27,7 +27,6 @@ package io.spine.internal.gradle.kotlin import org.gradle.jvm.toolchain.JavaLanguageVersion -import org.gradle.jvm.toolchain.JavaToolchainSpec import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension import org.jetbrains.kotlin.gradle.tasks.KotlinCompile @@ -37,7 +36,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile */ fun KotlinJvmProjectExtension.applyJvmToolchain(version: Int) { jvmToolchain { - (this as JavaToolchainSpec).languageVersion.set(JavaLanguageVersion.of(version)) + languageVersion.set(JavaLanguageVersion.of(version)) } } @@ -52,13 +51,19 @@ fun KotlinJvmProjectExtension.applyJvmToolchain(version: String) = /** * Opts-in to experimental features that we use in our codebase. */ +@Suppress("unused") fun KotlinCompile.setFreeCompilerArgs() { kotlinOptions { freeCompilerArgs = listOf( "-Xskip-prerelease-check", "-Xjvm-default=all", - "-Xopt-in=kotlin.contracts.ExperimentalContracts", - "-Xopt-in=kotlin.ExperimentalStdlibApi" + "-Xinline-classes", + "-opt-in=" + + "kotlin.contracts.ExperimentalContracts," + + "kotlin.io.path.ExperimentalPathApi," + + "kotlin.ExperimentalUnsignedTypes," + + "kotlin.ExperimentalStdlibApi," + + "kotlin.experimental.ExperimentalTypeInference", ) } } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/protobuf/ProtoTaskExtensions.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/protobuf/ProtoTaskExtensions.kt new file mode 100644 index 00000000..a3bc6dc5 --- /dev/null +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/protobuf/ProtoTaskExtensions.kt @@ -0,0 +1,295 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Redistribution and use in source and/or binary forms, with or without + * modification, must retain the above copyright notice and the following + * disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package io.spine.internal.gradle.protobuf + +import com.google.protobuf.gradle.GenerateProtoTask +import io.spine.internal.gradle.sourceSets +import java.io.File +import org.gradle.api.Project +import org.gradle.api.file.SourceDirectorySet +import org.gradle.api.tasks.SourceSet +import org.gradle.configurationcache.extensions.capitalized +import org.gradle.kotlin.dsl.get +import org.gradle.plugins.ide.idea.GenerateIdeaModule +import org.gradle.plugins.ide.idea.model.IdeaModel +import org.gradle.plugins.ide.idea.model.IdeaModule +import org.jetbrains.kotlin.gradle.dsl.KotlinCompile + +/** + * Obtains the name of the `generated` directory under the project root directory. + */ +private val Project.generatedDir: String + get() = "${projectDir}/generated" + +/** + * Obtains the `generated` directory for the source set of the task. + * + * If [language] is specified returns the subdirectory for this language. + */ +private fun GenerateProtoTask.generatedDir(language: String = ""): File { + val path = "${project.generatedDir}/${sourceSet.name}/$language" + return File(path) +} + +/** + * Configures protobuf code generation task for the code which cannot use Spine Model Compiler + * (e.g. the `base` project). + * + * The task configuration consists of the following steps: + * + * 1. Adding `"kotlin"` to the list of involved `protoc` builtins. + * + * 2. Generation of descriptor set file is turned on for each source set. + * These files are placed under the `build/descriptors` directory. + * + * 3. Removing source code generated for `com.google` package for both Java and Kotlin. + * This is done at the final steps of the code generation. + * + * 4. Making `processResource` tasks depend on corresponding `generateProto` tasks. + * If the source set of the configured task isn't `main`, appropriate infix for + * the task names is used. + * + * The usage of this extension in a module build file would be: + * ``` + * protobuf { + * generateProtoTasks { + * for (task in all()) { + * task.setup() + * } + * } + * } + * ``` + * Using the same code under `subprojects` in a root build file does not seem to work because + * test descriptor set files are not copied to resources. Performing this configuration from + * a module build script solves the issue. + * + * IMPORTANT: In addition to calling `setup`, a submodule must contain a descriptor set reference + * file (`desc.ref`) files placed under `resources`. The descriptor reference file must contain + * a reference to the descriptor set file generated by the corresponding `GenerateProtoTask`. + * + * For example, for the `test` source set, the reference would be `known_types_test.desc`, and + * for the `main` source set, the reference would be `known_types_main.desc`. + * + * See `io.spine.code.proto.DescriptorReference` and `io.spine.code.proto.FileDescriptors` classes + * under the `base` project for more details. + */ +@Suppress("unused") +fun GenerateProtoTask.setup() { + builtins.maybeCreate("kotlin") + setupDescriptorSetFileCreation() + doLast { + copyGeneratedFiles() + } + excludeProtocOutput() + setupKotlinCompile() + dependOnProcessResourcesTask() + configureIdeaDirs() +} + +/** + * Tell `protoc` to generate descriptor set files under the project build dir. + */ +private fun GenerateProtoTask.setupDescriptorSetFileCreation() { + // Tell `protoc` generate descriptor set file. + val ssn = sourceSet.name + generateDescriptorSet = true + val descriptorsDir = "${project.buildDir}/descriptors/${ssn}" + with(descriptorSetOptions) { + path = "$descriptorsDir/known_types_${ssn}.desc" + includeImports = true + includeSourceInfo = true + } + // Make the descriptor set file included into the resources. + project.sourceSets.named(ssn) { + resources.srcDirs(descriptorsDir) + } +} + +/** + * Copies files from the [outputBaseDir][GenerateProtoTask.outputBaseDir] into + * a subdirectory of [generatedDir][Project.generatedDir] for + * the current [sourceSet][GenerateProtoTask.sourceSet]. + * + * Also removes sources belonging to the `com.google` package in the target directory. + */ +private fun GenerateProtoTask.copyGeneratedFiles() { + project.copy { + from(outputBaseDir) + into(generatedDir()) + } + deleteComGoogle("java") + deleteComGoogle("kotlin") +} + +/** + * Remove the code generated for Google Protobuf library types. + * + * Java code for the `com.google` package was generated because we wanted + * to have descriptors for all the types, including those from Google Protobuf library. + * We want all the descriptors so that they are included into the resources used by + * the `io.spine.type.KnownTypes` class. + * + * Now, as we have the descriptors _and_ excessive Java or Kotlin code, we delete it to avoid + * classes that duplicate those coming from Protobuf library JARs. + */ +private fun GenerateProtoTask.deleteComGoogle(language: String) { + val comDirectory = generatedDir(language).resolve("com") + val googlePackage = comDirectory.resolve("google") + + project.delete(googlePackage) + + // If the `com` directory becomes empty, delete it too. + if (comDirectory.exists() && comDirectory.isDirectory && comDirectory.list()!!.isEmpty()) { + project.delete(comDirectory) + } +} + +/** + * Exclude [GenerateProtoTask.outputBaseDir] from Java source set directories to avoid + * duplicated source code files. + */ +private fun GenerateProtoTask.excludeProtocOutput() { + val protocOutputDir = File(outputBaseDir).parentFile + val java: SourceDirectorySet = sourceSet.java + + // Filter out directories belonging to `build/generated/source/proto`. + val newSourceDirectories = java.sourceDirectories + .filter { !it.residesIn(protocOutputDir) } + .toSet() + java.setSrcDirs(listOf()) + java.srcDirs(newSourceDirectories) + + // Add copied files to the Java source set. + java.srcDir(generatedDir("java")) + java.srcDir(generatedDir("kotlin")) +} + +/** + * Make sure Kotlin compilation explicitly depends on this `GenerateProtoTask` to avoid racing. + */ +private fun GenerateProtoTask.setupKotlinCompile() { + val kotlinCompile = project.kotlinCompileFor(sourceSet) + kotlinCompile?.dependsOn(this) +} + +/** + * Make the tasks `processResources` depend on `generateProto` tasks explicitly so that: + * 1) Descriptor set files get into resources, avoiding the racing conditions + * during the build. + * + * 2) We don't have the warning "Execution optimizations have been disabled..." issued + * by Gradle during the build because Protobuf Gradle Plugin does not set + * dependencies between `generateProto` and `processResources` tasks. + */ +private fun GenerateProtoTask.dependOnProcessResourcesTask() { + val processResources = processResourceTaskName(sourceSet.name) + project.tasks[processResources].dependsOn(this) +} + +/** + * Obtains the name of the `processResource` task for the given source set name. + */ +private fun processResourceTaskName(sourceSetName: String): String { + val infix = if (sourceSetName == "main") "" else sourceSetName.capitalized() + return "process${infix}Resources" +} + +/** + * Attempts to obtain the Kotlin compilation Gradle task for the given source set. + * + * Typically, the task is named by a pattern: `compileKotlin`, or just + * `compileKotlin` if the source set name is `"main"`. If the task does not fit this described + * pattern, this method will not find it. + */ +private fun Project.kotlinCompileFor(sourceSet: SourceSet): KotlinCompile<*>? { + val taskName = sourceSet.getCompileTaskName("Kotlin") + return tasks.findByName(taskName) as KotlinCompile<*>? +} + +private fun File.residesIn(directory: File): Boolean = + canonicalFile.startsWith(directory.absolutePath) + +private fun GenerateProtoTask.configureIdeaDirs() = project.plugins.withId("idea") { + val module = project.extensions.findByType(IdeaModel::class.java)!!.module + + // Make IDEA forget about sources under `outputBaseDir`. + val protocOutputDir = File(outputBaseDir).parentFile + module.generatedSourceDirs.removeIf { dir -> + dir.residesIn(protocOutputDir) + } + + module.sourceDirs.removeIf { dir -> + dir.residesIn(protocOutputDir) + } + + val javaDir = generatedDir("java") + val kotlinDir = generatedDir("kotlin") + + // As advised by `Utils.groovy` from Protobuf Gradle plugin: + // This is required because the IntelliJ IDEA plugin does not allow adding source directories + // that do not exist. The IntelliJ IDEA config files should be valid from the start even if + // a user runs './gradlew idea' before running './gradlew generateProto'. + project.tasks.withType(GenerateIdeaModule::class.java).forEach { + it.doFirst { + javaDir.mkdirs() + kotlinDir.mkdirs() + } + } + + if (isTest) { + module.testSources.run { + from(javaDir) + from(kotlinDir) + } + } else { + module.sourceDirs.run { + add(javaDir) + add(kotlinDir) + } + } + + module.generatedSourceDirs.run { + add(javaDir) + add(kotlinDir) + } +} + +/** + * Prints diagnostic output of `sourceDirs` and `generatedSourceDirs` of an [IdeaModule]. + * + * The warning `"unused"` is suppressed because this function is not used in + * the production mode. + */ +@Suppress("unused") +private fun IdeaModule.printSourceDirectories() { + println("**** [IDEA] Source directories:") + sourceDirs.forEach { println(it) } + println() + println("**** [IDEA] Generated source directories:") + generatedSourceDirs.forEach { println(it) } + println() +} diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/Artifacts.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/Artifacts.kt deleted file mode 100644 index 81acb3ae..00000000 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/Artifacts.kt +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package io.spine.internal.gradle.publish - -import io.spine.internal.gradle.sourceSets -import org.gradle.api.Project -import org.gradle.api.file.FileTreeElement -import org.gradle.api.tasks.TaskContainer -import org.gradle.api.tasks.TaskProvider -import org.gradle.api.tasks.bundling.Jar -import org.gradle.kotlin.dsl.get -import org.gradle.kotlin.dsl.named -import org.gradle.kotlin.dsl.register -import org.gradle.kotlin.dsl.withType - -/** - * Excludes Google `.proto` sources from all artifacts. - * - * Goes through all registered `Jar` tasks and filters out Google's files. - */ -@Suppress("unused") -fun TaskContainer.excludeGoogleProtoFromArtifacts() { - withType().configureEach { - exclude { it.isGoogleProtoSource() } - } -} - -/** - * Checks if the given file belongs to the Google `.proto` sources. - */ -private fun FileTreeElement.isGoogleProtoSource(): Boolean { - val pathSegments = relativePath.segments - return pathSegments.isNotEmpty() && pathSegments[0].equals("google") -} - -/** - * Locates or creates `sourcesJar` task in this [Project]. - * - * The output of this task is a `jar` archive. The archive contains sources from `main` source set. - * The task makes sure that sources from the directories below will be included into - * a resulted archive: - * - * - Kotlin - * - Java - * - Proto - * - * Java and Kotlin sources are default to `main` source set since it is created by `java` plugin. - * For Proto sources to be included – [special treatment][protoSources] is needed. - */ -internal fun Project.sourcesJar() = tasks.getOrCreate("sourcesJar") { - archiveClassifier.set("sources") - from(sourceSets["main"].allSource) // Puts Java and Kotlin sources. - from(protoSources()) // Puts Proto sources. -} - -/** - * Locates or creates `protoJar` task in this [Project]. - * - * The output of this task is a `jar` archive. The archive contains only - * [Proto sources][protoSources] from `main` source set. - */ -internal fun Project.protoJar() = tasks.getOrCreate("protoJar") { - archiveClassifier.set("proto") - from(protoSources()) -} - -/** - * Locates or creates `testJar` task in this [Project]. - * - * The output of this task is a `jar` archive. The archive contains compilation output - * of `test` source set. - */ -internal fun Project.testJar() = tasks.getOrCreate("testJar") { - archiveClassifier.set("test") - from(sourceSets["test"].output) -} - -/** - * Locates or creates `javadocJar` task in this [Project]. - * - * The output of this task is a `jar` archive. The archive contains Javadoc, - * generated upon Java sources from `main` source set. If javadoc for Kotlin is also needed, - * apply Dokka plugin. It tunes `javadoc` task to generate docs upon Kotlin sources as well. - */ -internal fun Project.javadocJar() = tasks.getOrCreate("javadocJar") { - archiveClassifier.set("javadoc") - from(files("$buildDir/docs/javadoc")) - dependsOn("javadoc") -} - -private fun TaskContainer.getOrCreate(name: String, init: Jar.() -> Unit): TaskProvider = - if (names.contains(name)) { - named(name) - } else { - register(name) { - init() - } - } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/CheckVersionIncrement.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/CheckVersionIncrement.kt index aa4da982..a81cbdcd 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/CheckVersionIncrement.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/CheckVersionIncrement.kt @@ -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. @@ -56,7 +56,7 @@ open class CheckVersionIncrement : DefaultTask() { val version: String = project.version as String @TaskAction - private fun fetchAndCheck() { + fun fetchAndCheck() { val artifact = "${project.artifactPath()}/${MavenMetadata.FILE_NAME}" checkInRepo(repository.snapshots, artifact) @@ -119,7 +119,7 @@ private data class MavenMetadata(var versioning: Versioning = Versioning()) { return try { val metadata = mapper.readValue(url, MavenMetadata::class.java) metadata - } catch (e: FileNotFoundException) { + } catch (ignored: FileNotFoundException) { null } } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/CloudArtifactRegistry.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/CloudArtifactRegistry.kt index 143ea25c..4751d560 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/CloudArtifactRegistry.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/CloudArtifactRegistry.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/CloudRepo.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/CloudRepo.kt index 48cd8585..148ebce9 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/CloudRepo.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/CloudRepo.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/GitHubPackages.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/GitHubPackages.kt index 3d5518d8..fef06821 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/GitHubPackages.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/GitHubPackages.kt @@ -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. @@ -28,6 +28,7 @@ package io.spine.internal.gradle.publish import io.spine.internal.gradle.Credentials import io.spine.internal.gradle.Repository +import net.lingala.zip4j.ZipFile import org.gradle.api.Project /** @@ -73,22 +74,31 @@ private fun Project.credentialsWithToken(githubActor: String) = Credentials( private fun Project.readGitHubToken(): String { val githubToken: String? = System.getenv("GITHUB_TOKEN") return if (githubToken.isNullOrEmpty()) { - // Use the personal access token for the `developers@spine.io` account. - // Only has the permission to read public GitHub packages. - val targetDir = "${buildDir}/token" - file(targetDir).mkdirs() - val fileToUnzip = "${rootDir}/buildSrc/aus.weis" - - logger.info("GitHub Packages: reading token " + - "by unzipping `$fileToUnzip` into `$targetDir`.") - exec { - // Unzip with password "123", allow overriding, quietly, - // into the target dir, the given archive. - commandLine("unzip", "-P", "123", "-oq", "-d", targetDir, fileToUnzip) - } - val file = file("$targetDir/token.txt") - file.readText() + readTokenFromArchive() } else { githubToken } } + +/** + * Read the personal access token for the `developers@spine.io` account which + * has only the permission to read public GitHub packages. + * + * The token is extracted from the archive called `aus.weis` stored under `buildSrc`. + * The archive has such an unusual name to avoid scanning for tokens placed in repositories + * which is performed by GitHub. Since we do not violate any security, it is OK to + * use such a workaround. + */ +private fun Project.readTokenFromArchive(): String { + val targetDir = "${buildDir}/token" + file(targetDir).mkdirs() + val fileToUnzip = "${rootDir}/buildSrc/aus.weis" + + logger.info( + "GitHub Packages: reading token by unzipping `$fileToUnzip` into `$targetDir`." + ) + ZipFile(fileToUnzip, "123".toCharArray()).extractAll(targetDir) + val file = file("$targetDir/token.txt") + val result = file.readText() + return result +} diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/IncrementGuard.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/IncrementGuard.kt index 0423ee08..b97a5ee5 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/IncrementGuard.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/IncrementGuard.kt @@ -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. @@ -73,20 +73,36 @@ class IncrementGuard : Plugin { * to a feature branch. * * Returns `false` if the associated reference is not a branch (e.g. a tag) or if it has - * the name which ends with `master`. So, on branches such as `master` and `2.x-jdk8-master` - * this method would return `false`. + * the name which ends with `master` or `main`. + * + * For example, on the following branches the method would return `false`: + * + * 1. `master`. + * 2. `main`. + * 3. `2.x-jdk8-master`. + * 4. `2.x-jdk8-main`. * * @see * List of default environment variables provided for GitHub Actions builds */ private fun shouldCheckVersion(): Boolean { - val eventName = System.getenv("GITHUB_EVENT_NAME") - if ("push" != eventName) { + val event = System.getenv("GITHUB_EVENT_NAME") + val reference = System.getenv("GITHUB_REF") + if (event != "push" || reference == null) { return false } - val reference = System.getenv("GITHUB_REF") ?: return false - val matches = Regex("refs/heads/(.+)").matchEntire(reference) ?: return false - val branch = matches.groupValues[1] - return !branch.endsWith("master") + val branch = branchName(reference) + return when { + branch == null -> false + branch.endsWith("master") -> false + branch.endsWith("main") -> false + else -> true + } + } + + private fun branchName(gitHubRef: String): String? { + val matches = Regex("refs/heads/(.+)").matchEntire(gitHubRef) + val branch = matches?.let { it.groupValues[1] } + return branch } } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/JarDsl.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/JarDsl.kt new file mode 100644 index 00000000..2bc28703 --- /dev/null +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/JarDsl.kt @@ -0,0 +1,167 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Redistribution and use in source and/or binary forms, with or without + * modification, must retain the above copyright notice and the following + * disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package io.spine.internal.gradle.publish + +/** + * A DSL element of [SpinePublishing] extension which configures publishing of + * [dokkaKotlinJar] artifact. + * + * This artifact contains Dokka-generated documentation. By default, it is not published. + * + * Take a look at the [SpinePublishing.dokkaJar] for a usage example. + * + * @see [artifacts] + */ +class DokkaJar { + /** + * Enables publishing `JAR`s with Dokka-generated documentation for all published modules. + */ + @Suppress("unused") + @Deprecated("Please use `kotlin` and `java` flags instead.") + var enabled = false + + /** + * Controls whether [dokkaKotlinJar] artifact should be published. + * The default value is `true`. + */ + var kotlin = true + + /** + * Controls whether [dokkaJavaJar] artifact should be published. + * The default value is `false`. + */ + var java = false +} + +/** + * A DSL element of [SpinePublishing] extension which allows enabling publishing + * of [testJar] artifact. + * + * This artifact contains compilation output of `test` source set. By default, it is not published. + * + * Take a look on [SpinePublishing.testJar] for a usage example. + + * @see [artifacts] + */ +class TestJar { + + /** + * Set of modules, for which a test JAR will be published. + */ + var inclusions: Set = emptySet() + + /** + * Enables test JAR publishing for all published modules. + */ + var enabled = false +} + +/** + * A DSL element of [SpinePublishing] extension which allows disabling publishing + * of [protoJar] artifact. + * + * This artifact contains all the `.proto` definitions from `sourceSets.main.proto`. By default, + * it is published. + * + * Take a look on [SpinePublishing.protoJar] for a usage example. + * + * @see [artifacts] + */ +class ProtoJar { + + /** + * Set of modules, for which a proto JAR will not be published. + */ + var exclusions: Set = emptySet() + + /** + * Disables proto JAR publishing for all published modules. + */ + var disabled = false +} + +/** + * Flags for turning optional JAR artifacts in a project. + */ +internal data class JarFlags( + + /** + * Tells whether [sourcesJar] artifact should be published. + * + * Default value is `true`. + */ + val sourcesJar: Boolean = true, + + /** + * Tells whether [javadocJar] artifact should be published. + * + * Default value is `true`. + */ + val javadocJar: Boolean = true, + + /** + * Tells whether [protoJar] artifact should be published. + */ + val publishProtoJar: Boolean, + + /** + * Tells whether [testJar] artifact should be published. + */ + val publishTestJar: Boolean, + + /** + * Tells whether [dokkaKotlinJar] artifact should be published. + */ + val publishDokkaKotlinJar: Boolean, + + /** + * Tells whether [dokkaJavaJar] artifact should be published. + */ + val publishDokkaJavaJar: Boolean +) { + internal companion object { + /** + * Creates an instance of [JarFlags] for the project with the given name, + * taking the setup parameters from JAR DSL elements. + */ + fun create( + projectName: String, + protoJar: ProtoJar, + testJar: TestJar, + dokkaJar: DokkaJar + ): JarFlags { + val addProtoJar = (protoJar.exclusions.contains(projectName) || protoJar.disabled).not() + val addTestJar = testJar.inclusions.contains(projectName) || testJar.enabled + return JarFlags( + sourcesJar = true, + javadocJar = true, + addProtoJar, addTestJar, + dokkaJar.kotlin, dokkaJar.java + ) + } + } +} diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/MavenJavaPublication.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/MavenJavaPublication.kt deleted file mode 100644 index cb5fa2f0..00000000 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/MavenJavaPublication.kt +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package io.spine.internal.gradle.publish - -import io.spine.internal.gradle.Repository -import io.spine.internal.gradle.isSnapshot -import org.gradle.api.Project -import org.gradle.api.artifacts.dsl.RepositoryHandler -import org.gradle.api.publish.PublishingExtension -import org.gradle.api.publish.maven.MavenPublication -import org.gradle.api.tasks.TaskProvider -import org.gradle.api.tasks.bundling.Jar -import org.gradle.kotlin.dsl.create -import org.gradle.kotlin.dsl.get -import org.gradle.kotlin.dsl.getByType - -/** - * A publication for a typical Java project. - * - * In Gradle, in order to publish something somewhere one should create a publication. - * A publication has a name and consists of one or more artifacts plus information about - * those artifacts – the metadata. - * - * An instance of this class represents [MavenPublication] named "mavenJava". It is generally - * accepted that a publication with this name contains a Java project published to one or - * more Maven repositories. - * - * By default, only a jar with the compilation output of `main` source set and its - * metadata files are published. Other artifacts are specified through the - * [constructor parameter][jars]. Please, take a look on [specifyArtifacts] for additional info. - * - * See: [Maven Publish Plugin | Publications](https://docs.gradle.org/current/userguide/publishing_maven.html#publishing_maven:publications) - * - * @param artifactId a name that a project is known by. - * @param jars list of artifacts to be published along with the compilation output. - * @param destinations Maven repositories to which the produced artifacts will be sent. - */ -internal class MavenJavaPublication( - private val artifactId: String, - private val jars: Set>, - private val destinations: Set, -) { - - /** - * Registers this publication in the given project. - * - * The only prerequisite for the project is to have `maven-publish` plugin applied. - */ - fun registerIn(project: Project) { - createPublication(project) - registerDestinations(project) - } - - /** - * Creates a new "mavenJava" [MavenPublication] in the given project. - */ - private fun createPublication(project: Project) { - val gradlePublishing = project.extensions.getByType() - val gradlePublications = gradlePublishing.publications - gradlePublications.create("mavenJava") { - specifyMavenCoordinates(project) - specifyArtifacts(project) - } - } - - private fun MavenPublication.specifyMavenCoordinates(project: Project) { - groupId = project.group.toString() - artifactId = this@MavenJavaPublication.artifactId - version = project.version.toString() - } - - /** - * Specifies which artifacts this [MavenPublication] will contain. - * - * A typical Maven publication contains: - * - * 1. Jar archives. For example: compilation output, sources, javadoc, etc. - * 2. Maven metadata file that has ".pom" extension. - * 3. Gradle metadata file that has ".module" extension. - * - * Metadata files contain information about a publication itself, its artifacts and their - * dependencies. Presence of ".pom" file is mandatory for publication to be consumed by - * `mvn` build tool itself or other build tools that understand Maven notation (Gradle, Ivy). - * Presence of ".module" is optional, but useful when a publication is consumed by Gradle. - * - * See: [Maven – POM Reference](https://maven.apache.org/pom.html) - * [Understanding Gradle Module Metadata](https://docs.gradle.org/current/userguide/publishing_gradle_module_metadata.html) - */ - private fun MavenPublication.specifyArtifacts(project: Project) { - - // "java" component provides a jar with compilation output of "main" source set. - // It is NOT defined as another `Jar` task intentionally. Doing that will leave the - // publication without correct ".pom" and ".module" metadata files generated. - from(project.components["java"]) - - // Other artifacts are represented by `Jar` tasks. Those artifacts don't bring any other - // metadata in comparison with `Component` (such as dependencies notation). - jars.forEach { - artifact(it) - } - } - - /** - * Goes through the [destinations] and registers each as a repository for publishing - * in the given Gradle project. - */ - private fun registerDestinations(project: Project) { - val gradlePublishing = project.extensions.getByType() - val isSnapshot = project.version.toString().isSnapshot() - val gradleRepositories = gradlePublishing.repositories - destinations.forEach { destination -> - gradleRepositories.register(destination, isSnapshot, project) - } - } - - private fun RepositoryHandler.register( - repository: Repository, - isSnapshot: Boolean, - project: Project - ) { - val target = if (isSnapshot) repository.snapshots else repository.releases - val credentials = repository.credentials(project.rootProject) - maven { - url = project.uri(target) - credentials { - username = credentials?.username - password = credentials?.password - } - } - } -} diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/ProtoLocators.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/ProtoExts.kt similarity index 54% rename from buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/ProtoLocators.kt rename to buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/ProtoExts.kt index ef048f2b..97e33197 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/ProtoLocators.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/ProtoExts.kt @@ -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. @@ -29,9 +29,10 @@ package io.spine.internal.gradle.publish import io.spine.internal.gradle.sourceSets import java.io.File import org.gradle.api.Project +import org.gradle.api.Task +import org.gradle.api.file.FileTreeElement import org.gradle.api.file.SourceDirectorySet -import org.gradle.kotlin.dsl.get - +import org.gradle.api.tasks.bundling.Jar /** * Tells whether there are any Proto sources in "main" source set. @@ -43,13 +44,46 @@ internal fun Project.hasProto(): Boolean { } /** - * Locates Proto sources in "main" source set. + * Locates directories with proto sources under the "main" source sets. * - * "main" source set is added by `java` plugin. Special treatment for Proto sources is needed, - * because they are not Java-related, and, thus, not included in `sourceSets["main"].allSource`. + * Special treatment for Proto sources is needed, because they are not Java-related, and, + * thus, not included in `sourceSets["main"].allSource`. */ internal fun Project.protoSources(): Set { - val mainSourceSet = sourceSets["main"] - val protoSourceDirs = mainSourceSet.extensions.findByName("proto") as SourceDirectorySet? - return protoSourceDirs?.srcDirs ?: emptySet() + val mainSourceSets = sourceSets.filter { + ss -> ss.name.endsWith("main", ignoreCase = true) + } + + val protoExtensions = mainSourceSets.mapNotNull { + it.extensions.findByName("proto") as SourceDirectorySet? + } + + val protoDirs = mutableSetOf() + protoExtensions.forEach { + protoDirs.addAll(it.srcDirs) + } + + return protoDirs +} + +/** + * Checks if the given file belongs to the Google `.proto` sources. + */ +internal fun FileTreeElement.isGoogleProtoSource(): Boolean { + val pathSegments = relativePath.segments + return pathSegments.isNotEmpty() && pathSegments[0].equals("google") +} + +/** + * The reference to the `generateProto` task of a `main` source set. + */ +internal fun Project.generateProto(): Task? = tasks.findByName("generateProto") + +/** + * Makes this [Jar] task depend on the [generateProto] task, if it exists in the same project. + */ +internal fun Jar.dependOnGenerateProto() { + project.generateProto()?.let { + this.dependsOn(it) + } } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/Publications.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/Publications.kt new file mode 100644 index 00000000..be3bc0ef --- /dev/null +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/Publications.kt @@ -0,0 +1,212 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Redistribution and use in source and/or binary forms, with or without + * modification, must retain the above copyright notice and the following + * disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package io.spine.internal.gradle.publish + +import io.spine.internal.gradle.Repository +import io.spine.internal.gradle.isSnapshot +import org.gradle.api.Project +import org.gradle.api.artifacts.dsl.RepositoryHandler +import org.gradle.api.publish.maven.MavenPublication +import org.gradle.api.tasks.TaskProvider +import org.gradle.api.tasks.bundling.Jar +import org.gradle.kotlin.dsl.apply +import org.gradle.kotlin.dsl.create + +/** + * The name of the Maven Publishing Gradle plugin. + */ +private const val MAVEN_PUBLISH = "maven-publish" + +/** + * Abstract base for handlers of publications in a project + * with [spinePublishing] settings declared. + */ +internal sealed class PublicationHandler( + protected val project: Project, + private val destinations: Set +) { + + fun apply() = with(project) { + if (!hasCustomPublishing) { + apply(plugin = MAVEN_PUBLISH) + } + + pluginManager.withPlugin(MAVEN_PUBLISH) { + handlePublications() + registerDestinations() + configurePublishTask(destinations) + } + } + + /** + * Either handles publications already declared in the given project, + * or creates new ones. + */ + abstract fun handlePublications() + + /** + * Goes through the [destinations] and registers each as a repository for publishing + * in the given Gradle project. + */ + private fun registerDestinations() { + val repositories = project.publishingExtension.repositories + destinations.forEach { destination -> + repositories.register(project, destination) + } + } + + /** + * Takes a group name and a version from the given [project] and assigns + * them to this publication. + */ + protected fun MavenPublication.assignMavenCoordinates() { + groupId = project.group.toString() + artifactId = project.spinePublishing.artifactPrefix + artifactId + version = project.version.toString() + } +} + +/** + * Adds a Maven repository to the project specifying credentials, if they are + * [available][Repository.credentials] from the root project. + */ +private fun RepositoryHandler.register(project: Project, repository: Repository) { + val isSnapshot = project.version.toString().isSnapshot() + val target = if (isSnapshot) repository.snapshots else repository.releases + val credentials = repository.credentials(project.rootProject) + maven { + url = project.uri(target) + credentials { + username = credentials?.username + password = credentials?.password + } + } +} + +/** + * A publication for a typical Java project. + * + * In Gradle, in order to publish something somewhere one should create a publication. + * A publication has a name and consists of one or more artifacts plus information about + * those artifacts – the metadata. + * + * An instance of this class represents [MavenPublication] named "mavenJava". It is generally + * accepted that a publication with this name contains a Java project published to one or + * more Maven repositories. + * + * By default, only a jar with the compilation output of `main` source set and its + * metadata files are published. Other artifacts are specified through the + * [constructor parameter][jarFlags]. Please, take a look on [specifyArtifacts] for additional info. + * + * @param jarFlags + * flags for additional JARs published along with the compilation output. + * @param destinations + * Maven repositories to which the produced artifacts will be sent. + * @see + * Maven Publish Plugin | Publications + */ +internal class StandardJavaPublicationHandler( + project: Project, + private val jarFlags: JarFlags, + destinations: Set, +) : PublicationHandler(project, destinations) { + + /** + * Creates a new "mavenJava" [MavenPublication] in the given project. + */ + override fun handlePublications() { + val jars = project.artifacts(jarFlags) + val publications = project.publications + publications.create("mavenJava") { + assignMavenCoordinates() + specifyArtifacts(jars) + } + } + + /** + * Specifies which artifacts this [MavenPublication] will contain. + * + * A typical Maven publication contains: + * + * 1. Jar archives. For example: compilation output, sources, javadoc, etc. + * 2. Maven metadata file that has ".pom" extension. + * 3. Gradle's metadata file that has ".module" extension. + * + * Metadata files contain information about a publication itself, its artifacts and their + * dependencies. Presence of ".pom" file is mandatory for publication to be consumed by + * `mvn` build tool itself or other build tools that understand Maven notation (Gradle, Ivy). + * Presence of ".module" is optional, but useful when a publication is consumed by Gradle. + * + * @see Maven – POM Reference + * @see + * Understanding Gradle Module Metadata + */ + private fun MavenPublication.specifyArtifacts(jars: Set>) { + + /* "java" component provides a jar with compilation output of "main" source set. + It is NOT defined as another `Jar` task intentionally. Doing that will leave the + publication without correct ".pom" and ".module" metadata files generated. + */ + val javaComponent = project.components.findByName("java") + javaComponent?.let { + from(it) + } + + /* Other artifacts are represented by `Jar` tasks. Those artifacts don't bring any other + metadata in comparison with `Component` (such as dependencies notation). + */ + jars.forEach { + artifact(it) + } + } +} + +/** + * A handler for custom publications, which are declared under the [publications] + * section of a module. + * + * Such publications should be treated differently than [StandardJavaPublicationHandler], + * which is created for a module. Instead, since the publications are already declared, + * this class only [assigns maven coordinates][assignMavenCoordinates]. + * + * A module which declares custom publications must be specified in + * the [SpinePublishing.modulesWithCustomPublishing] property. + * + * If a module with [publications] declared locally is not specified as one with custom publishing, + * it may cause a name clash between an artifact produced by the [standard][MavenPublication] + * publication, and custom ones. In order to have both standard and custom publications, + * please specify custom artifact IDs or classifiers for each custom publication. + */ +internal class CustomPublicationHandler(project: Project, destinations: Set) : + PublicationHandler(project, destinations) { + + override fun handlePublications() { + project.publications.forEach { + (it as MavenPublication).assignMavenCoordinates() + } + } +} diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/PublishingConfig.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/PublishingConfig.kt deleted file mode 100644 index d1e355d8..00000000 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/PublishingConfig.kt +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package io.spine.internal.gradle.publish - -import io.spine.internal.gradle.Repository -import org.gradle.api.Project -import org.gradle.api.tasks.TaskProvider -import org.gradle.api.tasks.bundling.Jar -import org.gradle.kotlin.dsl.apply - -/** - * Information, required to set up publishing of a project using `maven-publish` plugin. - * - * @param artifactId a name that a project is known by. - * @param destinations set of repositories, to which the resulting artifacts will be sent. - * @param includeProtoJar tells whether [protoJar] artifact should be published. - * @param includeTestJar tells whether [testJar] artifact should be published. - */ -internal class PublishingConfig( - val artifactId: String, - val destinations: Set, - val includeProtoJar: Boolean = true, - val includeTestJar: Boolean = false, -) - -/** - * Applies this configuration to the given project. - * - * This method does the following: - * - * 1. Applies `maven-publish` plugin to the project. - * 2. Registers [MavenJavaPublication] in Gradle's [PublicationContainer][org.gradle.api.publish.PublicationContainer]. - * 4. Configures "publish" task. - * - * The actual list of resulted artifacts is determined by [registerArtifacts]. - */ -internal fun PublishingConfig.apply(project: Project) = with(project) { - apply(plugin = "maven-publish") - createPublication(project) - configurePublishTask(destinations) -} - -private fun PublishingConfig.createPublication(project: Project) { - val artifacts = project.registerArtifacts(includeProtoJar, includeTestJar) - val publication = MavenJavaPublication( - artifactId = artifactId, - jars = artifacts, - destinations = destinations - ) - publication.registerIn(project) -} - -/** - * Registers [Jar] tasks, output of which is used as Maven artifacts. - * - * By default, only a jar with java compilation output is included into publication. This method - * registers tasks which produce additional artifacts. - * - * The list of additional artifacts to be registered: - * - * 1. [sourcesJar] – Java, Kotlin and Proto source files. - * 2. [protoJar] – only Proto source files. - * 3. [javadocJar] – documentation, generated upon Java files. - * 4. [testJar] – compilation output of "test" source set. - * - * Registration of [protoJar] and [testJar] is optional. It can be controlled by the method's - * parameters. - * - * @return the list of the registered tasks. - */ -private fun Project.registerArtifacts( - includeProtoJar: Boolean = true, - includeTestJar: Boolean = false -): Set> { - - val artifacts = mutableSetOf( - sourcesJar(), - javadocJar(), - ) - - // We don't want to have an empty "proto.jar" when a project doesn't have any Proto files. - if (hasProto() && includeProtoJar) { - artifacts.add(protoJar()) - } - - // Here, we don't have the corresponding `hasTests()` check, since this artifact is disabled - // by default. And turning it on means "We have tests and need them to be published." - if (includeTestJar) { - artifacts.add(testJar()) - } - - return artifacts -} diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/PublishingExts.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/PublishingExts.kt new file mode 100644 index 00000000..78e73954 --- /dev/null +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/PublishingExts.kt @@ -0,0 +1,264 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Redistribution and use in source and/or binary forms, with or without + * modification, must retain the above copyright notice and the following + * disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package io.spine.internal.gradle.publish + +import dokkaKotlinJar +import io.spine.internal.gradle.Repository +import io.spine.internal.gradle.sourceSets +import java.util.* +import org.gradle.api.InvalidUserDataException +import org.gradle.api.Project +import org.gradle.api.Task +import org.gradle.api.publish.PublicationContainer +import org.gradle.api.publish.PublishingExtension +import org.gradle.api.tasks.TaskContainer +import org.gradle.api.tasks.TaskProvider +import org.gradle.api.tasks.bundling.Jar +import org.gradle.kotlin.dsl.get +import org.gradle.kotlin.dsl.getByType +import org.gradle.kotlin.dsl.named +import org.gradle.kotlin.dsl.register +import org.gradle.kotlin.dsl.the +import org.gradle.kotlin.dsl.withType + +/** + * Obtains [PublishingExtension] of this project. + */ +internal val Project.publishingExtension: PublishingExtension + get() = extensions.getByType() + +/** + * Obtains [PublicationContainer] of this project. + */ +internal val Project.publications: PublicationContainer + get() = publishingExtension.publications + +/** + * Obtains [SpinePublishing] extension from the root project. + */ +internal val Project.spinePublishing: SpinePublishing + get() = this.rootProject.the() + +/** + * Tells if this project has custom publishing. + */ +internal val Project.hasCustomPublishing: Boolean + get() = spinePublishing.modulesWithCustomPublishing.contains(name) + +private const val PUBLISH_TASK = "publish" + +/** + * Locates `publish` task in this [TaskContainer]. + * + * This task publishes all defined publications to all defined repositories. To achieve that, + * the task depends on all `publish`*PubName*`PublicationTo`*RepoName*`Repository` tasks. + * + * Please note, task execution would not copy publications to the local Maven cache. + * + * @see + * Tasks | Maven Publish Plugin + */ +internal val TaskContainer.publish: TaskProvider + get() = named(PUBLISH_TASK) + +/** + * Sets dependencies for `publish` task in this [Project]. + * + * This method performs the following: + * + * 1. When this [Project] is not a root, makes `publish` task in a root project + * depend on a local `publish`. + * 2. Makes local `publish` task verify that credentials are present for each + * of destination repositories. + */ +internal fun Project.configurePublishTask(destinations: Set) { + attachCredentialsVerification(destinations) + bindToRootPublish() +} + +private fun Project.attachCredentialsVerification(destinations: Set) { + val checkCredentials = tasks.registerCheckCredentialsTask(destinations) + val localPublish = tasks.publish + localPublish.configure { dependsOn(checkCredentials) } +} + +private fun Project.bindToRootPublish() { + if (project == rootProject) { + return + } + + val localPublish = tasks.publish + val rootPublish = rootProject.tasks.getOrCreatePublishTask() + rootPublish.configure { dependsOn(localPublish) } +} + +/** + * Use this task accessor when it is not guaranteed that the task is present + * in this [TaskContainer]. + */ +private fun TaskContainer.getOrCreatePublishTask(): TaskProvider = + if (names.contains(PUBLISH_TASK)) { + named(PUBLISH_TASK) + } else { + register(PUBLISH_TASK) + } + +private fun TaskContainer.registerCheckCredentialsTask( + destinations: Set +): TaskProvider = + register("checkCredentials") { + doLast { + destinations.forEach { it.ensureCredentials(project) } + } + } + +private fun Repository.ensureCredentials(project: Project) { + val credentials = credentials(project) + if (Objects.isNull(credentials)) { + throw InvalidUserDataException( + "No valid credentials for repository `${this}`. Please make sure " + + "to pass username/password or a valid `.properties` file." + ) + } +} + +/** + * Excludes Google `.proto` sources from all artifacts. + * + * Goes through all registered `Jar` tasks and filters out Google's files. + */ +@Suppress("unused") +fun TaskContainer.excludeGoogleProtoFromArtifacts() { + withType().configureEach { + exclude { it.isGoogleProtoSource() } + } +} + +/** + * Locates or creates `sourcesJar` task in this [Project]. + * + * The output of this task is a `jar` archive. The archive contains sources from `main` source set. + * The task makes sure that sources from the directories below will be included into + * a resulted archive: + * + * - Kotlin + * - Java + * - Proto + * + * Java and Kotlin sources are default to `main` source set since it is created by `java` plugin. + * For Proto sources to be included – [special treatment][protoSources] is needed. + */ +internal fun Project.sourcesJar(): TaskProvider = tasks.getOrCreate("sourcesJar") { + dependOnGenerateProto() + archiveClassifier.set("sources") + from(sourceSets["main"].allSource) // Puts Java and Kotlin sources. + from(protoSources()) // Puts Proto sources. + exclude("desc.ref", "*.desc") // Exclude descriptor files and the descriptor reference. +} + +/** + * Locates or creates `protoJar` task in this [Project]. + * + * The output of this task is a `jar` archive. The archive contains only + * [Proto sources][protoSources] from `main` source set. + */ +internal fun Project.protoJar(): TaskProvider = tasks.getOrCreate("protoJar") { + dependOnGenerateProto() + archiveClassifier.set("proto") + from(protoSources()) +} + +/** + * Locates or creates `testJar` task in this [Project]. + * + * The output of this task is a `jar` archive. The archive contains compilation output + * of `test` source set. + */ +internal fun Project.testJar(): TaskProvider = tasks.getOrCreate("testJar") { + archiveClassifier.set("test") + from(sourceSets["test"].output) +} + +/** + * Locates or creates `javadocJar` task in this [Project]. + * + * The output of this task is a `jar` archive. The archive contains Javadoc, + * generated upon Java sources from `main` source set. If javadoc for Kotlin is also needed, + * apply Dokka plugin. It tunes `javadoc` task to generate docs upon Kotlin sources as well. + */ +fun Project.javadocJar(): TaskProvider = tasks.getOrCreate("javadocJar") { + archiveClassifier.set("javadoc") + from(files("$buildDir/docs/javadoc")) + dependsOn("javadoc") +} + +internal fun TaskContainer.getOrCreate(name: String, init: Jar.() -> Unit): TaskProvider = + if (names.contains(name)) { + named(name) + } else { + register(name) { + init() + } + } + +/** + * Obtains as a set of [Jar] tasks, output of which is used as Maven artifacts. + * + * By default, only a jar with Java compilation output is included into publication. This method + * registers tasks which produce additional artifacts according to the values of [jarFlags]. + * + * @return the list of the registered tasks. + */ +internal fun Project.artifacts(jarFlags: JarFlags): Set> { + val tasks = mutableSetOf>() + + if (jarFlags.sourcesJar) { + tasks.add(sourcesJar()) + } + + if (jarFlags.javadocJar) { + tasks.add(javadocJar()) + } + + // We don't want to have an empty "proto.jar" when a project doesn't have any Proto files. + if (hasProto() && jarFlags.publishProtoJar) { + tasks.add(protoJar()) + } + + // Here, we don't have the corresponding `hasTests()` check, since this artifact is disabled + // by default. And turning it on means "We have tests and need them to be published." + if (jarFlags.publishTestJar) { + tasks.add(testJar()) + } + + if (jarFlags.publishDokkaKotlinJar) { + tasks.add(dokkaKotlinJar()) + } + + return tasks +} + diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/PublishingRepos.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/PublishingRepos.kt index 5abdc10f..36fcac4d 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/PublishingRepos.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/PublishingRepos.kt @@ -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. @@ -33,14 +33,6 @@ import io.spine.internal.gradle.Repository */ object PublishingRepos { - @Suppress("HttpUrlsUsage") // HTTPS is not supported by this repository. - val mavenTeamDev = Repository( - name = "maven.teamdev.com", - releases = "http://maven.teamdev.com/repository/spine", - snapshots = "http://maven.teamdev.com/repository/spine-snapshots", - credentialsFile = "credentials.properties" - ) - val cloudRepo = CloudRepo.destination val cloudArtifactRegistry = CloudArtifactRegistry.repository diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/SpinePublishing.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/SpinePublishing.kt index 2aaa646f..09edecd7 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/SpinePublishing.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/SpinePublishing.kt @@ -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. @@ -26,8 +26,12 @@ package io.spine.internal.gradle.publish +import dokkaJavaJar +import dokkaKotlinJar import io.spine.internal.gradle.Repository import org.gradle.api.Project +import org.gradle.api.publish.maven.plugins.MavenPublishPlugin +import org.gradle.kotlin.dsl.apply import org.gradle.kotlin.dsl.create import org.gradle.kotlin.dsl.findByType @@ -71,7 +75,7 @@ import org.gradle.kotlin.dsl.findByType * `spinePublishing` extension within `subprojectA` itself would lead to an exception. * * In Gradle, in order to publish something somewhere one should create a publication. In each - * of published modules, the extension will create a [publication][MavenJavaPublication] + * of published modules, the extension will create a [publication][StandardJavaPublicationHandler] * named "mavenJava". All artifacts, published by this extension belong to this publication. * * By default, along with the compilation output of "main" source set, the extension publishes @@ -98,17 +102,24 @@ import org.gradle.kotlin.dsl.findByType * 3. [javadocJar] - javadoc, generated upon Java sources from "main" source set. * If javadoc for Kotlin is also needed, apply Dokka plugin. It tunes `javadoc` task to generate * docs upon Kotlin sources as well. + * 4. [dokkaKotlinJar] - documentation generated by Dokka for Kotlin and Java sources + * using the Kotlin API mode. + * 5. [dokkaJavaJar] - documentation generated by Dokka for Kotlin and Java sources + * * using the Java API mode. * * Additionally, [testJar] artifact can be published. This artifact contains compilation output * of "test" source set. Use [SpinePublishing.testJar] to enable its publishing. * - * @see [registerArtifacts] + * @see [artifacts] */ -fun Project.spinePublishing(configuration: SpinePublishing.() -> Unit) { +fun Project.spinePublishing(block: SpinePublishing.() -> Unit) { + apply() val name = SpinePublishing::class.java.simpleName - val extension = with(extensions) { findByType() ?: create(name, project) } + val extension = with(extensions) { + findByType() ?: create(name, project) + } extension.run { - configuration() + block() configured() } } @@ -116,8 +127,9 @@ fun Project.spinePublishing(configuration: SpinePublishing.() -> Unit) { /** * A Gradle extension for setting up publishing of spine modules using `maven-publish` plugin. * - * @param project a project in which the extension is opened. By default, this project will be - * published as long as a [set][modules] of modules to publish is not specified explicitly. + * @param project + * a project in which the extension is opened. By default, this project will be + * published as long as a [set][modules] of modules to publish is not specified explicitly. * * @see spinePublishing */ @@ -125,6 +137,7 @@ open class SpinePublishing(private val project: Project) { private val protoJar = ProtoJar() private val testJar = TestJar() + private val dokkaJar = DokkaJar() /** * Set of modules to be published. @@ -139,6 +152,13 @@ open class SpinePublishing(private val project: Project) { */ var modules: Set = emptySet() + /** + * Set of modules that have custom publications and do not need standard ones. + * + * Empty by default. + */ + var modulesWithCustomPublishing: Set = emptySet() + /** * Set of repositories, to which the resulting artifacts will be sent. * @@ -201,7 +221,7 @@ open class SpinePublishing(private val project: Project) { * implementation("io.spine:spine-client:$version@proto") * ``` */ - fun protoJar(configuration: ProtoJar.() -> Unit) = protoJar.run(configuration) + fun protoJar(block: ProtoJar.() -> Unit) = protoJar.run(block) /** * Allows enabling publishing of [testJar] artifact, containing compilation output @@ -233,14 +253,42 @@ open class SpinePublishing(private val project: Project) { * } * ``` * - * The resulting artifact is available under "test" classifier. I.e., in Gradle 7+, one could - * depend on it like this: + * The resulting artifact is available under "test" classifier. For example, + * in Gradle 7+, one could depend on it like this: * * ``` * implementation("io.spine:spine-client:$version@test") * ``` */ - fun testJar(configuration: TestJar.() -> Unit) = testJar.run(configuration) + fun testJar(block: TestJar.() -> Unit) = testJar.run(block) + + /** + * Configures publishing of [dokkaKotlinJar] and [dokkaJavaJar] artifacts, + * containing Dokka-generated documentation. + * + * By default, publishing of the [dokkaKotlinJar] artifact is enabled, and [dokkaJavaJar] + * is disabled. + * + * Remember that the Dokka Gradle plugin should be applied to publish this artifact as it is + * produced by the `dokkaHtml` task. It can be done by using the + * [io.spine.internal.dependency.Dokka] dependency object or by applying the + * `buildSrc/src/main/kotlin/dokka-for-kotlin` or + * `buildSrc/src/main/kotlin/dokka-for-java` script plugins. + * + * Here's an example of how to use this option: + * + * ``` + * spinePublishing { + * dokkaJar { + * kotlin = false + * java = true + * } + * } + * ``` + * + * The resulting artifact is available under "dokka" classifier. + */ + fun dokkaJar(block: DokkaJar.() -> Unit) = dokkaJar.run(block) /** * Called to notify the extension that its configuration is completed. @@ -249,20 +297,14 @@ open class SpinePublishing(private val project: Project) { * `maven-publish` plugin for each published module. */ internal fun configured() { - ensureProtoJarExclusionsArePublished() ensureTestJarInclusionsArePublished() ensuresModulesNotDuplicated() - val protoJarExclusions = protoJar.exclusions - val testJarInclusions = testJar.inclusions - val publishedProjects = publishedProjects() - - publishedProjects.forEach { project -> - val name = project.name - val includeProtoJar = (protoJarExclusions.contains(name) || protoJar.disabled).not() - val includeTestJar = (testJarInclusions.contains(name) || testJar.enabled) - setUpPublishing(project, includeProtoJar, includeTestJar) + val projectsToPublish = projectsToPublish() + projectsToPublish.forEach { project -> + val jarFlags = JarFlags.create(project.name, protoJar, testJar, dokkaJar) + project.setUpPublishing(jarFlags) } } @@ -278,41 +320,46 @@ open class SpinePublishing(private val project: Project) { * * @see modules */ - private fun publishedProjects() = modules.map { name -> project.project(name) } - .ifEmpty { setOf(project) } + private fun projectsToPublish(): Collection { + if (project.subprojects.isEmpty()) { + return setOf(project) + } + return modules.union(modulesWithCustomPublishing) + .map { name -> project.project(name) } + .ifEmpty { setOf(project) } + } /** * Sets up `maven-publish` plugin for the given project. * - * Firstly, an instance of [PublishingConfig] is assembled for the project. Then, this - * config is applied. + * Firstly, an instance of [PublicationHandler] is created for the project depending + * on the nature of the publication process configured. + * Then, this the handler is scheduled to apply on [Project.afterEvaluate]. * - * This method utilizes `project.afterEvaluate` closure. General rule of thumb is to avoid using - * of this closure, as it configures a project when its configuration is considered completed. + * General rule of thumb is to avoid using [Project.afterEvaluate] of this closure, + * as it configures a project when its configuration is considered completed. * Which is quite counter-intuitive. * - * The root cause why it is used here is a possibility to configure publishing of multiple - * modules from a root project. When this possibility is employed, in fact, we configure - * publishing for a module, build file of which has not been even evaluated by that time. - * That leads to an unexpected behavior. + * We selected to use [Project.afterEvaluate] so that we can configure publishing of multiple + * modules from a root project. When we do this, we configure publishing for a module, + * build file of which has not been even evaluated yet. * * The simplest example here is specifying of `version` and `group` for Maven coordinates. * Let's suppose, they are declared in a module's build file. It is a common practice. * But publishing of the module is configured from a root project's build file. By the time, * when we need to specify them, we just don't know them. As a result, we have to use - * `project.afterEvaluate` in order to guarantee that a module will be configured by the time + * [Project.afterEvaluate] in order to guarantee that a module will be configured by the time * we configure publishing for it. */ - private fun setUpPublishing(project: Project, includeProtoJar: Boolean, includeTestJar: Boolean) { - val artifactId = artifactId(project) - val publishingConfig = PublishingConfig( - artifactId, - destinations, - includeProtoJar, - includeTestJar, - ) - project.afterEvaluate { - publishingConfig.apply(project) + private fun Project.setUpPublishing(jarFlags: JarFlags) { + val customPublishing = modulesWithCustomPublishing.contains(name) + val handler = if (customPublishing) { + CustomPublicationHandler(project, destinations) + } else { + StandardJavaPublicationHandler(project, jarFlags, destinations) + } + afterEvaluate { + handler.apply() } } @@ -322,7 +369,7 @@ open class SpinePublishing(private val project: Project) { * It consists of a project's name and [prefix][artifactPrefix]: * ``. */ - internal fun artifactId(project: Project): String = "$artifactPrefix${project.name}" + fun artifactId(project: Project): String = "$artifactPrefix${project.name}" /** * Ensures that all modules, marked as excluded from [protoJar] publishing, @@ -349,8 +396,10 @@ open class SpinePublishing(private val project: Project) { private fun ensureTestJarInclusionsArePublished() { val nonPublishedInclusions = testJar.inclusions.minus(modules) if (nonPublishedInclusions.isNotEmpty()) { - throw IllegalStateException("One or more modules are marked as `included into test " + - "JAR publication`, but they are not even published: $nonPublishedInclusions") + error( + "One or more modules are marked as `included into test JAR publication`," + + " but they are not even published: $nonPublishedInclusions." + ) } } @@ -370,10 +419,10 @@ open class SpinePublishing(private val project: Project) { rootExtension?.let { rootPublishing -> val thisProject = setOf(project.name, project.path) if (thisProject.minus(rootPublishing.modules).size != 2) { - throw IllegalStateException("Publishing of `$thisProject` module is already " + - "configured in a root project!") + error( + "Publishing of `$thisProject` module is already configured in a root project!" + ) } } } } - diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/Tasks.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/Tasks.kt deleted file mode 100644 index b132638c..00000000 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/publish/Tasks.kt +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package io.spine.internal.gradle.publish - -import io.spine.internal.gradle.Repository -import java.util.* -import org.gradle.api.InvalidUserDataException -import org.gradle.api.Project -import org.gradle.api.Task -import org.gradle.api.tasks.TaskContainer -import org.gradle.api.tasks.TaskProvider - -private const val PUBLISH = "publish" - -/** - * Locates `publish` task in this [TaskContainer]. - * - * This task publishes all defined publications to all defined repositories. To achieve that, - * the task depends on all `publish`*PubName*`PublicationTo`*RepoName*`Repository` tasks. - * - * Please note, task execution would not copy publications to the local Maven cache. - * - * @see - * Tasks | Maven Publish Plugin - */ -internal val TaskContainer.publish: TaskProvider - get() = named(PUBLISH) - -/** - * Sets dependencies for `publish` task in this [Project]. - * - * This method performs the following: - * - * 1. When this [Project] is not a root, makes `publish` task in a root project - * depend on a local `publish`. - * 2. Makes local `publish` task verify that credentials are present for each - * of destination repositories. - */ -internal fun Project.configurePublishTask(destinations: Set) { - attachCredentialsVerification(destinations) - bindToRootPublish() -} - -private fun Project.attachCredentialsVerification(destinations: Set) { - val checkCredentials = tasks.registerCheckCredentialsTask(destinations) - val localPublish = tasks.publish - localPublish.configure { dependsOn(checkCredentials) } -} - -private fun Project.bindToRootPublish() { - if (project == rootProject) { - return - } - - val localPublish = tasks.publish - val rootPublish = rootProject.tasks.getOrCreatePublishTask() - rootPublish.configure { dependsOn(localPublish) } -} - -/** - * Use this task accessor when it is not guaranteed that the task is present - * in this [TaskContainer]. - */ -private fun TaskContainer.getOrCreatePublishTask() = - if (names.contains(PUBLISH)) { - named(PUBLISH) - } else { - register(PUBLISH) - } - -private fun TaskContainer.registerCheckCredentialsTask(destinations: Set) = - register("checkCredentials") { - doLast { - destinations.forEach { it.ensureCredentials(project) } - } - } - -private fun Repository.ensureCredentials(project: Project) { - val credentials = credentials(project) - if (Objects.isNull(credentials)) { - throw InvalidUserDataException( - "No valid credentials for repository `${this}`. Please make sure " + - "to pass username/password or a valid `.properties` file." - ) - } -} diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/CodebaseFilter.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/CodebaseFilter.kt index 89e29129..4b0a9cc3 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/CodebaseFilter.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/CodebaseFilter.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/FileExtension.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/FileExtension.kt index 97ab594e..75763ddf 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/FileExtension.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/FileExtension.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/FileExtensions.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/FileExtensions.kt index 4a427979..69193bae 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/FileExtensions.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/FileExtensions.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/FileFilter.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/FileFilter.kt index 1f4b3828..cc80ea18 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/FileFilter.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/FileFilter.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/JacocoConfig.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/JacocoConfig.kt index 5e7fff47..4d789a59 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/JacocoConfig.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/JacocoConfig.kt @@ -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. @@ -89,12 +89,9 @@ class JacocoConfig( */ fun applyTo(project: Project) { project.applyPlugin(BasePlugin::class.java) - project.afterEvaluate { - val javaProjects: Iterable = eligibleProjects(project) - val reportsDir = project.rootProject.buildDir.resolve(reportsDirSuffix) - JacocoConfig(project.rootProject, reportsDir, javaProjects) - .configure() - } + val javaProjects: Iterable = eligibleProjects(project) + val reportsDir = project.rootProject.buildDir.resolve(reportsDirSuffix) + JacocoConfig(project.rootProject, reportsDir, javaProjects).configure() } /** diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/PathMarker.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/PathMarker.kt index 00fdf243..06b0bc5d 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/PathMarker.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/PathMarker.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/TaskName.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/TaskName.kt index 76d34586..c81c24c9 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/TaskName.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/coverage/TaskName.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/Configuration.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/Configuration.kt index 65fd036c..32b24b28 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/Configuration.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/Configuration.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/LicenseReporter.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/LicenseReporter.kt index be3e250d..f7f1a312 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/LicenseReporter.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/LicenseReporter.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/MarkdownReportRenderer.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/MarkdownReportRenderer.kt index ebd62d5b..e1cd8afd 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/MarkdownReportRenderer.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/MarkdownReportRenderer.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/ModuleDataExtensions.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/ModuleDataExtensions.kt index c219dec3..9adbb3fb 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/ModuleDataExtensions.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/ModuleDataExtensions.kt @@ -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. @@ -49,7 +49,7 @@ internal fun MarkdownDocument.printSection( } /** - * Prints the metadata of the module to the specified [Markdown document][out]. + * Prints the module metadata to this [MarkdownDocument]. */ private fun MarkdownDocument.printModule(module: ModuleData) { ol() @@ -105,7 +105,7 @@ private fun MarkdownDocument.printProjectUrl(projectUrl: String?, indent: Int) { } /** - * Prints the links to the the source code licenses. + * Prints the links to the source code licenses. */ @Suppress("SameParameterValue" /* Indentation is consistent across the list. */) private fun MarkdownDocument.printLicenses(licenses: Set, indent: Int) { diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/Paths.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/Paths.kt index cf1f4602..89fb859d 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/Paths.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/Paths.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/ProjectDependencies.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/ProjectDependencies.kt index 164df070..fc90bb3b 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/ProjectDependencies.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/ProjectDependencies.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/Tasks.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/Tasks.kt index 4206f3d4..6a57be5f 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/Tasks.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/Tasks.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/Template.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/Template.kt index f8f835ea..3eccbca9 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/Template.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/license/Template.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/DependencyScope.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/DependencyScope.kt index 6a11b7c1..9c1f1ed6 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/DependencyScope.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/DependencyScope.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/DependencyWriter.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/DependencyWriter.kt index 8772219a..fb1920b4 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/DependencyWriter.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/DependencyWriter.kt @@ -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. @@ -38,7 +38,8 @@ import org.gradle.kotlin.dsl.withGroovyBuilder /** * Writes the dependencies of a Gradle project in a `pom.xml` format. * - * Includes the dependencies of the subprojects. Does not include the transitive dependencies. + * Includes the dependencies of the subprojects. Does not include + * the transitive dependencies. * * ``` * @@ -51,6 +52,9 @@ import org.gradle.kotlin.dsl.withGroovyBuilder * * ``` * + * When there are several versions of the same dependency, only the one with + * the newest version is retained. + * * @see PomGenerator */ internal class DependencyWriter @@ -96,32 +100,35 @@ private constructor( * Returns the [scoped dependencies][ScopedDependency] of a Gradle project. */ fun Project.dependencies(): SortedSet { - val dependencies = mutableSetOf() + val dependencies = mutableSetOf() dependencies.addAll(this.depsFromAllConfigurations()) this.subprojects.forEach { subproject -> val subprojectDeps = subproject.depsFromAllConfigurations() dependencies.addAll(subprojectDeps) } - return dependencies.toSortedSet() + + val result = deduplicate(dependencies) + .map { it.scoped } + .toSortedSet() + return result } /** - * Returns the scoped dependencies of the project from all the project configurations. + * Returns the external dependencies of the project from all the project configurations. */ -private fun Project.depsFromAllConfigurations(): Set { - val result = mutableSetOf() +private fun Project.depsFromAllConfigurations(): Set { + val result = mutableSetOf() this.configurations.forEach { configuration -> if (configuration.isCanBeResolved) { // Force resolution of the configuration. configuration.resolvedConfiguration } - configuration.dependencies.forEach { - if (it.isExternal()) { - val dependency = ScopedDependency.of(it, configuration) - result.add(dependency) + configuration.dependencies.filter { it.isExternal() } + .forEach { dependency -> + val moduleDependency = ModuleDependency(project, configuration, dependency) + result.add(moduleDependency) } - } } return result } @@ -132,3 +139,47 @@ private fun Project.depsFromAllConfigurations(): Set { private fun Dependency.isExternal(): Boolean { return this.javaClass.kotlin.isSubclassOf(AbstractExternalModuleDependency::class) } + +/** + * Filters out duplicated dependencies by group and name. + * + * When there are several versions of the same dependency, the method will retain only + * the one with the newest version. + * + * Sometimes, a project uses several versions of the same dependency. This may happen + * when different modules of the project use different versions of the same dependency. + * But for our `pom.xml`, which has clearly representative character, a single version + * of a dependency is quite enough. + * + * The rejected duplicates are logged. + */ +private fun Project.deduplicate(dependencies: Set): List { + val groups = dependencies.distinctBy { it.gav } + .groupBy { it.run { "$group:$name" } } + + logDuplicates(groups) + + val filtered = groups.map { group -> + group.value.maxByOrNull { dep -> dep.version!! }!! + } + return filtered +} + +private fun Project.logDuplicates(dependencies: Map>) { + dependencies.filter { it.value.size > 1 } + .forEach { (dependency, versions) -> logDuplicate(dependency, versions) } +} + +private fun Project.logDuplicate(dependency: String, versions: List) { + logger.lifecycle("") + logger.lifecycle("The project uses several versions of `$dependency` dependency.") + + versions.forEach { + logger.lifecycle( + "module: {}, configuration: {}, version: {}", + it.module.name, + it.configuration.name, + it.version + ) + } +} diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/InceptionYear.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/InceptionYear.kt index a1e14666..ab4bc1cc 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/InceptionYear.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/InceptionYear.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/MarkupExtensions.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/MarkupExtensions.kt index e34beb75..214931a4 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/MarkupExtensions.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/MarkupExtensions.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/ModuleDependency.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/ModuleDependency.kt new file mode 100644 index 00000000..0dbb11c0 --- /dev/null +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/ModuleDependency.kt @@ -0,0 +1,92 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Redistribution and use in source and/or binary forms, with or without + * modification, must retain the above copyright notice and the following + * disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package io.spine.internal.gradle.report.pom + +import org.gradle.api.Project +import org.gradle.api.artifacts.Configuration +import org.gradle.api.artifacts.Dependency + +/** + * A module's dependency. + * + * Contains information about a module and configuration, from which + * the dependency comes. + */ +internal class ModuleDependency( + val module: Project, + val configuration: Configuration, + private val dependency: Dependency, + +) : Dependency by dependency, Comparable { + + companion object { + private val COMPARATOR = compareBy { it.module } + .thenBy { it.configuration.name } + .thenBy { it.group } + .thenBy { it.name } + .thenBy { it.version } + } + + /** + * A project dependency with its [scope][DependencyScope]. + * + * Doesn't contain any info about an origin module and configuration. + */ + val scoped = ScopedDependency.of(dependency, configuration) + + /** + * GAV coordinates of this dependency. + * + * Gradle's [Dependency] is a mutable object. Its properties can change their + * values with time. In parcticular, the version can be changed as more + * configurations are getting resolved. This is why this property is calculated. + */ + val gav: String + get() = "$group:$name:$version" + + override fun compareTo(other: ModuleDependency): Int = COMPARATOR.compare(this, other) + + override fun equals(other: Any?): Boolean { + if (this === other) return true + if (javaClass != other?.javaClass) return false + + other as ModuleDependency + + if (module != other.module) return false + if (configuration != other.configuration) return false + if (dependency != other.dependency) return false + + return true + } + + override fun hashCode(): Int { + var result = module.hashCode() + result = 31 * result + configuration.hashCode() + result = 31 * result + dependency.hashCode() + return result + } +} diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/PomFormatting.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/PomFormatting.kt index 3fca911c..d25ebd62 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/PomFormatting.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/PomFormatting.kt @@ -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. @@ -28,6 +28,7 @@ package io.spine.internal.gradle.report.pom import java.io.StringWriter import java.lang.System.lineSeparator +import java.util.* /** * Helps to format the `pom.xml` file according to its expected XML structure. @@ -74,6 +75,7 @@ internal object PomFormatting { "structure per-subproject." + NL return String.format( + Locale.US, "", NL, description, NL ) diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/PomGenerator.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/PomGenerator.kt index 8b9ab504..3535922a 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/PomGenerator.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/PomGenerator.kt @@ -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. @@ -28,7 +28,6 @@ package io.spine.internal.gradle.report.pom import org.gradle.api.Project import org.gradle.api.plugins.BasePlugin -import org.gradle.kotlin.dsl.extra /** * Generates a `pom.xml` file that contains dependencies of the root project as diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/PomXmlWriter.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/PomXmlWriter.kt index 3df34034..c16fe767 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/PomXmlWriter.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/PomXmlWriter.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/ProjectMetadata.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/ProjectMetadata.kt index 40c84f29..ad1cbb74 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/ProjectMetadata.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/ProjectMetadata.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/ScopedDependency.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/ScopedDependency.kt index 868d4332..5e6bf13b 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/ScopedDependency.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/ScopedDependency.kt @@ -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. @@ -94,17 +94,17 @@ private constructor( */ fun of(dependency: Dependency, configuration: Configuration): ScopedDependency { val configurationName = configuration.name - - if (CONFIG_TO_SCOPE.containsKey(configurationName)) { - val scope = CONFIG_TO_SCOPE[configurationName] - return ScopedDependency(dependency, scope!!) - } - if (configurationName.toLowerCase().startsWith("test")) { - return ScopedDependency(dependency, test) + val knownScope = CONFIG_TO_SCOPE[configurationName] + return when { + knownScope != null -> ScopedDependency(dependency, knownScope) + isTestsRelated(configurationName) -> ScopedDependency(dependency, test) + else -> ScopedDependency(dependency, undefined) } - return ScopedDependency(dependency, undefined) } + private fun isTestsRelated(configurationName: String): Boolean = + configurationName.startsWith("test", ignoreCase = true) + /** * Performs comparison of {@code DependencyWithScope} instances according to these rules: * diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/SpineLicense.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/SpineLicense.kt index 7c95db27..080de4c9 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/SpineLicense.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/report/pom/SpineLicense.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/testing/Logging.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/testing/Logging.kt index 00143e60..de74b08f 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/testing/Logging.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/testing/Logging.kt @@ -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. diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/testing/Multiproject.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/testing/Multiproject.kt index 25ccac94..b9d9c2aa 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/testing/Multiproject.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/testing/Multiproject.kt @@ -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. @@ -62,10 +62,8 @@ import io.spine.internal.gradle.publish.testJar @Suppress("unused") fun Project.exposeTestConfiguration() { - if (pluginManager.hasPlugin("java").not()) { - throw IllegalStateException( - "Can't expose the test configuration because `java` plugin has not been applied." - ) + check(pluginManager.hasPlugin("java")) { + "Can't expose the test configuration because `java` plugin has not been applied." } configurations.create("testArtifacts") { diff --git a/buildSrc/src/main/kotlin/io/spine/internal/gradle/testing/Tasks.kt b/buildSrc/src/main/kotlin/io/spine/internal/gradle/testing/Tasks.kt index 841d4c7e..1d7a656e 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/gradle/testing/Tasks.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/gradle/testing/Tasks.kt @@ -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. @@ -45,6 +45,15 @@ import org.gradle.kotlin.dsl.register */ @Suppress("unused") fun TaskContainer.registerTestTasks() { + withType(Test::class.java).configureEach { + filter { + // There could be cases with no matching tests. E.g. tests could be based on Kotest, + // which has custom task types and names. + isFailOnNoMatchingTests = false + includeTestsMatching("*Test") + includeTestsMatching("*Spec") + } + } register("fastTest").let { register("slowTest") { shouldRunAfter(it) @@ -56,8 +65,10 @@ fun TaskContainer.registerTestTasks() { * Name of a tag for annotating a test class or method that is known to be slow and * should not normally be run together with the main test suite. * - * @see [SlowTest](https://spine.io/base/reference/testlib/io/spine/testing/SlowTest.html) - * @see [Tag](https://junit.org/junit5/docs/5.0.2/api/org/junit/jupiter/api/Tag.html) + * @see + * SlowTest + * @see + * Tag */ private const val SLOW_TAG = "slow" @@ -82,7 +93,8 @@ private open class SlowTest : Test() { init { description = "Executes JUnit tests tagged as `slow`." group = "Verification" - + // No slow tests -- no problem. + filter.isFailOnNoMatchingTests = false this.useJUnitPlatform { includeTags(SLOW_TAG) } diff --git a/buildSrc/src/main/kotlin/io/spine/internal/markup/MarkdownDocument.kt b/buildSrc/src/main/kotlin/io/spine/internal/markup/MarkdownDocument.kt index a7088967..af9154fa 100644 --- a/buildSrc/src/main/kotlin/io/spine/internal/markup/MarkdownDocument.kt +++ b/buildSrc/src/main/kotlin/io/spine/internal/markup/MarkdownDocument.kt @@ -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. @@ -28,16 +28,12 @@ package io.spine.internal.markup import java.io.File -/** - * Shortcuts for the Markdown syntax. - */ - /** * A virtual document written in Markdown. * * After it's finished, end-users would typically write it to a [real file][writeToFile]. */ -@SuppressWarnings("detekt.complexity.TooManyFunctions") /* By design. */ +@Suppress("TooManyFunctions") class MarkdownDocument { private val builder: StringBuilder = StringBuilder() diff --git a/buildSrc/src/main/kotlin/jacoco-kotlin-jvm.gradle.kts b/buildSrc/src/main/kotlin/jacoco-kotlin-jvm.gradle.kts new file mode 100644 index 00000000..b6b49326 --- /dev/null +++ b/buildSrc/src/main/kotlin/jacoco-kotlin-jvm.gradle.kts @@ -0,0 +1,70 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Redistribution and use in source and/or binary forms, with or without + * modification, must retain the above copyright notice and the following + * disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +import java.io.File +import org.gradle.kotlin.dsl.getValue +import org.gradle.kotlin.dsl.getting +import org.gradle.kotlin.dsl.jacoco +import org.gradle.testing.jacoco.tasks.JacocoReport + +plugins { + jacoco +} + +/** + * Configures [JacocoReport] task to run in a Kotlin Multiplatform project for + * `commonMain` and `jvmMain` source sets. + * + * This script plugin must be applied using the following construct at the end of + * a `build.gradle.kts` file of a module: + * + * ```kotlin + * apply(plugin="jacoco-kotlin-jvm") + * ``` + * Please do not apply this script plugin in the `plugins {}` block because `jacocoTestReport` + * task is not yet available at this stage. + */ +@Suppress("unused") +private val about = "" + +/** + * Configure Jacoco task with custom input from this Kotlin Multiplatform project. + */ +val jacocoTestReport: JacocoReport by tasks.getting(JacocoReport::class) { + + val classFiles = File("${buildDir}/classes/kotlin/jvm/") + .walkBottomUp() + .toSet() + classDirectories.setFrom(classFiles) + + val coverageSourceDirs = arrayOf( + "src/commonMain", + "src/jvmMain" + ) + sourceDirectories.setFrom(files(coverageSourceDirs)) + + executionData.setFrom(files("${buildDir}/jacoco/jvmTest.exec")) +} diff --git a/buildSrc/src/main/kotlin/jvm-module.gradle.kts b/buildSrc/src/main/kotlin/jvm-module.gradle.kts new file mode 100644 index 00000000..81c7a875 --- /dev/null +++ b/buildSrc/src/main/kotlin/jvm-module.gradle.kts @@ -0,0 +1,217 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Redistribution and use in source and/or binary forms, with or without + * modification, must retain the above copyright notice and the following + * disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +import BuildSettings.javaVersion +import io.spine.internal.dependency.CheckerFramework +import io.spine.internal.dependency.Dokka +import io.spine.internal.dependency.ErrorProne +import io.spine.internal.dependency.Guava +import io.spine.internal.dependency.JUnit +import io.spine.internal.dependency.JavaX +import io.spine.internal.dependency.Kotest +import io.spine.internal.dependency.Protobuf +import io.spine.internal.dependency.Spine +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.report.license.LicenseReporter +import io.spine.internal.gradle.testing.configureLogging +import io.spine.internal.gradle.testing.registerTestTasks +import org.gradle.api.Project +import org.gradle.api.tasks.Delete +import org.gradle.api.tasks.compile.JavaCompile +import org.gradle.jvm.toolchain.JavaLanguageVersion +import org.gradle.kotlin.dsl.dependencies +import org.gradle.kotlin.dsl.getValue +import org.gradle.kotlin.dsl.idea +import org.gradle.kotlin.dsl.invoke +import org.gradle.kotlin.dsl.`java-library` +import org.gradle.kotlin.dsl.kotlin +import org.gradle.kotlin.dsl.provideDelegate +import org.gradle.kotlin.dsl.registering +import org.gradle.kotlin.dsl.withType +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +plugins { + `java-library` + idea + id("net.ltgt.errorprone") + id("pmd-settings") + id("project-report") + id("dokka-for-java") + kotlin("jvm") + id("io.kotest") + id("org.jetbrains.kotlinx.kover") + id("detekt-code-analysis") + id("dokka-for-kotlin") +} + +LicenseReporter.generateReportIn(project) +JavadocConfig.applyTo(project) +CheckStyleConfig.applyTo(project) + +project.run { + configureJava(javaVersion) + configureKotlin(javaVersion) + addDependencies() + forceConfigurations() + + val generatedDir = "$projectDir/generated" + setTaskDependencies(generatedDir) + setupTests() + + configureGitHubPages() +} + +typealias Module = Project + +fun Module.configureJava(javaVersion: JavaLanguageVersion) { + java { + toolchain.languageVersion.set(javaVersion) + } + + tasks { + withType().configureEach { + configureJavac() + configureErrorProne() + } + } +} + +fun Module.configureKotlin(javaVersion: JavaLanguageVersion) { + kotlin { + applyJvmToolchain(javaVersion.asInt()) + explicitApi() + } + + tasks { + withType().configureEach { + kotlinOptions.jvmTarget = javaVersion.toString() + setFreeCompilerArgs() + } + } + + kover { + useJacoco() + } + + koverReport { + defaults { + xml { + onCheck = true + } + } + } +} + +/** + * These dependencies are applied to all subprojects and do not have to + * be included explicitly. + * + * We expose production code dependencies as API because they are used + * by the framework parts that depend on `base`. + */ +fun Module.addDependencies() = dependencies { + errorprone(ErrorProne.core) + + Protobuf.libs.forEach { api(it) } + api(Guava.lib) + + compileOnlyApi(CheckerFramework.annotations) + compileOnlyApi(JavaX.annotations) + ErrorProne.annotations.forEach { compileOnlyApi(it) } + + implementation(Spine.Logging.lib) + runtimeOnly(Spine.Logging.backend) + + testImplementation(Guava.testLib) + testImplementation(JUnit.runner) + testImplementation(JUnit.pioneer) + JUnit.api.forEach { testImplementation(it) } + + testImplementation(Spine.testlib) + testImplementation(Kotest.frameworkEngine) + testImplementation(Kotest.datatest) + testImplementation(Kotest.runnerJUnit5Jvm) + testImplementation(JUnit.runner) +} + +fun Module.forceConfigurations() { + with(configurations) { + forceVersions() + excludeProtobufLite() + all { + resolutionStrategy { + force( + JUnit.bom, + JUnit.runner, + Dokka.BasePlugin.lib + ) + } + } + } +} + +fun Module.setupTests() { + tasks { + registerTestTasks() + test.configure { + useJUnitPlatform { + includeEngines("junit-jupiter") + } + configureLogging() + } + } +} + +fun Module.setTaskDependencies(generatedDir: String) { + tasks { + val cleanGenerated by registering(Delete::class) { + delete(generatedDir) + } + clean.configure { + dependsOn(cleanGenerated) + } + + project.afterEvaluate { + val publish = tasks.findByName("publish") + publish?.dependsOn("${project.path}:updateGitHubPages") + } + } + configureTaskDependencies() +} + +fun Module.configureGitHubPages() { + val docletVersion = project.version.toString() + updateGitHubPages(docletVersion) { + allowInternalJavadoc.set(true) + rootFolder.set(rootDir) + } +} diff --git a/buildSrc/src/main/kotlin/pmd-settings.gradle.kts b/buildSrc/src/main/kotlin/pmd-settings.gradle.kts index 03e69a67..a718b1f6 100644 --- a/buildSrc/src/main/kotlin/pmd-settings.gradle.kts +++ b/buildSrc/src/main/kotlin/pmd-settings.gradle.kts @@ -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. diff --git a/buildSrc/src/main/kotlin/travis-warnings.gradle.kt b/buildSrc/src/main/kotlin/travis-warnings.gradle.kt deleted file mode 100644 index 60770176..00000000 --- a/buildSrc/src/main/kotlin/travis-warnings.gradle.kt +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -import org.gradle.api.Project -import org.gradle.api.tasks.javadoc.Javadoc -import org.gradle.external.javadoc.CoreJavadocOptions -import org.gradle.kotlin.dsl.named - -@Suppress("unused") -object TravisLogs { - - /** - * Specific setup for a Travis build, which prevents warning messages related to - * `javadoc` tasks in build logs. - * - * It is expected that warnings are viewed and analyzed during local builds. - */ - fun hideJavadocWarnings(p: Project) { - // - val isTravis = System.getenv("TRAVIS") == "true" - if (isTravis) { - // Set the maximum number of Javadoc warnings to print. - // If the parameter value is zero, all warnings will be printed. - p.tasks.named("javadoc") { - val opt = options - if (opt is CoreJavadocOptions) { - opt.addStringOption("Xmaxwarns", "1") - } - } - } - } -} diff --git a/buildSrc/src/main/kotlin/write-manifest.gradle.kts b/buildSrc/src/main/kotlin/write-manifest.gradle.kts new file mode 100644 index 00000000..aff16776 --- /dev/null +++ b/buildSrc/src/main/kotlin/write-manifest.gradle.kts @@ -0,0 +1,164 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Redistribution and use in source and/or binary forms, with or without + * modification, must retain the above copyright notice and the following + * disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +import io.spine.internal.gradle.publish.SpinePublishing +import java.nio.file.Files.createDirectories +import java.nio.file.Files.createFile +import java.text.SimpleDateFormat +import java.util.* +import java.util.jar.Attributes.Name.IMPLEMENTATION_TITLE +import java.util.jar.Attributes.Name.IMPLEMENTATION_VENDOR +import java.util.jar.Attributes.Name.IMPLEMENTATION_VERSION +import java.util.jar.Attributes.Name.MANIFEST_VERSION +import java.util.jar.Manifest + +plugins { + java +} + +/** + * Obtains a string value of a [System] property with the given key. + */ +fun prop(key: String): String = System.getProperties()[key].toString() + +/** + * Obtains the current time in UTC using ISO 8601 format. + */ +fun currentTime(): String = SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ").format(Date()) + +/** + * Obtains the information on the JDK used for the build. + */ +fun buildJdk(): String = + "${prop("java.version")} (${prop("java.vendor")} ${prop("java.vm.version")})" + +/** + * Obtains the information on the operating system used for the build. + */ +fun buildOs(): String = + "${prop("os.name")} ${prop("os.arch")} ${prop("os.version")}" + +/** The publishing settings from the root project. */ +val spinePublishing = rootProject.the() +val artifactPrefix = spinePublishing.artifactPrefix + +/** + * Obtains the implementation title for the project using project group, + * artifact prefix from [SpinePublishing], and the name of the project to which + * this script plugin is applied. + */ +fun implementationTitle() = "${project.group}:$artifactPrefix${project.name}" + +/** + * The name of the manifest attribute holding the timestamp of the build. + */ +val buildTimestampAttr = "Build-Timestamp" + +/** + * The attributes we put into the JAR manifest. + * + * This map is shared between the [exposeManifestForTests] task and the action which + * customizes the [Jar] task below. + */ +val manifestAttributes = mapOf( + "Built-By" to prop("user.name"), + buildTimestampAttr to currentTime(), + "Created-By" to "Gradle ${gradle.gradleVersion}", + "Build-Jdk" to buildJdk(), + "Build-OS" to buildOs(), + IMPLEMENTATION_TITLE.toString() to implementationTitle(), + IMPLEMENTATION_VERSION.toString() to project.version, + IMPLEMENTATION_VENDOR.toString() to "TeamDev" +) + +/** + * Creates a manifest file in `resources` so that it is available for the tests. + * + * This task does the same what does the block which configures the `tasks.jar` below. + * We cannot use the manifest file created by the `Jar` task because it's not visible + * when running tests. We cannot depend on the `Jar` from `resources` because it would + * form a circular dependency. + */ +val exposeManifestForTests by tasks.creating { + + val outputFile = layout.buildDirectory.file("resources/main/META-INF/MANIFEST.MF") + outputs.file(outputFile).withPropertyName("manifestFile") + + fun createManifest(): Manifest { + val manifest = Manifest() + + // The manifest version attribute is crucial for writing. + // It it's absent nothing would be written. + manifest.mainAttributes[MANIFEST_VERSION] = "1.0" + + manifestAttributes.forEach { entry -> + manifest.mainAttributes.putValue(entry.key, entry.value.toString()) + } + return manifest + } + + fun writeManifest(manifest: Manifest) { + val file = outputFile.get().getAsFile() + val path = file.toPath() + createDirectories(path.parent) + if (!file.exists()) { + createFile(path) + } + val stream = file.outputStream() + stream.use { + manifest.write(stream) + } + } + + doLast { + val manifest = createManifest() + writeManifest(manifest) + } +} + +tasks.processResources { + dependsOn(exposeManifestForTests) +} + +tasks.jar { + manifest { + attributes(manifestAttributes) + } +} + +/** + * Makes Gradle ignore the [buildTimestampAttr] attribute during normalization. + * + * See [Java META-INF normalization](https://docs.gradle.org/current/userguide/more_about_tasks.html#sec:meta_inf_normalization) + * section of the Gradle documentation for details. + */ +normalization { + runtimeClasspath { + metaInf { + ignoreAttribute(buildTimestampAttr) + } + } +} diff --git a/buildSrc/src/main/resources/dokka/assets/logo-icon.svg b/buildSrc/src/main/resources/dokka/assets/logo-icon.svg new file mode 100644 index 00000000..ced7f0d7 --- /dev/null +++ b/buildSrc/src/main/resources/dokka/assets/logo-icon.svg @@ -0,0 +1,17 @@ + + + + diff --git a/buildSrc/src/main/resources/dokka/styles/custom-styles.css b/buildSrc/src/main/resources/dokka/styles/custom-styles.css new file mode 100644 index 00000000..8c442fe4 --- /dev/null +++ b/buildSrc/src/main/resources/dokka/styles/custom-styles.css @@ -0,0 +1,52 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Redistribution and use in source and/or binary forms, with or without + * modification, must retain the above copyright notice and the following + * disclaimer. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +:root, +:root.theme-dark { + --color-dark: #007bff; +} + +:root.theme-dark dt { + color: #fff; +} + +.library-name a::before { + background-image: url('https://spine.io/img/spine-sign-white.svg') +} + +.cover a, +.keyValue > div:first-child > .inline-flex > div:first-child > a { + font-family: var(--default-monospace-font-family); +} + +.keyValue > div:first-child > .inline-flex > div:first-child { + overflow: hidden; + text-overflow: ellipsis; +} + +.symbol.monospace.block { + margin: 10px; +} diff --git a/buildSrc/src/main/resources/pmd.xml b/buildSrc/src/main/resources/pmd.xml deleted file mode 100644 index 734aeacc..00000000 --- a/buildSrc/src/main/resources/pmd.xml +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - A set of PMD rules applied to Spine Event Engine projects. - - - - .*/generated/.* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/config b/config index 5a9e4272..327bc212 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit 5a9e4272cf45d4fc2d102bf2e95bfc6d30b27636 +Subproject commit 327bc212a335bf4badd560394364def291c0282e diff --git a/datastore/build.gradle.kts b/datastore/build.gradle.kts index da5caab1..8dbc8863 100644 --- a/datastore/build.gradle.kts +++ b/datastore/build.gradle.kts @@ -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. @@ -24,31 +24,30 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +import com.github.psxpaul.task.ExecFork import io.spine.internal.dependency.GoogleCloud +import io.spine.internal.dependency.Spine import io.spine.internal.gradle.publish.IncrementGuard -import io.spine.tools.gradle.exec.ExecFork plugins { - id("io.spine.execfork") + id("com.github.psxpaul.execfork") version "0.2.2" } apply() -val spineCoreVersion: String by extra -val spineBaseVersion: String by extra -val spineBaseTypesVersion: String by extra - dependencies { // Google Cloud Datastore api(GoogleCloud.datastore) { exclude(group = "com.google.protobuf") exclude(group = "com.google.guava") } - api("io.spine:spine-base:$spineBaseVersion") - api("io.spine:spine-base-types:$spineBaseTypesVersion") + api(Spine.base) + api(Spine.baseTypes) + + api(Spine.Logging.lib) testImplementation(project(":testutil-gcloud")) - testImplementation("io.spine:spine-server:$spineCoreVersion") + testImplementation(Spine.server) } val startDatastore by tasks.registering(ExecFork::class) { @@ -66,8 +65,8 @@ val startDatastore by tasks.registering(ExecFork::class) { // waitForPort = 8081 - standardOutput = "$buildDir/ds-emulator/stdout.log" - errorOutput = "$buildDir/ds-emulator/stderr.log" + standardOutput.set(File("$buildDir/ds-emulator/stdout.log")) + errorOutput.set(File("$buildDir/ds-emulator/stderr.log")) // Suppress a console warning for JRE < 9 killDescendants = false diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/DatastoreMedium.java b/datastore/src/main/java/io/spine/server/storage/datastore/DatastoreMedium.java index ccda0558..5177067f 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/DatastoreMedium.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/DatastoreMedium.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/DatastoreStorageFactory.java b/datastore/src/main/java/io/spine/server/storage/datastore/DatastoreStorageFactory.java index da906f16..980286aa 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/DatastoreStorageFactory.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/DatastoreStorageFactory.java @@ -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. @@ -34,7 +34,7 @@ import com.google.protobuf.Message; import io.spine.annotation.Internal; import io.spine.base.EntityState; -import io.spine.logging.Logging; +import io.spine.logging.WithLogging; import io.spine.server.BoundedContextBuilder; import io.spine.server.ContextSpec; import io.spine.server.delivery.InboxStorage; @@ -80,7 +80,7 @@ * * @see DatastoreStorageFactory#configureTenantIndex(BoundedContextBuilder) */ -public class DatastoreStorageFactory implements StorageFactory, Logging { +public class DatastoreStorageFactory implements StorageFactory, WithLogging { private final Datastore datastore; diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/DatastoreWrapper.java b/datastore/src/main/java/io/spine/server/storage/datastore/DatastoreWrapper.java index 62f3d007..53f49d41 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/DatastoreWrapper.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/DatastoreWrapper.java @@ -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. @@ -41,7 +41,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.Streams; import com.google.errorprone.annotations.InlineMe; -import io.spine.logging.Logging; +import io.spine.logging.WithLogging; import io.spine.server.storage.datastore.record.Entities; import io.spine.server.storage.datastore.record.RecordId; import io.spine.server.storage.datastore.tenant.NamespaceSupplier; @@ -58,12 +58,13 @@ import static com.google.common.collect.Iterables.toArray; import static com.google.common.collect.Streams.stream; import static java.lang.Math.min; +import static java.lang.String.format; import static java.util.stream.Collectors.toList; /** * Adapts {@link Datastore} API for being used for storages. */ -public class DatastoreWrapper extends DatastoreMedium implements Logging { +public class DatastoreWrapper extends DatastoreMedium implements WithLogging { private static final int MAX_ENTITIES_PER_WRITE_REQUEST = 500; @@ -197,7 +198,7 @@ public Iterator readAll(StructuredQuery query, int pageSize) { /** * Queries the Datastore for all entities matching query. * - *

Read is performed in batches until all of the matching entities are fetched, resulting + *

Read is performed in batches until all the matching entities are fetched, resulting * in multiple Datastore queries. * *

The resulting {@code Iterator} is evaluated lazily. A call to @@ -237,7 +238,6 @@ public Iterator readAll(StructuredQuery query) { * if the provided {@linkplain StructuredQuery#getLimit() query includes a limit} or * the provided {@code batchSize} is 0 */ - @SuppressWarnings("UnstableApiUsage") /* Guava's `Streams.stream` is fine. */ private Iterator readAllPageByPage(StructuredQuery query, @Nullable Integer pageSize) { checkArgument(query.getLimit() == null, @@ -278,8 +278,12 @@ protected void dropTable(Kind table) { .setNamespace(namespace.value()) .setKind(table.value()) .build(); - _trace().log("Deleting all entities of `%s` kind in `%s` namespace.", - table, namespace.value()); + logger() + .atTrace() + .log(() -> format( + "Deleting all entities of `%s` kind in `%s` namespace.", + table, namespace.value()) + ); var queryResult = read(query); var keys = toIterable(queryResult); deleteEntities(toArray(keys, Key.class)); @@ -338,8 +342,11 @@ public KeyFactory keyFactory(Kind kind) { .newKeyFactory() .setKind(kind.value()); var namespace = namespace(); - _trace().log("Retrieving KeyFactory for kind `%s` in `%s` namespace.", - kind, namespace.value()); + logger().atTrace() + .log(() -> format( + "Retrieving KeyFactory for kind `%s` in `%s` namespace.", + kind, namespace.value()) + ); keyFactory.setNamespace(namespace.value()); return keyFactory; } diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/DsIdentifier.java b/datastore/src/main/java/io/spine/server/storage/datastore/DsIdentifier.java index d9b0078d..afa4f211 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/DsIdentifier.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/DsIdentifier.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/DsQueryIterator.java b/datastore/src/main/java/io/spine/server/storage/datastore/DsQueryIterator.java index ddbdac5c..1991c9b4 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/DsQueryIterator.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/DsQueryIterator.java @@ -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. @@ -32,7 +32,7 @@ import com.google.cloud.datastore.StructuredQuery; import com.google.common.collect.UnmodifiableIterator; import io.spine.annotation.Internal; -import io.spine.logging.Logging; +import io.spine.logging.WithLogging; import java.util.NoSuchElementException; @@ -58,7 +58,7 @@ * the type of queried objects */ @Internal -public final class DsQueryIterator extends UnmodifiableIterator implements Logging { +public final class DsQueryIterator extends UnmodifiableIterator implements WithLogging { private final StructuredQuery query; private final QueryResults currentPage; diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/DsQueryPageIterator.java b/datastore/src/main/java/io/spine/server/storage/datastore/DsQueryPageIterator.java index 4fb4f30f..587e6b6d 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/DsQueryPageIterator.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/DsQueryPageIterator.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/DsReaderLookup.java b/datastore/src/main/java/io/spine/server/storage/datastore/DsReaderLookup.java index 5ac887a4..e290dc1a 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/DsReaderLookup.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/DsReaderLookup.java @@ -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. @@ -31,7 +31,7 @@ import com.google.cloud.datastore.Key; import com.google.cloud.datastore.StructuredQuery; import com.google.common.collect.ImmutableList; -import io.spine.logging.Logging; +import io.spine.logging.WithLogging; import io.spine.server.storage.datastore.tenant.Namespace; import org.checkerframework.checker.nullness.qual.Nullable; @@ -41,13 +41,14 @@ import static com.google.common.base.Preconditions.checkNotNull; import static java.lang.Math.min; +import static java.lang.String.format; /** * A low-level Datastore lookup. * *

Uses a given {@link DatastoreReader} to find requested methods. */ -final class DsReaderLookup implements Logging { +final class DsReaderLookup implements WithLogging { private static final int MAX_KEYS_PER_READ_REQUEST = 1000; @@ -65,9 +66,12 @@ DsQueryIterator execute(StructuredQuery query, Namespace namespace) { .setNamespace(namespace.value()) .build(); var iterator = new DsQueryIterator<>(queryWithNamespace, datastore); - iterator._trace() - .log("Reading the records of `%s` kind in `%s` namespace.", - query.getKind(), namespace.value()); + iterator.logger() + .atTrace() + .log(() -> format( + "Reading the records of `%s` kind in `%s` namespace.", + query.getKind(), namespace.value()) + ); return iterator; } @@ -98,8 +102,9 @@ DsQueryIterator execute(StructuredQuery query, Namespace namespace) { */ private List readBulk(List keys) { var pageCount = keys.size() / MAX_KEYS_PER_READ_REQUEST + 1; - _trace().log("Reading a big bulk of records synchronously. The data is read as %d pages.", - pageCount); + logger().atTrace() + .log(() -> format( + "Reading a big bulk of records synchronously. The data is read as %d pages.", pageCount)); var lowerBound = 0; var higherBound = MAX_KEYS_PER_READ_REQUEST; var keysLeft = keys.size(); diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/Kind.java b/datastore/src/main/java/io/spine/server/storage/datastore/Kind.java index a058b20b..55f16f48 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/Kind.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/Kind.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/ProjectId.java b/datastore/src/main/java/io/spine/server/storage/datastore/ProjectId.java index 1bbcdac1..4d6247f3 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/ProjectId.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/ProjectId.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/TransactionWrapper.java b/datastore/src/main/java/io/spine/server/storage/datastore/TransactionWrapper.java index b455d3e4..1b1d2e05 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/TransactionWrapper.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/TransactionWrapper.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/config/CreateEntityStorage.java b/datastore/src/main/java/io/spine/server/storage/datastore/config/CreateEntityStorage.java index b1623e59..3f6bdd75 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/config/CreateEntityStorage.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/config/CreateEntityStorage.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/config/CreateRecordStorage.java b/datastore/src/main/java/io/spine/server/storage/datastore/config/CreateRecordStorage.java index 90722085..3625f069 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/config/CreateRecordStorage.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/config/CreateRecordStorage.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/config/CreateStorage.java b/datastore/src/main/java/io/spine/server/storage/datastore/config/CreateStorage.java index eee95799..3baa5cb7 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/config/CreateStorage.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/config/CreateStorage.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/config/CustomStorages.java b/datastore/src/main/java/io/spine/server/storage/datastore/config/CustomStorages.java index 7f4517ba..cef5dc86 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/config/CustomStorages.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/config/CustomStorages.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/config/DsColumnMapping.java b/datastore/src/main/java/io/spine/server/storage/datastore/config/DsColumnMapping.java index 231d19b6..812276ce 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/config/DsColumnMapping.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/config/DsColumnMapping.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/config/EntityGroupLayout.java b/datastore/src/main/java/io/spine/server/storage/datastore/config/EntityGroupLayout.java index 2a4f3413..b4ed4ae6 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/config/EntityGroupLayout.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/config/EntityGroupLayout.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/config/FlatLayout.java b/datastore/src/main/java/io/spine/server/storage/datastore/config/FlatLayout.java index ee4432c9..87156ab7 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/config/FlatLayout.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/config/FlatLayout.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/config/RecordLayout.java b/datastore/src/main/java/io/spine/server/storage/datastore/config/RecordLayout.java index 274fb730..6b17ed2a 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/config/RecordLayout.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/config/RecordLayout.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/config/RecordLayouts.java b/datastore/src/main/java/io/spine/server/storage/datastore/config/RecordLayouts.java index de583302..eda438e4 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/config/RecordLayouts.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/config/RecordLayouts.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/config/Settings.java b/datastore/src/main/java/io/spine/server/storage/datastore/config/Settings.java index dcbefff7..647614c5 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/config/Settings.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/config/Settings.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/config/StorageConfiguration.java b/datastore/src/main/java/io/spine/server/storage/datastore/config/StorageConfiguration.java index 200750b7..a2a118da 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/config/StorageConfiguration.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/config/StorageConfiguration.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/config/TxSetting.java b/datastore/src/main/java/io/spine/server/storage/datastore/config/TxSetting.java index 4e4f5926..0d7272df 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/config/TxSetting.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/config/TxSetting.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/config/TxSettings.java b/datastore/src/main/java/io/spine/server/storage/datastore/config/TxSettings.java index 85e863b0..8a6f29a0 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/config/TxSettings.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/config/TxSettings.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/config/package-info.java b/datastore/src/main/java/io/spine/server/storage/datastore/config/package-info.java index 252c27d9..b4614b2d 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/config/package-info.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/config/package-info.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/delivery/DsSessionStorage.java b/datastore/src/main/java/io/spine/server/storage/datastore/delivery/DsSessionStorage.java index c8d445dd..74f2d1ae 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/delivery/DsSessionStorage.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/delivery/DsSessionStorage.java @@ -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. @@ -28,6 +28,7 @@ import com.google.cloud.datastore.DatastoreException; import com.google.cloud.datastore.Entity; +import com.google.rpc.Code; import io.spine.server.ContextSpec; import io.spine.server.delivery.ShardIndex; import io.spine.server.delivery.ShardSessionRecord; @@ -43,6 +44,9 @@ import java.util.Iterator; import java.util.Optional; +import static com.google.common.base.Preconditions.checkNotNull; +import static io.spine.server.storage.datastore.delivery.DsSessionStorage.UpdateResult.remainedAsIs; +import static io.spine.server.storage.datastore.delivery.DsSessionStorage.UpdateResult.updatedSuccessfully; import static io.spine.util.Exceptions.newIllegalStateException; /** @@ -102,7 +106,7 @@ private static DsEntitySpec newRecordSpec() { private static MessageRecordSpec messageSpec() { @SuppressWarnings("ConstantConditions") /* Protobuf getters never return `nulls`. */ - var spec = new MessageRecordSpec<>( + var spec = new MessageRecordSpec<>( ShardIndex.class, ShardSessionRecord.class, ShardSessionRecord::getIndex, @@ -118,6 +122,7 @@ private static MessageRecordSpec messageSpec() { */ @Override public Optional read(ShardIndex index) { + checkNotClosed(); var key = keyOf(index); try (var tx = newTransaction()) { var result = tx.read(key); @@ -141,6 +146,7 @@ protected Iterator readAll() { */ @SuppressWarnings("OverlyBroadCatchBlock") /* Treating all exceptions similarly. */ public void write(ShardSessionRecord message) { + checkNotClosed(); try (var tx = newTransaction()) { var record = appendColumns(message); var entity = entityRecordToEntity(record); @@ -158,17 +164,24 @@ var record = appendColumns(message); * *

Returns the updated record if the update succeeded. * - *

Returns {@code Optional.empty()} if the update could not be executed, either because - * the rules of the passed {@code RecordUpdate} prevented it, or due to a concurrent changes - * which have happened to the corresponding Datastore entity. + *

Returns {@code Optional.empty()} if the record was concurrently modified + * by another node during the lifespan of this transaction. Another reason + * for returning {@code Optional.empty()} may be the implementation + * of passed {@code PrepareForWrite}, which prevented the update from happening. * * @param index * index of a record to execute an update for * @param update * an update to perform * @return a modified record, or {@code Optional.empty()} if the update could not be executed + * @throws DatastoreException + * if there is a technical issue communicating with Datastore; + * please note this does NOT include the failures related + * to the transaction failure, as they are mean the record was not updated + * due to concurrent modification; in this case {@code Optional.empty()} is returned */ - Optional updateTransactionally(ShardIndex index, PrepareForWrite update) { + UpdateResult + updateTransactionally(ShardIndex index, PrepareForWrite update) throws DatastoreException { try (var tx = newTransaction()) { var key = keyOf(index); var result = tx.read(key); @@ -176,20 +189,44 @@ Optional updateTransactionally(ShardIndex index, PrepareForW @Nullable ShardSessionRecord existing = result.map(this::toRecord) .orElse(null); - var updated = update.prepare(existing); - if (updated.isPresent()) { - var asRecord = updated.get(); + var toWrite = update.prepare(existing); + if (toWrite.isPresent()) { + var asRecord = toWrite.get(); tx.createOrUpdate(toEntity(asRecord)); tx.commit(); + return updatedSuccessfully(asRecord); + } + if (existing != null){ + return remainedAsIs(existing); } - return updated; } catch (DatastoreException e) { - return Optional.empty(); + var errorCode = e.getCode(); + + // We need to distinguish the transaction-related failures from other reasons. + // Therefore, we treat `ABORTED` as such, which prevented the transactional update + // meaning someone else had modified the record. + // + // In all other cases, the original exception most likely signalizes + // of technical issues. Therefore, it is rethrown as-is. + // + // See the original documentation on RPC return codes for more detail. + if (Code.ABORTED.getNumber() == errorCode) { + var existing = read(index); + if(existing.isPresent()) { + return remainedAsIs(existing.get()); + } + } + throw e; } catch (RuntimeException e) { throw newIllegalStateException( e, "Cannot update the `ShardSessionRecord` with index `%s` in a transaction.", index); } + throw newIllegalStateException( + "Cannot update the `ShardSessionRecord` with index `%s` in a transaction. " + + "There seem to be neither existing record, nor updated one in the storage. " + + "Please perform some manual investigation.", + index); } private Entity toEntity(ShardSessionRecord record) { @@ -202,4 +239,51 @@ private RecordWithColumns appendColumns(ShardSes var withCols = RecordWithColumns.create(r, spec); return withCols; } + + static final class UpdateResult { + private final @Nullable ShardSessionRecord success; + private final @Nullable ShardSessionRecord actual; + + private UpdateResult(@Nullable ShardSessionRecord success, + @Nullable ShardSessionRecord actual) { + this.success = success; + this.actual = actual; + } + + static UpdateResult updatedSuccessfully(ShardSessionRecord success) { + checkNotNull(success); + return new UpdateResult(success, null); + } + + static UpdateResult remainedAsIs(ShardSessionRecord actual) { + checkNotNull(actual); + return new UpdateResult(null, actual); + } + + /** + * Tells whether the update was successful. + */ + boolean isSuccessful() { + return success != null; + } + + /** + * Returns a result of the update. + * + *

If the update was successful, returns the updated record. + * + *

Otherwise, returns the record currently residing in the storage. + */ + ShardSessionRecord value() { + if(success != null) { + return success; + } + if(actual != null) { + return actual; + } + throw newIllegalStateException( + "Transactional update of `ShardSessionRecord` must have a non-`null` result." + ); + } + } } diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/delivery/DsShardProcessingSession.java b/datastore/src/main/java/io/spine/server/storage/datastore/delivery/DsShardProcessingSession.java deleted file mode 100644 index 8c19743b..00000000 --- a/datastore/src/main/java/io/spine/server/storage/datastore/delivery/DsShardProcessingSession.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022, 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and/or binary forms, with or without - * modification, must retain the above copyright notice and the following - * disclaimer. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package io.spine.server.storage.datastore.delivery; - -import com.google.common.annotations.VisibleForTesting; -import io.spine.server.delivery.ShardProcessingSession; -import io.spine.server.delivery.ShardSessionRecord; - -/** - * An implementation of a {@link ShardProcessingSession} based on Datastore. - */ -final class DsShardProcessingSession extends ShardProcessingSession { - - private final Runnable completionCallback; - - DsShardProcessingSession(ShardSessionRecord record, - Runnable completionCallback) { - super(record); - this.completionCallback = completionCallback; - } - - @Override - @VisibleForTesting // Otherwise should stay `protected`. - public void complete() { - completionCallback.run(); - } -} diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/delivery/DsShardedWorkRegistry.java b/datastore/src/main/java/io/spine/server/storage/datastore/delivery/DsShardedWorkRegistry.java index 2e2b6b89..79e7a114 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/delivery/DsShardedWorkRegistry.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/delivery/DsShardedWorkRegistry.java @@ -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. @@ -26,13 +26,14 @@ package io.spine.server.storage.datastore.delivery; +import com.google.cloud.datastore.DatastoreException; import com.google.protobuf.Duration; -import io.spine.logging.Logging; +import io.spine.logging.WithLogging; import io.spine.server.ContextSpec; import io.spine.server.NodeId; import io.spine.server.delivery.AbstractWorkRegistry; +import io.spine.server.delivery.PickUpOutcome; import io.spine.server.delivery.ShardIndex; -import io.spine.server.delivery.ShardProcessingSession; import io.spine.server.delivery.ShardSessionRecord; import io.spine.server.delivery.WorkerId; import io.spine.server.storage.datastore.DatastoreStorageFactory; @@ -41,6 +42,8 @@ import java.util.Optional; import static com.google.common.base.Preconditions.checkNotNull; +import static io.spine.server.delivery.PickUpOutcomeMixin.alreadyPicked; +import static io.spine.server.delivery.PickUpOutcomeMixin.pickedUp; /** * A {@link io.spine.server.delivery.ShardedWorkRegistry} based on the Google Datastore storage. @@ -53,7 +56,7 @@ * this implementation with Cloud Firestore in Datastore mode, as it enforces serializable isolation * for transactions. */ -public class DsShardedWorkRegistry extends AbstractWorkRegistry implements Logging { +public class DsShardedWorkRegistry extends AbstractWorkRegistry implements WithLogging { private final DsSessionStorage storage; @@ -84,14 +87,27 @@ public DsShardedWorkRegistry(DatastoreStorageFactory factory, ContextSpec contex * the one started earlier wins. */ @Override - public synchronized Optional pickUp(ShardIndex index, NodeId node) { + public synchronized PickUpOutcome pickUp(ShardIndex index, NodeId node) + throws DatastoreException { checkNotNull(index); checkNotNull(node); var worker = currentWorkerFor(node); var operation = new SetWorkerIfAbsent(index, worker); - var record = storage().updateTransactionally(index, operation); - var session = record.map(this::asSession); - return session; + + var updateResult = storage().updateTransactionally(index, operation); + if (updateResult.isSuccessful()) { + var updatedRecord = updateResult.value(); + return pickedUp(updatedRecord); + } else { + var preExistingRecord = updateResult.value(); + return alreadyPicked(preExistingRecord.getWorker(), + preExistingRecord.getWhenLastPicked()); + } + } + + @Override + public void release(ShardSessionRecord session) { + clearNode(session); } /** @@ -102,11 +118,10 @@ var record = storage().updateTransactionally(index, operation); @Override protected WorkerId currentWorkerFor(NodeId node) { var currentThread = Thread.currentThread().getId(); - var worker = WorkerId - .newBuilder() + var worker = WorkerId.newBuilder() .setNodeId(node) .setValue(String.valueOf(currentThread)) - .vBuild(); + .build(); return worker; } @@ -136,11 +151,6 @@ protected Optional find(ShardIndex index) { return read; } - @Override - protected ShardProcessingSession asSession(ShardSessionRecord record) { - return new DsShardProcessingSession(record, () -> clearNode(record)); - } - /** * Obtains the session storage which persists the session records. */ diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/delivery/InboxStorageLayout.java b/datastore/src/main/java/io/spine/server/storage/datastore/delivery/InboxStorageLayout.java index 267ac7ef..2ab8d58d 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/delivery/InboxStorageLayout.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/delivery/InboxStorageLayout.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/delivery/PrepareForWrite.java b/datastore/src/main/java/io/spine/server/storage/datastore/delivery/PrepareForWrite.java index 2af76039..2a70cdba 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/delivery/PrepareForWrite.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/delivery/PrepareForWrite.java @@ -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. @@ -43,7 +43,7 @@ interface PrepareForWrite { * @param previous * the previous record currently residing in the storage, or {@code null} * if there is no such record - * @return a instance of the record ready to be written to the storage, + * @return an instance of the record ready to be written to the storage, * or {@code Optional.empty()} if no storage update should be performed */ Optional prepare(@Nullable ShardSessionRecord previous); diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/delivery/SessionRecordColumn.java b/datastore/src/main/java/io/spine/server/storage/datastore/delivery/SessionRecordColumn.java index 399f599a..5da22d9b 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/delivery/SessionRecordColumn.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/delivery/SessionRecordColumn.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/delivery/SetWorkerIfAbsent.java b/datastore/src/main/java/io/spine/server/storage/datastore/delivery/SetWorkerIfAbsent.java index e5c94d53..18c78422 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/delivery/SetWorkerIfAbsent.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/delivery/SetWorkerIfAbsent.java @@ -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. @@ -68,7 +68,7 @@ public Optional prepare(@Nullable ShardSessionRecord previou : previous.toBuilder(); var updated = builder.setWorker(worker) .setWhenLastPicked(currentTime()) - .vBuild(); + .build(); return Optional.of(updated); } diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/delivery/package-info.java b/datastore/src/main/java/io/spine/server/storage/datastore/delivery/package-info.java index 75eb8340..f99e99dd 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/delivery/package-info.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/delivery/package-info.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/package-info.java b/datastore/src/main/java/io/spine/server/storage/datastore/package-info.java index d4b9cd96..14cf4a95 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/package-info.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/package-info.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/query/ColumnPredicate.java b/datastore/src/main/java/io/spine/server/storage/datastore/query/ColumnPredicate.java index 193a7915..685be55f 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/query/ColumnPredicate.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/query/ColumnPredicate.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/query/ConvertAsIs.java b/datastore/src/main/java/io/spine/server/storage/datastore/query/ConvertAsIs.java index 27621541..7400f624 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/query/ConvertAsIs.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/query/ConvertAsIs.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/query/DsFilters.java b/datastore/src/main/java/io/spine/server/storage/datastore/query/DsFilters.java index bc491211..dd132c9a 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/query/DsFilters.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/query/DsFilters.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/query/DsLookup.java b/datastore/src/main/java/io/spine/server/storage/datastore/query/DsLookup.java index e031ab8c..e1ee5ce1 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/query/DsLookup.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/query/DsLookup.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/query/DsLookupByIds.java b/datastore/src/main/java/io/spine/server/storage/datastore/query/DsLookupByIds.java index 90de13f8..3f0966de 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/query/DsLookupByIds.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/query/DsLookupByIds.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/query/DsLookupByQueries.java b/datastore/src/main/java/io/spine/server/storage/datastore/query/DsLookupByQueries.java index ee14ff0a..81f78b45 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/query/DsLookupByQueries.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/query/DsLookupByQueries.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/query/FilterAdapter.java b/datastore/src/main/java/io/spine/server/storage/datastore/query/FilterAdapter.java index 774443ad..a5052b3f 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/query/FilterAdapter.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/query/FilterAdapter.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/query/IntermediateResult.java b/datastore/src/main/java/io/spine/server/storage/datastore/query/IntermediateResult.java index 57e15e35..0690a86d 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/query/IntermediateResult.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/query/IntermediateResult.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/query/PreparedQuery.java b/datastore/src/main/java/io/spine/server/storage/datastore/query/PreparedQuery.java index 6f6060b4..22809ff1 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/query/PreparedQuery.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/query/PreparedQuery.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/query/QueryWithFilter.java b/datastore/src/main/java/io/spine/server/storage/datastore/query/QueryWithFilter.java index bb00e0c8..94c9554d 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/query/QueryWithFilter.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/query/QueryWithFilter.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/query/SortAndLimit.java b/datastore/src/main/java/io/spine/server/storage/datastore/query/SortAndLimit.java index 02f3aa9a..f01c745b 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/query/SortAndLimit.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/query/SortAndLimit.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/query/ToRecords.java b/datastore/src/main/java/io/spine/server/storage/datastore/query/ToRecords.java index 39d691f6..16840fd5 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/query/ToRecords.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/query/ToRecords.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/query/package-info.java b/datastore/src/main/java/io/spine/server/storage/datastore/query/package-info.java index 2cfa3d4d..c16ce1ce 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/query/package-info.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/query/package-info.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/record/DsEntityComparator.java b/datastore/src/main/java/io/spine/server/storage/datastore/record/DsEntityComparator.java index f13fd8b8..0e27bc95 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/record/DsEntityComparator.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/record/DsEntityComparator.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/record/DsEntitySpec.java b/datastore/src/main/java/io/spine/server/storage/datastore/record/DsEntitySpec.java index 0f5ac66b..7519c018 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/record/DsEntitySpec.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/record/DsEntitySpec.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/record/DsRecordStorage.java b/datastore/src/main/java/io/spine/server/storage/datastore/record/DsRecordStorage.java index 8393c797..a6057ded 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/record/DsRecordStorage.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/record/DsRecordStorage.java @@ -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. @@ -50,10 +50,12 @@ import org.checkerframework.checker.nullness.qual.NonNull; import java.util.Iterator; +import java.util.Optional; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.collect.Iterators.transform; import static io.spine.server.storage.datastore.record.Entities.builderFromMessage; +import static io.spine.server.storage.datastore.record.Entities.toMessage; import static io.spine.util.Exceptions.newIllegalStateException; /** @@ -104,8 +106,21 @@ protected Iterator index(RecordQuery query) { return result; } + @Override + public Optional read(I id) { + checkNotClosed(); + var key = keyOf(id); + var raw = datastore.read(key); + var result = raw.map(r -> { + R record = toMessage(raw.get(), typeUrl); + return record; + }); + return result; + } + @Override public void write(I id, R record) { + checkNotClosed(); writeRecord(RecordWithColumns.of(id, record)); } @@ -201,7 +216,7 @@ protected final TransactionWrapper newTransaction() { * Converts a Datastore {@code Entity} to the record of type served by this storage. */ protected final R toRecord(Entity entity) { - return Entities.toMessage(entity, typeUrl); + return toMessage(entity, typeUrl); } private V read(ReadOperation operation) { @@ -211,8 +226,7 @@ private V read(ReadOperation operation) { tx.commit(); return result; } catch (RuntimeException e) { - throw newIllegalStateException(e, "" + - "Error executing `ReadOperation` transactionally."); + throw exceptionWithMessage(e, "ReadOperation"); } } else { var result = operation.perform(datastore); @@ -220,14 +234,18 @@ private V read(ReadOperation operation) { } } + private static RuntimeException + exceptionWithMessage(RuntimeException e, String operation) throws IllegalStateException { + throw newIllegalStateException(e, "Error executing `%s` transactionally.", operation); + } + private void write(WriteOperation operation) { if (txSetting.txEnabled()) { try (var tx = newTransaction()) { operation.perform(tx); tx.commit(); } catch (RuntimeException e) { - throw newIllegalStateException(e, "" + - "Error executing `WriteOperation` transactionally."); + throw exceptionWithMessage(e, "WriteOperation"); } } else { operation.perform(datastore); diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/record/Entities.java b/datastore/src/main/java/io/spine/server/storage/datastore/record/Entities.java index 9e5f52f1..f0ffacf9 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/record/Entities.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/record/Entities.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/record/FieldMaskApplier.java b/datastore/src/main/java/io/spine/server/storage/datastore/record/FieldMaskApplier.java index e5499aa5..c9bf5e4b 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/record/FieldMaskApplier.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/record/FieldMaskApplier.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/record/Indexes.java b/datastore/src/main/java/io/spine/server/storage/datastore/record/Indexes.java index 1e3cfc4b..4e1c5a2c 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/record/Indexes.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/record/Indexes.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/record/ReadOperation.java b/datastore/src/main/java/io/spine/server/storage/datastore/record/ReadOperation.java index fceaa2bb..aaa52f87 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/record/ReadOperation.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/record/ReadOperation.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/record/RecordId.java b/datastore/src/main/java/io/spine/server/storage/datastore/record/RecordId.java index 5506eb6e..6cb3696a 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/record/RecordId.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/record/RecordId.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/record/WriteOperation.java b/datastore/src/main/java/io/spine/server/storage/datastore/record/WriteOperation.java index 24aa871b..4327f489 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/record/WriteOperation.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/record/WriteOperation.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/record/package-info.java b/datastore/src/main/java/io/spine/server/storage/datastore/record/package-info.java index b4c51fbb..2496afad 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/record/package-info.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/record/package-info.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/tenant/DatastoreTenants.java b/datastore/src/main/java/io/spine/server/storage/datastore/tenant/DatastoreTenants.java index cf81b60b..83521075 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/tenant/DatastoreTenants.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/tenant/DatastoreTenants.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/tenant/DefaultNamespaceConverter.java b/datastore/src/main/java/io/spine/server/storage/datastore/tenant/DefaultNamespaceConverter.java index a477a1d5..f0f7b317 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/tenant/DefaultNamespaceConverter.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/tenant/DefaultNamespaceConverter.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/tenant/MultitenantNamespaceSupplier.java b/datastore/src/main/java/io/spine/server/storage/datastore/tenant/MultitenantNamespaceSupplier.java index bf8a056c..fcd1c9b3 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/tenant/MultitenantNamespaceSupplier.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/tenant/MultitenantNamespaceSupplier.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/tenant/Namespace.java b/datastore/src/main/java/io/spine/server/storage/datastore/tenant/Namespace.java index 9e83511e..69a69f20 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/tenant/Namespace.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/tenant/Namespace.java @@ -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. @@ -246,7 +246,7 @@ public String value() { * {@code * TenantId.newBuilder() * .setValue(namespace.value()) - * .vBuild(); + * .build(); * } * * diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/tenant/NamespaceConverter.java b/datastore/src/main/java/io/spine/server/storage/datastore/tenant/NamespaceConverter.java index 888a6511..1a467e0c 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/tenant/NamespaceConverter.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/tenant/NamespaceConverter.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/tenant/NamespaceConverters.java b/datastore/src/main/java/io/spine/server/storage/datastore/tenant/NamespaceConverters.java index a2f5e9d1..0d6bf82a 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/tenant/NamespaceConverters.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/tenant/NamespaceConverters.java @@ -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. @@ -144,10 +144,10 @@ protected String toSignificantString(TenantId tenantId) { protected TenantId significantStringToTenantId(String namespace) { var domain = InternetDomain.newBuilder() .setValue(namespace) - .vBuild(); + .build(); var tenantId = TenantId.newBuilder() .setDomain(domain) - .vBuild(); + .build(); return tenantId; } } @@ -170,10 +170,10 @@ protected String toSignificantString(TenantId tenantId) { protected TenantId significantStringToTenantId(String namespace) { var email = EmailAddress.newBuilder() .setValue(namespace) - .vBuild(); + .build(); var tenantId = TenantId.newBuilder() .setEmail(email) - .vBuild(); + .build(); return tenantId; } } @@ -195,7 +195,7 @@ protected String toSignificantString(TenantId tenantId) { protected TenantId significantStringToTenantId(String namespace) { var tenantId = TenantId.newBuilder() .setValue(namespace) - .vBuild(); + .build(); return tenantId; } } @@ -212,7 +212,7 @@ protected String toString(TenantId tenantId) { protected TenantId toTenantId(String namespace) { var tenantId = TenantId.newBuilder() .setValue(namespace) - .vBuild(); + .build(); return tenantId; } } diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/tenant/NamespaceIndex.java b/datastore/src/main/java/io/spine/server/storage/datastore/tenant/NamespaceIndex.java index 4a980b06..708c0c44 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/tenant/NamespaceIndex.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/tenant/NamespaceIndex.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/tenant/NamespaceSupplier.java b/datastore/src/main/java/io/spine/server/storage/datastore/tenant/NamespaceSupplier.java index 3d965b17..618ee4ee 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/tenant/NamespaceSupplier.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/tenant/NamespaceSupplier.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/tenant/NsConverterFactory.java b/datastore/src/main/java/io/spine/server/storage/datastore/tenant/NsConverterFactory.java index 363ebf4d..fdf783c8 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/tenant/NsConverterFactory.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/tenant/NsConverterFactory.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/tenant/PrefixedNsConverterFactory.java b/datastore/src/main/java/io/spine/server/storage/datastore/tenant/PrefixedNsConverterFactory.java index 0aff0b9e..3e90c080 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/tenant/PrefixedNsConverterFactory.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/tenant/PrefixedNsConverterFactory.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/tenant/SingleTenantNamespaceSupplier.java b/datastore/src/main/java/io/spine/server/storage/datastore/tenant/SingleTenantNamespaceSupplier.java index 73542499..871689c9 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/tenant/SingleTenantNamespaceSupplier.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/tenant/SingleTenantNamespaceSupplier.java @@ -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. diff --git a/datastore/src/main/java/io/spine/server/storage/datastore/tenant/package-info.java b/datastore/src/main/java/io/spine/server/storage/datastore/tenant/package-info.java index 0719d80f..8e8720f4 100644 --- a/datastore/src/main/java/io/spine/server/storage/datastore/tenant/package-info.java +++ b/datastore/src/main/java/io/spine/server/storage/datastore/tenant/package-info.java @@ -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. diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/BigDataTester.java b/datastore/src/test/java/io/spine/server/storage/datastore/BigDataTester.java index 96f46090..06c26fcc 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/BigDataTester.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/BigDataTester.java @@ -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. @@ -28,7 +28,7 @@ import com.google.common.base.Throwables; import com.google.protobuf.Message; -import io.spine.logging.Logging; +import io.spine.logging.WithLogging; import io.spine.server.storage.RecordStorage; import io.spine.server.storage.RecordStorageUnderTest; @@ -53,7 +53,7 @@ * separately. * *

The test suits based on this utility are not expected to check if the read records match - * those that were written or not. Instead they should just check the time consumed by + * those that were written or not. Instead, they should just check the time consumed by * the operations and the consistency of the data (i.e. count of the records written and read). * * @param @@ -61,7 +61,7 @@ * @param * the type of the records served by the {@code RecordStorage} under test */ -public final class BigDataTester implements Logging { +public final class BigDataTester implements WithLogging { private static final int DEFAULT_BULK_SIZE = 500; @@ -126,7 +126,8 @@ public void testBigDataOperations(RecordStorageUnderTest storage) { writeTime)); } - _debug().log("Writing took %d millis.", writeTime); + logger().atDebug() + .log(() -> format("Writing took %d millis.", writeTime)); try { Thread.sleep(1000); @@ -147,7 +148,8 @@ public void testBigDataOperations(RecordStorageUnderTest storage) { readMillisLimit, readTime)); } - _debug().log("Reading took %d millis.", readTime); + logger().atDebug() + .log(() -> format("Reading took %d millis.", readTime)); assertEquals(records.size(), size(readResults), "Unexpected record count read."); } diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/DatastoreStorageFactoryBuilderTest.java b/datastore/src/test/java/io/spine/server/storage/datastore/DatastoreStorageFactoryBuilderTest.java index a7a31459..66a8889c 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/DatastoreStorageFactoryBuilderTest.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/DatastoreStorageFactoryBuilderTest.java @@ -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. diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/DatastoreStorageFactoryTest.java b/datastore/src/test/java/io/spine/server/storage/datastore/DatastoreStorageFactoryTest.java index 4bff9749..4400793e 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/DatastoreStorageFactoryTest.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/DatastoreStorageFactoryTest.java @@ -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. @@ -134,7 +134,7 @@ void testClose() { void namespaceForMultitenant() { var tenant = TenantId.newBuilder() .setValue("my-company") - .vBuild(); + .build(); var namespace = "Vnon-null-or-empty-namespace"; var options = local().getOptions() .toBuilder() @@ -157,7 +157,7 @@ void namespaceForMultitenant() { void testDatastoreNamespaceInOptions() { var tenant = TenantId.newBuilder() .setValue("your-company") - .vBuild(); + .build(); var spec = multitenant(testName()); var datastore = local(); var factory = factoryFor(datastore); @@ -231,11 +231,11 @@ private static Key.Builder writeForTenant(RecordStorage storage.write(id, project) ); diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/DatastoreWrapperTest.java b/datastore/src/test/java/io/spine/server/storage/datastore/DatastoreWrapperTest.java index 0211c133..cba7a689 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/DatastoreWrapperTest.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/DatastoreWrapperTest.java @@ -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. @@ -319,19 +319,19 @@ void testGenerateKeyFactory() { ensureNamespace(tenantId3Prefixed, datastore); var emailAddress2 = EmailAddress.newBuilder() .setValue(tenantId2) - .vBuild(); + .build(); var internetDomain3 = InternetDomain.newBuilder() .setValue(tenantId3) - .vBuild(); + .build(); var id1 = TenantId.newBuilder() .setValue(tenantId1) - .vBuild(); + .build(); var id2 = TenantId.newBuilder() .setEmail(emailAddress2) - .vBuild(); + .build(); var id3 = TenantId.newBuilder() .setDomain(internetDomain3) - .vBuild(); + .build(); checkTenantIdInKey(tenantId1Prefixed, id1, wrapper); checkTenantIdInKey(tenantId2Prefixed, id2, wrapper); checkTenantIdInKey(tenantId3Prefixed, id3, wrapper); @@ -378,7 +378,7 @@ void testNewNamespaces() { var wrapper = wrap(localDatastore(), multitenant()); var tenantId = TenantId.newBuilder() .setValue("Luke_I_am_your_tenant.") - .vBuild(); + .build(); var key = "noooooo"; var entityKey = new TenantAwareFunction0(tenantId) { @Override diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/DsEventStoreTest.java b/datastore/src/test/java/io/spine/server/storage/datastore/DsEventStoreTest.java index a3ad5552..b8ea588d 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/DsEventStoreTest.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/DsEventStoreTest.java @@ -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. diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/DsInboxStorageTest.java b/datastore/src/test/java/io/spine/server/storage/datastore/DsInboxStorageTest.java index 684f48a3..2d29e17f 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/DsInboxStorageTest.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/DsInboxStorageTest.java @@ -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. diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/KindTest.java b/datastore/src/test/java/io/spine/server/storage/datastore/KindTest.java index 474278e8..4c07a7be 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/KindTest.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/KindTest.java @@ -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. diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/ProjectIdTest.java b/datastore/src/test/java/io/spine/server/storage/datastore/ProjectIdTest.java index 22eb568f..21f3edab 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/ProjectIdTest.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/ProjectIdTest.java @@ -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. diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/RecordIdTest.java b/datastore/src/test/java/io/spine/server/storage/datastore/RecordIdTest.java index bdb024e9..31b3f0af 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/RecordIdTest.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/RecordIdTest.java @@ -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. diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/TransactionWrapperTest.java b/datastore/src/test/java/io/spine/server/storage/datastore/TransactionWrapperTest.java index 251f06d6..59cea1b6 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/TransactionWrapperTest.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/TransactionWrapperTest.java @@ -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. diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/TransactionalInboxStorageTest.java b/datastore/src/test/java/io/spine/server/storage/datastore/TransactionalInboxStorageTest.java index 94753127..669279c4 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/TransactionalInboxStorageTest.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/TransactionalInboxStorageTest.java @@ -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. diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/config/DsColumnMappingTest.java b/datastore/src/test/java/io/spine/server/storage/datastore/config/DsColumnMappingTest.java index 4b18e8b3..3d646ea7 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/config/DsColumnMappingTest.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/config/DsColumnMappingTest.java @@ -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. @@ -41,6 +41,7 @@ import io.spine.string.Stringifiers; import io.spine.test.storage.StgProject; import io.spine.test.storage.StgProject.Status; +import io.spine.test.storage.StgProjectId; import io.spine.testing.TestValues; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; @@ -48,6 +49,7 @@ import static com.google.cloud.Timestamp.ofTimeSecondsAndNanos; import static com.google.common.truth.Truth.assertThat; +import static io.spine.base.Time.currentTime; import static java.nio.charset.StandardCharsets.UTF_8; @DisplayName("`DsColumnMapping` should") @@ -121,7 +123,11 @@ void enumAsLongValue() { @Test @DisplayName("generic `Message` as `StringValue`") void messageAsStringValue() { + var id = StgProjectId.newBuilder() + .setId("ID") + .build(); var project = StgProject.newBuilder() + .setId(id) .setName("project-name") .build(); var messageAsString = Stringifiers.toString(project); @@ -131,7 +137,7 @@ void messageAsStringValue() { @Test @DisplayName("`Timestamp` as `TimestampValue`") void timestampAsTimestampValue() { - var timestamp = Time.currentTime(); + var timestamp = currentTime(); assertConverts(timestamp, TimestampValue.of( ofTimeSecondsAndNanos(timestamp.getSeconds(), timestamp.getNanos()) )); @@ -143,6 +149,7 @@ void versionAsLongValue() { var number = 42; var version = Version.newBuilder() .setNumber(number) + .setTimestamp(currentTime()) .build(); assertConverts(version, LongValue.of(number)); } diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/delivery/DsCatchUpSmokeTest.java b/datastore/src/test/java/io/spine/server/storage/datastore/delivery/DsCatchUpSmokeTest.java index 25681d31..0c2738c7 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/delivery/DsCatchUpSmokeTest.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/delivery/DsCatchUpSmokeTest.java @@ -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. @@ -61,25 +61,4 @@ void tearDownStorageFactory() { factory.tearDown(); } } - - @Test - @Disabled - @Override - public void withNanosByIds() throws InterruptedException { - super.withNanosByIds(); - } - - @Test - @Disabled - @Override - public void withMillisByIds() throws InterruptedException { - super.withMillisByIds(); - } - - @Test - @Disabled - @Override - public void withMillisAllInOrder() throws InterruptedException { - super.withMillisAllInOrder(); - } } diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/delivery/DsDeliverySmokeTest.java b/datastore/src/test/java/io/spine/server/storage/datastore/delivery/DsDeliverySmokeTest.java index f35ba1df..11aeb35e 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/delivery/DsDeliverySmokeTest.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/delivery/DsDeliverySmokeTest.java @@ -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. diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/delivery/DsShardedWorkRegistryTest.java b/datastore/src/test/java/io/spine/server/storage/datastore/delivery/DsShardedWorkRegistryTest.java index b47601f0..e86287ae 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/delivery/DsShardedWorkRegistryTest.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/delivery/DsShardedWorkRegistryTest.java @@ -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. @@ -46,7 +46,7 @@ import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth8.assertThat; -import static io.spine.base.Identifier.*; +import static io.spine.base.Identifier.newUuid; import static io.spine.server.ContextSpec.singleTenant; import static io.spine.server.storage.datastore.given.TestShardIndex.newIndex; import static org.junit.jupiter.api.Assertions.assertNotEquals; @@ -117,13 +117,15 @@ var record = assertPickUp(index); @CanIgnoreReturnValue private ShardSessionRecord assertPickUp(ShardIndex index) { - var session = registry.pickUp(index, node); - assertThat(session).isPresent(); - assertThat(session.get().shardIndex()).isEqualTo(index); + var outcome = registry.pickUp(index, node); + assertThat(outcome.hasSession()).isTrue(); + assertThat(outcome.getSession() + .getIndex()).isEqualTo(index); var record = readSingleRecord(index); assertThat(record.getIndex()).isEqualTo(index); - assertThat(record.getWorker().getNodeId()).isEqualTo(node); + assertThat(record.getWorker() + .getNodeId()).isEqualTo(node); return record; } @@ -132,39 +134,54 @@ var record = readSingleRecord(index); @Test @DisplayName("not be able to pick up the shard if it's already picked up") void cannotPickUpIfTaken() { - var session = registry.pickUp(index, node); - assertThat(session).isPresent(); + var outcome = registry.pickUp(index, node); + assertThat(outcome.hasSession()) + .isTrue(); + + var capturingWorker = outcome.getSession() + .getWorker(); var sameIdxSameNode = registry.pickUp(index, node); - assertThat(sameIdxSameNode).isEmpty(); + assertThat(sameIdxSameNode.hasSession()).isFalse(); + assertThat(sameIdxSameNode.getAlreadyPicked() + .getWorker()).isEqualTo(capturingWorker); var sameIdxAnotherNode = registry.pickUp(index, newNode()); - assertThat(sameIdxAnotherNode).isEmpty(); + assertThat(sameIdxAnotherNode.hasSession()).isFalse(); + assertThat(sameIdxAnotherNode.getAlreadyPicked() + .getWorker()).isEqualTo(capturingWorker); var anotherIdx = newIndex(24, 100); var anotherIdxSameNode = registry.pickUp(anotherIdx, node); - assertThat(anotherIdxSameNode).isPresent(); + assertThat(anotherIdxSameNode.hasSession()).isTrue(); + var anotherCapturingWorker = anotherIdxSameNode.getSession() + .getWorker(); + assertThat(anotherIdxSameNode.getSession() + .getIndex()).isEqualTo(anotherIdx); var anotherIdxAnotherNode = registry.pickUp(anotherIdx, newNode()); - assertThat(anotherIdxAnotherNode).isEmpty(); + assertThat(anotherIdxAnotherNode.hasSession()).isFalse(); + assertThat(sameIdxAnotherNode.getAlreadyPicked() + .getWorker()).isEqualTo(anotherCapturingWorker); + } @Test @DisplayName("complete the shard session (once a worker assigned) and make it available for picking up") void completeSessionAndMakeItAvailable() { - var optional = registry.pickUp(index, node); - assertThat(optional).isPresent(); + var outcome = registry.pickUp(index, node); + assertThat(outcome.hasSession()).isTrue(); var whenPickedFirst = readSingleRecord(index).getWhenLastPicked(); - var session = (DsShardProcessingSession) optional.get(); - session.complete(); + var session = outcome.getSession(); + registry.release(session); var completedRecord = readSingleRecord(index); assertThat(completedRecord.hasWorker()).isFalse(); var anotherNode = newNode(); - var anotherOptional = registry.pickUp(index, anotherNode); - assertThat(anotherOptional).isPresent(); + var anotherOutcome = registry.pickUp(index, anotherNode); + assertThat(anotherOutcome.hasSession()).isTrue(); var secondSessionRecord = readSingleRecord(index); assertThat(secondSessionRecord.getWorker().getNodeId()).isEqualTo(anotherNode); @@ -192,6 +209,6 @@ var record = registry.storage().read(index); private static NodeId newNode() { return NodeId.newBuilder() .setValue(newUuid()) - .vBuild(); + .build(); } } diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/delivery/SessionRecordColumnTest.java b/datastore/src/test/java/io/spine/server/storage/datastore/delivery/SessionRecordColumnTest.java index f27ab80d..de34989c 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/delivery/SessionRecordColumnTest.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/delivery/SessionRecordColumnTest.java @@ -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. @@ -55,7 +55,7 @@ void nodeChanges() { var worker = initialWorker .toBuilder() .setNodeId(node) - .vBuild(); + .build(); var value = columnValueFor(worker); assertThat(value).isNotEqualTo(initialValue); } @@ -81,7 +81,7 @@ private NodeId newNodeId() { return NodeId .newBuilder() .setValue(newUuid()) - .vBuild(); + .build(); } private WorkerId newWorkerId(NodeId node) { @@ -89,7 +89,7 @@ private WorkerId newWorkerId(NodeId node) { .newBuilder() .setNodeId(node) .setValue(newUuid()) - .vBuild(); + .build(); } @SuppressWarnings("ConstantConditions" /* We are not using a "material" record here. */) @@ -98,7 +98,7 @@ private String columnValueFor(WorkerId worker) { .newBuilder() .setIndex(newIndex(1, 15)) .setWorker(worker) - .vBuild(); + .build(); return SessionRecordColumn.worker.valueIn(session); } } diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/given/DatastoreStorageFactoryTestEnv.java b/datastore/src/test/java/io/spine/server/storage/datastore/given/DatastoreStorageFactoryTestEnv.java index b8793ae8..f300acc0 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/given/DatastoreStorageFactoryTestEnv.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/given/DatastoreStorageFactoryTestEnv.java @@ -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. diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/given/DatastoreWrapperTestEnv.java b/datastore/src/test/java/io/spine/server/storage/datastore/given/DatastoreWrapperTestEnv.java index c822626f..753ce1e4 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/given/DatastoreWrapperTestEnv.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/given/DatastoreWrapperTestEnv.java @@ -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. diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/given/TestColumnMapping.java b/datastore/src/test/java/io/spine/server/storage/datastore/given/TestColumnMapping.java index 69d49e49..c4b73bdd 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/given/TestColumnMapping.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/given/TestColumnMapping.java @@ -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. diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/given/TestEnvironment.java b/datastore/src/test/java/io/spine/server/storage/datastore/given/TestEnvironment.java index cddbb850..ae911215 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/given/TestEnvironment.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/given/TestEnvironment.java @@ -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. diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/given/TestNamespaceSuppliers.java b/datastore/src/test/java/io/spine/server/storage/datastore/given/TestNamespaceSuppliers.java index be73bdac..2582f972 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/given/TestNamespaceSuppliers.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/given/TestNamespaceSuppliers.java @@ -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. diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/given/TestRecordSpec.java b/datastore/src/test/java/io/spine/server/storage/datastore/given/TestRecordSpec.java index 394d63c2..28df608b 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/given/TestRecordSpec.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/given/TestRecordSpec.java @@ -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. diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/given/TestShardIndex.java b/datastore/src/test/java/io/spine/server/storage/datastore/given/TestShardIndex.java index 9930666f..e22eacc7 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/given/TestShardIndex.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/given/TestShardIndex.java @@ -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. @@ -53,6 +53,6 @@ public static ShardIndex newIndex(int shardIndex, int totalShards) { return ShardIndex.newBuilder() .setIndex(shardIndex) .setOfTotal(totalShards) - .vBuild(); + .build(); } } diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/given/package-info.java b/datastore/src/test/java/io/spine/server/storage/datastore/given/package-info.java index 749e2d47..3532f276 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/given/package-info.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/given/package-info.java @@ -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. diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/query/DsFiltersTest.java b/datastore/src/test/java/io/spine/server/storage/datastore/query/DsFiltersTest.java index aabf1318..975e99cf 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/query/DsFiltersTest.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/query/DsFiltersTest.java @@ -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. diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/record/DsAggregateStorageTest.java b/datastore/src/test/java/io/spine/server/storage/datastore/record/DsAggregateStorageTest.java index 2de39d1d..aa3d631e 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/record/DsAggregateStorageTest.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/record/DsAggregateStorageTest.java @@ -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. diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/record/DsAggregateStorageTruncationTest.java b/datastore/src/test/java/io/spine/server/storage/datastore/record/DsAggregateStorageTruncationTest.java index 79eb6f2c..b00aa4e7 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/record/DsAggregateStorageTruncationTest.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/record/DsAggregateStorageTruncationTest.java @@ -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. diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/record/DsRecordStorageTest.java b/datastore/src/test/java/io/spine/server/storage/datastore/record/DsRecordStorageTest.java index 258dc338..e28810f2 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/record/DsRecordStorageTest.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/record/DsRecordStorageTest.java @@ -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. @@ -115,7 +115,7 @@ void testPersistColumns() { .setProjectVersion(expectedVersion) .setDueDate(expectedDueDate) .setStatus(expectedStatus) - .vBuild(); + .build(); storage().write(id, project); // Read Datastore Entity diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/record/EntitiesTest.java b/datastore/src/test/java/io/spine/server/storage/datastore/record/EntitiesTest.java index 10d71cc8..9adf27c3 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/record/EntitiesTest.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/record/EntitiesTest.java @@ -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. diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/record/IndexesTest.java b/datastore/src/test/java/io/spine/server/storage/datastore/record/IndexesTest.java index 9395d070..bc9856f4 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/record/IndexesTest.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/record/IndexesTest.java @@ -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. diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/tenant/DatastoreTenantsTest.java b/datastore/src/test/java/io/spine/server/storage/datastore/tenant/DatastoreTenantsTest.java index 571fe02f..469e5a36 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/tenant/DatastoreTenantsTest.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/tenant/DatastoreTenantsTest.java @@ -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. @@ -53,7 +53,7 @@ void testCreateIndex() { var customNamespace = "Vmy-namespace"; var customId = TenantId.newBuilder() .setValue(customNamespace) - .vBuild(); + .build(); index.keep(customId); var ids = index.all(); diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/tenant/NamespaceConvertersTest.java b/datastore/src/test/java/io/spine/server/storage/datastore/tenant/NamespaceConvertersTest.java index 20c861a9..34e54242 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/tenant/NamespaceConvertersTest.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/tenant/NamespaceConvertersTest.java @@ -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. diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/tenant/NamespaceIndexTest.java b/datastore/src/test/java/io/spine/server/storage/datastore/tenant/NamespaceIndexTest.java index 8972c0c5..e73bb2f2 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/tenant/NamespaceIndexTest.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/tenant/NamespaceIndexTest.java @@ -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. @@ -79,7 +79,7 @@ final class NamespaceIndexTest { private static TenantId newTenantId() { return TenantId.newBuilder() .setValue(TestValues.randomString()) - .vBuild(); + .build(); } @BeforeEach @@ -174,7 +174,7 @@ void findPrefixedNamespaces() { .createRecordStorage(context.spec(), EntityRecordSpec.of(CollegeProjection.class)); var id = CollegeId.newBuilder() .setValue("Aeronautic Forgery College") - .vBuild(); + .build(); var record = EntityRecord.newBuilder() .setEntityId(Identifier.pack(id)) .setState(pack(College.newBuilder() @@ -213,7 +213,7 @@ private static void testSynchronizeAccessMethods() throws InterruptedException { .map(key -> TenantId.newBuilder() .setValue(key.getName() .substring(1)) - .vBuild()) + .build()) .collect(toList()); NamespaceIndex.NamespaceQuery namespaceQuery = keys::iterator; @@ -231,10 +231,10 @@ private static void testSynchronizeAccessMethods() throws InterruptedException { // Add new element var domain = InternetDomain.newBuilder() .setValue("my.tenant.com") - .vBuild(); + .build(); var newTenantId = TenantId.newBuilder() .setDomain(domain) - .vBuild(); + .build(); namespaceIndex.keep(newTenantId); // sync // Check new value added diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/tenant/NamespaceTest.java b/datastore/src/test/java/io/spine/server/storage/datastore/tenant/NamespaceTest.java index 0025a9a6..a8b3a387 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/tenant/NamespaceTest.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/tenant/NamespaceTest.java @@ -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. @@ -76,7 +76,7 @@ void testEquals() { var aGroupValue = "namespace1"; var aGroupTenantId = TenantId.newBuilder() .setValue(aGroupValue) - .vBuild(); + .build(); var aGroupNamespaceFromTenantId = Namespace.of(aGroupTenantId, true, NsConverterFactory.defaults()); var aGroupNamespaceFromString = Namespace.of(aGroupValue); @@ -85,10 +85,10 @@ void testEquals() { var bGroupValue = "namespace2"; var bgGroupEmail = EmailAddress.newBuilder() .setValue(bGroupValue) - .vBuild(); + .build(); var bGroupTenantId = TenantId.newBuilder() .setEmail(bgGroupEmail) - .vBuild(); + .build(); var bGroupNamespaceFromTenantId = Namespace.of(bGroupTenantId, true); // Same string but other type var cGroupNamespaceFromString = Namespace.of(bGroupValue); @@ -107,19 +107,19 @@ void testToTenantId() { var randomTenantIdString = "arbitrary-tenant-id"; var internetDomain = InternetDomain.newBuilder() .setValue(randomTenantIdString) - .vBuild(); + .build(); var domainId = TenantId.newBuilder() .setDomain(internetDomain) - .vBuild(); + .build(); var emailAddress = EmailAddress.newBuilder() .setValue(randomTenantIdString) - .vBuild(); + .build(); var emailId = TenantId.newBuilder() .setEmail(emailAddress) - .vBuild(); + .build(); var stringId = TenantId.newBuilder() .setValue(randomTenantIdString) - .vBuild(); + .build(); assertNotEquals(domainId, emailId); assertNotEquals(domainId, stringId); assertNotEquals(emailId, stringId); @@ -170,7 +170,7 @@ void testConvertToTenantId() { var expectedId = TenantId.newBuilder() .setValue(namespaceString) - .vBuild(); + .build(); var namespace = Namespace.of(namespaceString); var actualId = namespace.toTenantId(); assertEquals(expectedId, actualId); diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/tenant/NamespaceWithCustomConverterTest.java b/datastore/src/test/java/io/spine/server/storage/datastore/tenant/NamespaceWithCustomConverterTest.java index 01ad2fc0..18a6801f 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/tenant/NamespaceWithCustomConverterTest.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/tenant/NamespaceWithCustomConverterTest.java @@ -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. @@ -50,7 +50,7 @@ void testFromTenantId() { var ns = "my.test.namespace.from.tenant.id"; var tenantId = TenantId.newBuilder() .setValue(ns) - .vBuild(); + .build(); var multitenant = true; var namespace = Namespace.of(tenantId, multitenant, factory); var converter = factory.get(multitenant); @@ -75,7 +75,7 @@ void testToTenantId() { var ns = "my.test.namespace.to.tenant.id"; var tenantId = TenantId.newBuilder() .setValue(ns) - .vBuild(); + .build(); var namespace = Namespace.of(tenantId, true, factory); assertEquals(tenantId, namespace.toTenantId()); } diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/tenant/PrefixedNsConverterFactoryTest.java b/datastore/src/test/java/io/spine/server/storage/datastore/tenant/PrefixedNsConverterFactoryTest.java index a5bdb80c..bb7cb971 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/tenant/PrefixedNsConverterFactoryTest.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/tenant/PrefixedNsConverterFactoryTest.java @@ -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. diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/tenant/SingleTenantNamespaceSupplierTest.java b/datastore/src/test/java/io/spine/server/storage/datastore/tenant/SingleTenantNamespaceSupplierTest.java index 01676db9..c00e219a 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/tenant/SingleTenantNamespaceSupplierTest.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/tenant/SingleTenantNamespaceSupplierTest.java @@ -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. diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/tenant/TestNamespaceIndex.java b/datastore/src/test/java/io/spine/server/storage/datastore/tenant/TestNamespaceIndex.java index 0a77ada2..b7543efc 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/tenant/TestNamespaceIndex.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/tenant/TestNamespaceIndex.java @@ -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. diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/tenant/given/CollegeProjection.java b/datastore/src/test/java/io/spine/server/storage/datastore/tenant/given/CollegeProjection.java index 2d2ba0f0..fbbe42ef 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/tenant/given/CollegeProjection.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/tenant/given/CollegeProjection.java @@ -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. diff --git a/datastore/src/test/java/io/spine/server/storage/datastore/tenant/given/package-info.java b/datastore/src/test/java/io/spine/server/storage/datastore/tenant/given/package-info.java index 95a062bf..6b0de382 100644 --- a/datastore/src/test/java/io/spine/server/storage/datastore/tenant/given/package-info.java +++ b/datastore/src/test/java/io/spine/server/storage/datastore/tenant/given/package-info.java @@ -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. diff --git a/datastore/src/test/proto/spine/test/datastore/college.proto b/datastore/src/test/proto/spine/test/datastore/college.proto index c23aa45c..44cca7bd 100644 --- a/datastore/src/test/proto/spine/test/datastore/college.proto +++ b/datastore/src/test/proto/spine/test/datastore/college.proto @@ -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. diff --git a/gcs.properties b/gcs.properties index f9eb5f40..3491b77b 100644 --- a/gcs.properties +++ b/gcs.properties @@ -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. diff --git a/gradle.properties b/gradle.properties index 6fd78595..b6ed5027 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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. @@ -25,6 +25,7 @@ # # Allow more memory to builds, as long as bulk read-write operations are performed during testing. +# +# Also, Dokka plugin eats more memory than usual. Therefore, all builds should have enough. +org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=1024m -XX:+UseParallelGC -org.gradle.daemon=true -org.gradle.jvmargs=-Xmx2048m diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7454180f..943f0cbf 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index aa991fce..4e86b927 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-bin.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 1b6c7873..65dcd68d 100755 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,10 +80,10 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' @@ -143,12 +143,16 @@ fi if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -205,6 +209,12 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/gradlew.bat b/gradlew.bat index 107acd32..93e3f59f 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +25,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/license-report.md b/license-report.md index 31b59140..c8e3a132 100644 --- a/license-report.md +++ b/license-report.md @@ -1,13 +1,13 @@ -# Dependencies of `io.spine.gcloud:spine-datastore:2.0.0-SNAPSHOT.94` +# Dependencies of `io.spine.gcloud:spine-datastore:2.0.0-SNAPSHOT.155` ## Runtime -1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.13.0.**No license information found** -1. **Group** : com.fasterxml.jackson.core. **Name** : jackson-core. **Version** : 2.13.0. +1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.15.2.**No license information found** +1. **Group** : com.fasterxml.jackson.core. **Name** : jackson-core. **Version** : 2.15.2. * **Project URL:** [https://github.com/FasterXML/jackson-core](https://github.com/FasterXML/jackson-core) * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) - * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : com.google.android. **Name** : annotations. **Version** : 4.1.1.4. * **Project URL:** [http://source.android.com/](http://source.android.com/) @@ -47,8 +47,8 @@ 1. **Group** : com.google.auth. **Name** : google-auth-library-oauth2-http. **Version** : 1.3.0. * **License:** [BSD New license](http://opensource.org/licenses/BSD-3-Clause) -1. **Group** : com.google.auto.value. **Name** : auto-value-annotations. **Version** : 1.9. - * **Project URL:** [https://github.com/google/auto/tree/master/value](https://github.com/google/auto/tree/master/value) +1. **Group** : com.google.auto.value. **Name** : auto-value-annotations. **Version** : 1.10.2. + * **Project URL:** [https://github.com/google/auto/tree/main/value](https://github.com/google/auto/tree/main/value) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : com.google.cloud. **Name** : google-cloud-core. **Version** : 2.3.3. @@ -74,25 +74,23 @@ * **Project URL:** [https://github.com/google/gson/gson](https://github.com/google/gson/gson) * **License:** [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.errorprone. **Name** : error_prone_annotations. **Version** : 2.10.0. +1. **Group** : com.google.errorprone. **Name** : error_prone_annotations. **Version** : 2.20.0. + * **Project URL:** [https://errorprone.info/error_prone_annotations](https://errorprone.info/error_prone_annotations) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.flogger. **Name** : flogger. **Version** : 0.7.4. - * **Project URL:** [https://github.com/google/flogger](https://github.com/google/flogger) - * **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) - -1. **Group** : com.google.flogger. **Name** : flogger-system-backend. **Version** : 0.7.4. - * **Project URL:** [https://github.com/google/flogger](https://github.com/google/flogger) - * **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : com.google.errorprone. **Name** : error_prone_type_annotations. **Version** : 2.20.0. + * **Project URL:** [https://errorprone.info/error_prone_type_annotations](https://errorprone.info/error_prone_type_annotations) + * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : com.google.guava. **Name** : failureaccess. **Version** : 1.0.1. * **Project URL:** [https://github.com/google/guava/](https://github.com/google/guava/) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.guava. **Name** : guava. **Version** : 31.1-jre. +1. **Group** : com.google.guava. **Name** : guava. **Version** : 32.1.2-jre. * **Project URL:** [https://github.com/google/guava](https://github.com/google/guava) * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : com.google.guava. **Name** : guava-parent. **Version** : 32.1.2-jre.**No license information found** 1. **Group** : com.google.guava. **Name** : listenablefuture. **Version** : 9999.0-empty-to-avoid-conflict-with-guava. * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -124,46 +122,46 @@ * **Project URL:** [https://www.google.com/](https://www.google.com/) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.protobuf. **Name** : protobuf-java. **Version** : 3.19.4. +1. **Group** : com.google.protobuf. **Name** : protobuf-java. **Version** : 3.23.4. * **Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/) - * **License:** [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) + * **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -1. **Group** : com.google.protobuf. **Name** : protobuf-java-util. **Version** : 3.19.4. +1. **Group** : com.google.protobuf. **Name** : protobuf-java-util. **Version** : 3.23.4. * **Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/) - * **License:** [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) + * **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -1. **Group** : com.google.protobuf. **Name** : protobuf-kotlin. **Version** : 3.19.4. - * **License:** [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) +1. **Group** : com.google.protobuf. **Name** : protobuf-kotlin. **Version** : 3.23.4. + * **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -1. **Group** : commons-codec. **Name** : commons-codec. **Version** : 1.15. +1. **Group** : commons-codec. **Name** : commons-codec. **Version** : 1.16.0. * **Project URL:** [https://commons.apache.org/proper/commons-codec/](https://commons.apache.org/proper/commons-codec/) - * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : commons-logging. **Name** : commons-logging. **Version** : 1.2. * **Project URL:** [http://commons.apache.org/proper/commons-logging/](http://commons.apache.org/proper/commons-logging/) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : io.grpc. **Name** : grpc-api. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-api. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-context. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-context. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-core. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-core. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-protobuf. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-protobuf. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-protobuf-lite. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-protobuf-lite. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-stub. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-stub. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) @@ -175,11 +173,11 @@ * **Project URL:** [https://github.com/census-instrumentation/opencensus-java](https://github.com/census-instrumentation/opencensus-java) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : io.perfmark. **Name** : perfmark-api. **Version** : 0.23.0. +1. **Group** : io.perfmark. **Name** : perfmark-api. **Version** : 0.26.0. * **Project URL:** [https://github.com/perfmark/perfmark](https://github.com/perfmark/perfmark) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.spine.validation. **Name** : runtime. **Version** : 2.0.0-SNAPSHOT.12.**No license information found** +1. **Group** : io.spine.validation. **Name** : spine-validation-java-runtime. **Version** : 2.0.0-SNAPSHOT.99.**No license information found** 1. **Group** : javax.annotation. **Name** : javax.annotation-api. **Version** : 1.3.2. * **Project URL:** [http://jcp.org/en/jsr/detail?id=250](http://jcp.org/en/jsr/detail?id=250) * **License:** [CDDL + GPLv2 with classpath exception](https://github.com/javaee/javax.annotation/blob/master/LICENSE) @@ -192,59 +190,87 @@ * **Project URL:** [http://hc.apache.org/httpcomponents-core-ga](http://hc.apache.org/httpcomponents-core-ga) * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.checkerframework. **Name** : checker-compat-qual. **Version** : 2.5.5. - * **Project URL:** [https://checkerframework.org](https://checkerframework.org) - * **License:** [GNU General Public License, version 2 (GPL2), with the classpath exception](http://www.gnu.org/software/classpath/license.html) - * **License:** [The MIT License](http://opensource.org/licenses/MIT) - -1. **Group** : org.checkerframework. **Name** : checker-qual. **Version** : 3.21.3. - * **Project URL:** [https://checkerframework.org](https://checkerframework.org) +1. **Group** : org.checkerframework. **Name** : checker-qual. **Version** : 3.36.0. + * **Project URL:** [https://checkerframework.org/](https://checkerframework.org/) * **License:** [The MIT License](http://opensource.org/licenses/MIT) 1. **Group** : org.codehaus.mojo. **Name** : animal-sniffer-annotations. **Version** : 1.21. * **License:** [MIT license](http://www.opensource.org/licenses/mit-license.php) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains. **Name** : annotations. **Version** : 13.0. - * **Project URL:** [http://www.jetbrains.org](http://www.jetbrains.org) - * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : org.jetbrains. **Name** : annotations. **Version** : 23.0.0. + * **Project URL:** [https://github.com/JetBrains/java-annotations](https://github.com/JetBrains/java-annotations) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-reflect. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-reflect. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-common. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-common. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk7. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk7. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk8. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk8. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : org.ow2.asm. **Name** : asm. **Version** : 9.2. + * **Project URL:** [http://asm.ow2.io/](http://asm.ow2.io/) + * **License:** [BSD-3-Clause](https://asm.ow2.io/license.html) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + 1. **Group** : org.threeten. **Name** : threetenbp. **Version** : 1.5.2. * **Project URL:** [https://www.threeten.org/threetenbp](https://www.threeten.org/threetenbp) * **License:** [BSD 3-clause](https://raw.githubusercontent.com/ThreeTen/threetenbp/master/LICENSE.txt) ## Compile, tests, and tooling +1. **Group** : aopalliance. **Name** : aopalliance. **Version** : 1.0. + * **Project URL:** [http://aopalliance.sourceforge.net](http://aopalliance.sourceforge.net) + * **License:** Public Domain + 1. **Group** : com.beust. **Name** : jcommander. **Version** : 1.48. * **Project URL:** [http://beust.com/jcommander](http://beust.com/jcommander) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.13.0.**No license information found** -1. **Group** : com.fasterxml.jackson.core. **Name** : jackson-core. **Version** : 2.13.0. +1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.15.2.**No license information found** +1. **Group** : com.fasterxml.jackson.core. **Name** : jackson-annotations. **Version** : 2.15.2. + * **Project URL:** [https://github.com/FasterXML/jackson](https://github.com/FasterXML/jackson) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : com.fasterxml.jackson.core. **Name** : jackson-core. **Version** : 2.15.2. * **Project URL:** [https://github.com/FasterXML/jackson-core](https://github.com/FasterXML/jackson-core) * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : com.fasterxml.jackson.core. **Name** : jackson-databind. **Version** : 2.15.2. + * **Project URL:** [https://github.com/FasterXML/jackson](https://github.com/FasterXML/jackson) + * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : com.fasterxml.jackson.dataformat. **Name** : jackson-dataformat-xml. **Version** : 2.15.2. + * **Project URL:** [https://github.com/FasterXML/jackson-dataformat-xml](https://github.com/FasterXML/jackson-dataformat-xml) + * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.github.ben-manes.caffeine. **Name** : caffeine. **Version** : 2.8.8. +1. **Group** : com.fasterxml.jackson.module. **Name** : jackson-module-kotlin. **Version** : 2.15.2. + * **Project URL:** [https://github.com/FasterXML/jackson-module-kotlin](https://github.com/FasterXML/jackson-module-kotlin) + * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : com.fasterxml.woodstox. **Name** : woodstox-core. **Version** : 6.5.1. + * **Project URL:** [https://github.com/FasterXML/woodstox](https://github.com/FasterXML/woodstox) + * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : com.github.ben-manes.caffeine. **Name** : caffeine. **Version** : 3.0.5. * **Project URL:** [https://github.com/ben-manes/caffeine](https://github.com/ben-manes/caffeine) * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) @@ -290,16 +316,16 @@ 1. **Group** : com.google.auth. **Name** : google-auth-library-oauth2-http. **Version** : 1.3.0. * **License:** [BSD New license](http://opensource.org/licenses/BSD-3-Clause) -1. **Group** : com.google.auto. **Name** : auto-common. **Version** : 1.2.1. - * **Project URL:** [https://github.com/google/auto/tree/master/common](https://github.com/google/auto/tree/master/common) +1. **Group** : com.google.auto. **Name** : auto-common. **Version** : 1.2.2. + * **Project URL:** [https://github.com/google/auto/tree/main/common](https://github.com/google/auto/tree/main/common) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.auto.service. **Name** : auto-service-annotations. **Version** : 1.0.1. - * **Project URL:** [https://github.com/google/auto/tree/master/service](https://github.com/google/auto/tree/master/service) +1. **Group** : com.google.auto.service. **Name** : auto-service-annotations. **Version** : 1.1.1. + * **Project URL:** [https://github.com/google/auto/tree/main/service](https://github.com/google/auto/tree/main/service) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.auto.value. **Name** : auto-value-annotations. **Version** : 1.9. - * **Project URL:** [https://github.com/google/auto/tree/master/value](https://github.com/google/auto/tree/master/value) +1. **Group** : com.google.auto.value. **Name** : auto-value-annotations. **Version** : 1.10.2. + * **Project URL:** [https://github.com/google/auto/tree/main/value](https://github.com/google/auto/tree/main/value) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : com.google.cloud. **Name** : google-cloud-core. **Version** : 2.3.3. @@ -317,10 +343,6 @@ 1. **Group** : com.google.cloud.datastore. **Name** : datastore-v1-proto-client. **Version** : 2.2.1. * **License:** [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.code.findbugs. **Name** : jFormatString. **Version** : 3.0.0. - * **Project URL:** [http://findbugs.sourceforge.net/](http://findbugs.sourceforge.net/) - * **License:** [GNU Lesser Public License](http://www.gnu.org/licenses/lgpl.html) - 1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2. * **Project URL:** [http://findbugs.sourceforge.net/](http://findbugs.sourceforge.net/) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -329,21 +351,30 @@ * **Project URL:** [https://github.com/google/gson/gson](https://github.com/google/gson/gson) * **License:** [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.errorprone. **Name** : error_prone_annotation. **Version** : 2.10.0. +1. **Group** : com.google.errorprone. **Name** : error_prone_annotation. **Version** : 2.20.0. + * **Project URL:** [https://errorprone.info/error_prone_annotation](https://errorprone.info/error_prone_annotation) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.errorprone. **Name** : error_prone_annotations. **Version** : 2.10.0. +1. **Group** : com.google.errorprone. **Name** : error_prone_annotations. **Version** : 2.20.0. + * **Project URL:** [https://errorprone.info/error_prone_annotations](https://errorprone.info/error_prone_annotations) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.errorprone. **Name** : error_prone_check_api. **Version** : 2.10.0. +1. **Group** : com.google.errorprone. **Name** : error_prone_check_api. **Version** : 2.20.0. + * **Project URL:** [https://errorprone.info/error_prone_check_api](https://errorprone.info/error_prone_check_api) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.errorprone. **Name** : error_prone_core. **Version** : 2.10.0. +1. **Group** : com.google.errorprone. **Name** : error_prone_core. **Version** : 2.20.0. + * **Project URL:** [https://errorprone.info/error_prone_core](https://errorprone.info/error_prone_core) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.errorprone. **Name** : error_prone_type_annotations. **Version** : 2.10.0. +1. **Group** : com.google.errorprone. **Name** : error_prone_type_annotations. **Version** : 2.20.0. + * **Project URL:** [https://errorprone.info/error_prone_type_annotations](https://errorprone.info/error_prone_type_annotations) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : com.google.errorprone. **Name** : javac. **Version** : 9+181-r4173-1. + * **Project URL:** [https://github.com/google/error-prone-javac](https://github.com/google/error-prone-javac) + * **License:** [GNU General Public License, version 2, with the Classpath Exception](http://openjdk.java.net/legal/gplv2+ce.html) + 1. **Group** : com.google.flogger. **Name** : flogger. **Version** : 0.7.4. * **Project URL:** [https://github.com/google/flogger](https://github.com/google/flogger) * **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) @@ -352,19 +383,16 @@ * **Project URL:** [https://github.com/google/flogger](https://github.com/google/flogger) * **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.gradle. **Name** : osdetector-gradle-plugin. **Version** : 1.7.0. - * **Project URL:** [https://github.com/google/osdetector-gradle-plugin](https://github.com/google/osdetector-gradle-plugin) - * **License:** [Apache License 2.0](http://opensource.org/licenses/Apache-2.0) - 1. **Group** : com.google.guava. **Name** : failureaccess. **Version** : 1.0.1. * **Project URL:** [https://github.com/google/guava/](https://github.com/google/guava/) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.guava. **Name** : guava. **Version** : 31.1-jre. +1. **Group** : com.google.guava. **Name** : guava. **Version** : 32.1.2-jre. * **Project URL:** [https://github.com/google/guava](https://github.com/google/guava) * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.guava. **Name** : guava-testlib. **Version** : 31.1-jre. +1. **Group** : com.google.guava. **Name** : guava-parent. **Version** : 32.1.2-jre.**No license information found** +1. **Group** : com.google.guava. **Name** : guava-testlib. **Version** : 32.1.2-jre. * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : com.google.guava. **Name** : listenablefuture. **Version** : 9999.0-empty-to-avoid-conflict-with-guava. @@ -390,6 +418,10 @@ 1. **Group** : com.google.http-client. **Name** : google-http-client-protobuf. **Version** : 1.40.1. * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : com.google.inject. **Name** : guice. **Version** : 5.1.0. + * **Project URL:** [https://github.com/google/guice](https://github.com/google/guice) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + 1. **Group** : com.google.j2objc. **Name** : j2objc-annotations. **Version** : 1.3. * **Project URL:** [https://github.com/google/j2objc/](https://github.com/google/j2objc/) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -398,42 +430,42 @@ * **Project URL:** [https://www.google.com/](https://www.google.com/) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.protobuf. **Name** : protobuf-gradle-plugin. **Version** : 0.8.18. - * **Project URL:** [https://github.com/google/protobuf-gradle-plugin](https://github.com/google/protobuf-gradle-plugin) - * **License:** [BSD 3-Clause](http://opensource.org/licenses/BSD-3-Clause) - -1. **Group** : com.google.protobuf. **Name** : protobuf-java. **Version** : 3.19.4. +1. **Group** : com.google.protobuf. **Name** : protobuf-java. **Version** : 3.23.4. * **Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/) - * **License:** [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) + * **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -1. **Group** : com.google.protobuf. **Name** : protobuf-java-util. **Version** : 3.19.4. +1. **Group** : com.google.protobuf. **Name** : protobuf-java-util. **Version** : 3.23.4. * **Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/) - * **License:** [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) + * **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -1. **Group** : com.google.protobuf. **Name** : protobuf-kotlin. **Version** : 3.19.4. - * **License:** [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) +1. **Group** : com.google.protobuf. **Name** : protobuf-kotlin. **Version** : 3.23.4. + * **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -1. **Group** : com.google.protobuf. **Name** : protoc. **Version** : 3.18.0. +1. **Group** : com.google.protobuf. **Name** : protoc. **Version** : 3.23.4. * **Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/) - * **License:** [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) + * **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.truth. **Name** : truth. **Version** : 1.1.3. +1. **Group** : com.google.truth. **Name** : truth. **Version** : 1.1.5. * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.truth.extensions. **Name** : truth-java8-extension. **Version** : 1.1.3. +1. **Group** : com.google.truth.extensions. **Name** : truth-java8-extension. **Version** : 1.1.5. * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.truth.extensions. **Name** : truth-liteproto-extension. **Version** : 1.1.3. +1. **Group** : com.google.truth.extensions. **Name** : truth-liteproto-extension. **Version** : 1.1.5. * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.truth.extensions. **Name** : truth-proto-extension. **Version** : 1.1.3. +1. **Group** : com.google.truth.extensions. **Name** : truth-proto-extension. **Version** : 1.1.5. * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.puppycrawl.tools. **Name** : checkstyle. **Version** : 10.1. +1. **Group** : com.puppycrawl.tools. **Name** : checkstyle. **Version** : 10.3.4. * **Project URL:** [https://checkstyle.org/](https://checkstyle.org/) * **License:** [LGPL-2.1+](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt) +1. **Group** : com.soywiz.korlibs.korte. **Name** : korte-jvm. **Version** : 2.7.0. + * **Project URL:** [https://github.com/korlibs/korge-next](https://github.com/korlibs/korge-next) + * **License:** [MIT](https://raw.githubusercontent.com/korlibs/korge-next/master/korge/LICENSE.txt) + 1. **Group** : com.squareup. **Name** : javapoet. **Version** : 1.13.0. * **Project URL:** [http://github.com/square/javapoet/](http://github.com/square/javapoet/) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -442,22 +474,14 @@ * **Project URL:** [https://commons.apache.org/proper/commons-beanutils/](https://commons.apache.org/proper/commons-beanutils/) * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : commons-codec. **Name** : commons-codec. **Version** : 1.15. +1. **Group** : commons-codec. **Name** : commons-codec. **Version** : 1.16.0. * **Project URL:** [https://commons.apache.org/proper/commons-codec/](https://commons.apache.org/proper/commons-codec/) - * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : commons-collections. **Name** : commons-collections. **Version** : 3.2.2. * **Project URL:** [http://commons.apache.org/collections/](http://commons.apache.org/collections/) * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : commons-io. **Name** : commons-io. **Version** : 2.6. - * **Project URL:** [http://commons.apache.org/proper/commons-io/](http://commons.apache.org/proper/commons-io/) - * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) - -1. **Group** : commons-lang. **Name** : commons-lang. **Version** : 2.6. - * **Project URL:** [http://commons.apache.org/lang/](http://commons.apache.org/lang/) - * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) - 1. **Group** : commons-logging. **Name** : commons-logging. **Version** : 1.2. * **Project URL:** [http://commons.apache.org/proper/commons-logging/](http://commons.apache.org/proper/commons-logging/) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -466,38 +490,61 @@ * **Project URL:** [http://picocli.info](http://picocli.info) * **License:** [The Apache Software License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : io.github.java-diff-utils. **Name** : java-diff-utils. **Version** : 4.0. - * **Project URL:** [https://github.com/java-diff-utils/java-diff-utils](https://github.com/java-diff-utils/java-diff-utils) +1. **Group** : io.github.eisop. **Name** : dataflow-errorprone. **Version** : 3.34.0-eisop1. + * **Project URL:** [https://eisop.github.io/](https://eisop.github.io/) + * **License:** [GNU General Public License, version 2 (GPL2), with the classpath exception](http://www.gnu.org/software/classpath/license.html) + +1. **Group** : io.github.java-diff-utils. **Name** : java-diff-utils. **Version** : 4.12. * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : io.grpc. **Name** : grpc-api. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-api. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-context. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-context. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-core. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-core. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-protobuf. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-protobuf. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-protobuf-lite. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-protobuf-lite. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-stub. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-stub. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : protoc-gen-grpc-java. **Version** : 1.38.0. +1. **Group** : io.grpc. **Name** : protoc-gen-grpc-java. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) +1. **Group** : io.kotest. **Name** : kotest-assertions-api. **Version** : 5.6.2.**No license information found** +1. **Group** : io.kotest. **Name** : kotest-assertions-api-jvm. **Version** : 5.6.2. + * **Project URL:** [https://github.com/kotest/kotest](https://github.com/kotest/kotest) + * **License:** [Apache-2.0](https://opensource.org/licenses/Apache-2.0) + +1. **Group** : io.kotest. **Name** : kotest-assertions-core. **Version** : 5.6.2.**No license information found** +1. **Group** : io.kotest. **Name** : kotest-assertions-core-jvm. **Version** : 5.6.2. + * **Project URL:** [https://github.com/kotest/kotest](https://github.com/kotest/kotest) + * **License:** [Apache-2.0](https://opensource.org/licenses/Apache-2.0) + +1. **Group** : io.kotest. **Name** : kotest-assertions-shared. **Version** : 5.6.2.**No license information found** +1. **Group** : io.kotest. **Name** : kotest-assertions-shared-jvm. **Version** : 5.6.2. + * **Project URL:** [https://github.com/kotest/kotest](https://github.com/kotest/kotest) + * **License:** [Apache-2.0](https://opensource.org/licenses/Apache-2.0) + +1. **Group** : io.kotest. **Name** : kotest-common. **Version** : 5.6.2.**No license information found** +1. **Group** : io.kotest. **Name** : kotest-common-jvm. **Version** : 5.6.2. + * **Project URL:** [https://github.com/kotest/kotest](https://github.com/kotest/kotest) + * **License:** [Apache-2.0](https://opensource.org/licenses/Apache-2.0) + 1. **Group** : io.opencensus. **Name** : opencensus-api. **Version** : 0.28.0. * **Project URL:** [https://github.com/census-instrumentation/opencensus-java](https://github.com/census-instrumentation/opencensus-java) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -506,48 +553,56 @@ * **Project URL:** [https://github.com/census-instrumentation/opencensus-java](https://github.com/census-instrumentation/opencensus-java) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : io.perfmark. **Name** : perfmark-api. **Version** : 0.23.0. +1. **Group** : io.perfmark. **Name** : perfmark-api. **Version** : 0.26.0. * **Project URL:** [https://github.com/perfmark/perfmark](https://github.com/perfmark/perfmark) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.spine.validation. **Name** : runtime. **Version** : 2.0.0-SNAPSHOT.12.**No license information found** +1. **Group** : io.spine.protodata. **Name** : protodata-codegen-java. **Version** : 0.9.6.**No license information found** +1. **Group** : io.spine.protodata. **Name** : protodata-fat-cli. **Version** : 0.9.11.**No license information found** +1. **Group** : io.spine.protodata. **Name** : protodata-protoc. **Version** : 0.9.11.**No license information found** +1. **Group** : io.spine.validation. **Name** : spine-validation-configuration. **Version** : 2.0.0-SNAPSHOT.99.**No license information found** +1. **Group** : io.spine.validation. **Name** : spine-validation-context. **Version** : 2.0.0-SNAPSHOT.99.**No license information found** +1. **Group** : io.spine.validation. **Name** : spine-validation-java. **Version** : 2.0.0-SNAPSHOT.99.**No license information found** +1. **Group** : io.spine.validation. **Name** : spine-validation-java-bundle. **Version** : 2.0.0-SNAPSHOT.99.**No license information found** +1. **Group** : io.spine.validation. **Name** : spine-validation-java-runtime. **Version** : 2.0.0-SNAPSHOT.99.**No license information found** +1. **Group** : io.spine.validation. **Name** : spine-validation-model. **Version** : 2.0.0-SNAPSHOT.99.**No license information found** 1. **Group** : javax.annotation. **Name** : javax.annotation-api. **Version** : 1.3.2. * **Project URL:** [http://jcp.org/en/jsr/detail?id=250](http://jcp.org/en/jsr/detail?id=250) * **License:** [CDDL + GPLv2 with classpath exception](https://github.com/javaee/javax.annotation/blob/master/LICENSE) +1. **Group** : javax.inject. **Name** : javax.inject. **Version** : 1. + * **Project URL:** [http://code.google.com/p/atinject/](http://code.google.com/p/atinject/) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + 1. **Group** : junit. **Name** : junit. **Version** : 4.13.1. * **Project URL:** [http://junit.org](http://junit.org) * **License:** [Eclipse Public License 1.0](http://www.eclipse.org/legal/epl-v10.html) -1. **Group** : kr.motd.maven. **Name** : os-maven-plugin. **Version** : 1.7.0. - * **Project URL:** [https://github.com/trustin/os-maven-plugin/](https://github.com/trustin/os-maven-plugin/) - * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) - 1. **Group** : net.java.dev.jna. **Name** : jna. **Version** : 5.6.0. * **Project URL:** [https://github.com/java-native-access/jna](https://github.com/java-native-access/jna) * **License:** [Apache License v2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) * **License:** [LGPL, version 2.1](http://www.gnu.org/licenses/licenses.html) -1. **Group** : net.ltgt.gradle. **Name** : gradle-errorprone-plugin. **Version** : 2.0.2.**No license information found** -1. **Group** : net.sf.saxon. **Name** : Saxon-HE. **Version** : 10.6. +1. **Group** : net.ltgt.gradle. **Name** : gradle-errorprone-plugin. **Version** : 3.1.0.**No license information found** +1. **Group** : net.sf.saxon. **Name** : Saxon-HE. **Version** : 11.4. * **Project URL:** [http://www.saxonica.com/](http://www.saxonica.com/) * **License:** [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/2.0/) -1. **Group** : net.sourceforge.pmd. **Name** : pmd-core. **Version** : 6.44.0. +1. **Group** : net.sourceforge.pmd. **Name** : pmd-core. **Version** : 6.55.0. * **License:** [BSD-style](http://pmd.sourceforge.net/license.html) -1. **Group** : net.sourceforge.pmd. **Name** : pmd-java. **Version** : 6.44.0. +1. **Group** : net.sourceforge.pmd. **Name** : pmd-java. **Version** : 6.55.0. * **License:** [BSD-style](http://pmd.sourceforge.net/license.html) 1. **Group** : net.sourceforge.saxon. **Name** : saxon. **Version** : 9.1.0.8. * **Project URL:** [http://saxon.sourceforge.net/](http://saxon.sourceforge.net/) * **License:** [Mozilla Public License Version 1.0](http://www.mozilla.org/MPL/MPL-1.0.txt) -1. **Group** : org.antlr. **Name** : antlr4-runtime. **Version** : 4.7.2. - * **Project URL:** [http://www.antlr.org](http://www.antlr.org) - * **License:** [The BSD License](http://www.antlr.org/license.html) +1. **Group** : org.antlr. **Name** : antlr4-runtime. **Version** : 4.11.1. + * **Project URL:** [https://www.antlr.org/](https://www.antlr.org/) + * **License:** [BSD-3-Clause](https://www.antlr.org/license.html) -1. **Group** : org.antlr. **Name** : antlr4-runtime. **Version** : 4.9.3. +1. **Group** : org.antlr. **Name** : antlr4-runtime. **Version** : 4.7.2. * **Project URL:** [http://www.antlr.org](http://www.antlr.org) * **License:** [The BSD License](http://www.antlr.org/license.html) @@ -563,43 +618,59 @@ * **Project URL:** [http://hc.apache.org/httpcomponents-core-ga](http://hc.apache.org/httpcomponents-core-ga) * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : org.apache.httpcomponents.client5. **Name** : httpclient5. **Version** : 5.1.3. + * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.apache.httpcomponents.core5. **Name** : httpcore5. **Version** : 5.1.3. + * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.apache.httpcomponents.core5. **Name** : httpcore5-h2. **Version** : 5.1.3. + * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + 1. **Group** : org.apiguardian. **Name** : apiguardian-api. **Version** : 1.1.2. * **Project URL:** [https://github.com/apiguardian-team/apiguardian](https://github.com/apiguardian-team/apiguardian) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.checkerframework. **Name** : checker-compat-qual. **Version** : 2.5.5. +1. **Group** : org.checkerframework. **Name** : checker-compat-qual. **Version** : 2.5.3. * **Project URL:** [https://checkerframework.org](https://checkerframework.org) * **License:** [GNU General Public License, version 2 (GPL2), with the classpath exception](http://www.gnu.org/software/classpath/license.html) * **License:** [The MIT License](http://opensource.org/licenses/MIT) -1. **Group** : org.checkerframework. **Name** : checker-qual. **Version** : 3.21.3. - * **Project URL:** [https://checkerframework.org](https://checkerframework.org) +1. **Group** : org.checkerframework. **Name** : checker-qual. **Version** : 3.36.0. + * **Project URL:** [https://checkerframework.org/](https://checkerframework.org/) * **License:** [The MIT License](http://opensource.org/licenses/MIT) -1. **Group** : org.checkerframework. **Name** : dataflow-errorprone. **Version** : 3.15.0. - * **Project URL:** [https://checkerframework.org](https://checkerframework.org) - * **License:** [GNU General Public License, version 2 (GPL2), with the classpath exception](http://www.gnu.org/software/classpath/license.html) - 1. **Group** : org.codehaus.mojo. **Name** : animal-sniffer-annotations. **Version** : 1.21. * **License:** [MIT license](http://www.opensource.org/licenses/mit-license.php) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.eclipse.jgit. **Name** : org.eclipse.jgit. **Version** : 4.4.1.201607150455-r. - * **License:** Eclipse Distribution License (New BSD License) +1. **Group** : org.codehaus.woodstox. **Name** : stax2-api. **Version** : 4.2.1. + * **Project URL:** [http://github.com/FasterXML/stax2-api](http://github.com/FasterXML/stax2-api) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [The BSD License](http://www.opensource.org/licenses/bsd-license.php) + +1. **Group** : org.freemarker. **Name** : freemarker. **Version** : 2.3.31. + * **Project URL:** [https://freemarker.apache.org/](https://freemarker.apache.org/) + * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.hamcrest. **Name** : hamcrest. **Version** : 2.2. + * **Project URL:** [http://hamcrest.org/JavaHamcrest/](http://hamcrest.org/JavaHamcrest/) + * **License:** [BSD License 3](http://opensource.org/licenses/BSD-3-Clause) -1. **Group** : org.hamcrest. **Name** : hamcrest-core. **Version** : 1.3. - * **License:** [New BSD License](http://www.opensource.org/licenses/bsd-license.php) +1. **Group** : org.hamcrest. **Name** : hamcrest-core. **Version** : 2.2. + * **Project URL:** [http://hamcrest.org/JavaHamcrest/](http://hamcrest.org/JavaHamcrest/) + * **License:** [BSD License 3](http://opensource.org/licenses/BSD-3-Clause) -1. **Group** : org.jacoco. **Name** : org.jacoco.agent. **Version** : 0.8.7. +1. **Group** : org.jacoco. **Name** : org.jacoco.agent. **Version** : 0.8.8. * **License:** [Eclipse Public License 2.0](https://www.eclipse.org/legal/epl-2.0/) -1. **Group** : org.jacoco. **Name** : org.jacoco.ant. **Version** : 0.8.7. +1. **Group** : org.jacoco. **Name** : org.jacoco.ant. **Version** : 0.8.8. * **License:** [Eclipse Public License 2.0](https://www.eclipse.org/legal/epl-2.0/) -1. **Group** : org.jacoco. **Name** : org.jacoco.core. **Version** : 0.8.7. +1. **Group** : org.jacoco. **Name** : org.jacoco.core. **Version** : 0.8.8. * **License:** [Eclipse Public License 2.0](https://www.eclipse.org/legal/epl-2.0/) -1. **Group** : org.jacoco. **Name** : org.jacoco.report. **Version** : 0.8.7. +1. **Group** : org.jacoco. **Name** : org.jacoco.report. **Version** : 0.8.8. * **License:** [Eclipse Public License 2.0](https://www.eclipse.org/legal/epl-2.0/) 1. **Group** : org.javassist. **Name** : javassist. **Version** : 3.28.0-GA. @@ -608,119 +679,183 @@ * **License:** [LGPL 2.1](http://www.gnu.org/licenses/lgpl-2.1.html) * **License:** [MPL 1.1](http://www.mozilla.org/MPL/MPL-1.1.html) -1. **Group** : org.jetbrains. **Name** : annotations. **Version** : 13.0. - * **Project URL:** [http://www.jetbrains.org](http://www.jetbrains.org) +1. **Group** : org.jboss.forge.roaster. **Name** : roaster-api. **Version** : 2.28.0.Final. + * **License:** [Eclipse Public License version 1.0](http://www.eclipse.org/legal/epl-v10.html) + * **License:** [Public Domain](http://repository.jboss.org/licenses/cc0-1.0.txt) + +1. **Group** : org.jboss.forge.roaster. **Name** : roaster-jdt. **Version** : 2.28.0.Final. + * **License:** [Eclipse Public License version 1.0](http://www.eclipse.org/legal/epl-v10.html) + * **License:** [Public Domain](http://repository.jboss.org/licenses/cc0-1.0.txt) + +1. **Group** : org.jetbrains. **Name** : annotations. **Version** : 23.0.0. + * **Project URL:** [https://github.com/JetBrains/java-annotations](https://github.com/JetBrains/java-annotations) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains. **Name** : markdown. **Version** : 0.3.1.**No license information found** +1. **Group** : org.jetbrains. **Name** : markdown-jvm. **Version** : 0.3.1. + * **Project URL:** [https://github.com/JetBrains/markdown](https://github.com/JetBrains/markdown) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.intellij.deps. **Name** : trove4j. **Version** : 1.0.20181211. +1. **Group** : org.jetbrains.dokka. **Name** : dokka-analysis. **Version** : 1.8.10. + * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.dokka. **Name** : dokka-base. **Version** : 1.8.10. + * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.dokka. **Name** : dokka-core. **Version** : 1.8.10. + * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.dokka. **Name** : javadoc-plugin. **Version** : 1.8.10. + * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.dokka. **Name** : kotlin-analysis-compiler. **Version** : 1.8.10. + * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.dokka. **Name** : kotlin-analysis-intellij. **Version** : 1.8.10. + * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.dokka. **Name** : kotlin-as-java-plugin. **Version** : 1.8.10. + * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.intellij.deps. **Name** : trove4j. **Version** : 1.0.20200330. * **Project URL:** [https://github.com/JetBrains/intellij-deps-trove4j](https://github.com/JetBrains/intellij-deps-trove4j) * **License:** [GNU LESSER GENERAL PUBLIC LICENSE 2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-compiler-embeddable. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-compiler-embeddable. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-daemon-embeddable. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-daemon-embeddable. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-klib-commonizer-embeddable. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-klib-commonizer-embeddable. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-reflect. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-reflect. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-script-runtime. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-script-runtime. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-common. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-common. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-compiler-embeddable. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-compiler-embeddable. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-compiler-impl-embeddable. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-compiler-impl-embeddable. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-jvm. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-jvm. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-common. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-common. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk7. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk7. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk8. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk8. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.junit. **Name** : junit-bom. **Version** : 5.8.2.**No license information found** -1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-api. **Version** : 5.8.2. +1. **Group** : org.jetbrains.kotlinx. **Name** : atomicfu. **Version** : 0.20.2. + * **Project URL:** [https://github.com/Kotlin/kotlinx.atomicfu](https://github.com/Kotlin/kotlinx.atomicfu) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-bom. **Version** : 1.6.3.**No license information found** +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-bom. **Version** : 1.7.0.**No license information found** +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-core. **Version** : 1.6.3.**No license information found** +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-core. **Version** : 1.7.0.**No license information found** +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-core-jvm. **Version** : 1.6.3. + * **Project URL:** [https://github.com/Kotlin/kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-core-jvm. **Version** : 1.7.0. + * **Project URL:** [https://github.com/Kotlin/kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-jdk8. **Version** : 1.7.0. + * **Project URL:** [https://github.com/Kotlin/kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-html-jvm. **Version** : 0.7.5. + * **Project URL:** [https://github.com/Kotlin/kotlinx.html](https://github.com/Kotlin/kotlinx.html) + * **License:** [The Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jsoup. **Name** : jsoup. **Version** : 1.15.3. + * **Project URL:** [https://jsoup.org/](https://jsoup.org/) + * **License:** [The MIT License](https://jsoup.org/license) + +1. **Group** : org.junit. **Name** : junit-bom. **Version** : 5.10.0.**No license information found** +1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-api. **Version** : 5.10.0. * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-engine. **Version** : 5.8.2. +1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-engine. **Version** : 5.10.0. * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-params. **Version** : 5.8.2. +1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-params. **Version** : 5.10.0. * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.platform. **Name** : junit-platform-commons. **Version** : 1.8.2. +1. **Group** : org.junit.platform. **Name** : junit-platform-commons. **Version** : 1.10.0. * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.platform. **Name** : junit-platform-engine. **Version** : 1.8.2. +1. **Group** : org.junit.platform. **Name** : junit-platform-engine. **Version** : 1.10.0. * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.opentest4j. **Name** : opentest4j. **Version** : 1.2.0. +1. **Group** : org.opentest4j. **Name** : opentest4j. **Version** : 1.3.0. * **Project URL:** [https://github.com/ota4j-team/opentest4j](https://github.com/ota4j-team/opentest4j) - * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) - -1. **Group** : org.ow2.asm. **Name** : asm. **Version** : 9.1. - * **Project URL:** [http://asm.ow2.io/](http://asm.ow2.io/) - * **License:** [BSD-3-Clause](https://asm.ow2.io/license.html) - * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [The Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : org.ow2.asm. **Name** : asm. **Version** : 9.2. * **Project URL:** [http://asm.ow2.io/](http://asm.ow2.io/) * **License:** [BSD-3-Clause](https://asm.ow2.io/license.html) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.ow2.asm. **Name** : asm-analysis. **Version** : 9.1. +1. **Group** : org.ow2.asm. **Name** : asm-analysis. **Version** : 9.2. * **Project URL:** [http://asm.ow2.io/](http://asm.ow2.io/) * **License:** [BSD-3-Clause](https://asm.ow2.io/license.html) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.ow2.asm. **Name** : asm-commons. **Version** : 9.1. +1. **Group** : org.ow2.asm. **Name** : asm-commons. **Version** : 9.2. * **Project URL:** [http://asm.ow2.io/](http://asm.ow2.io/) * **License:** [BSD-3-Clause](https://asm.ow2.io/license.html) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.ow2.asm. **Name** : asm-tree. **Version** : 9.1. +1. **Group** : org.ow2.asm. **Name** : asm-tree. **Version** : 9.2. * **Project URL:** [http://asm.ow2.io/](http://asm.ow2.io/) * **License:** [BSD-3-Clause](https://asm.ow2.io/license.html) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.pcollections. **Name** : pcollections. **Version** : 2.1.2. - * **Project URL:** [http://pcollections.org](http://pcollections.org) - * **License:** [The MIT License](http://www.opensource.org/licenses/mit-license.php) +1. **Group** : org.pcollections. **Name** : pcollections. **Version** : 3.1.4. + * **Project URL:** [https://github.com/hrldcpr/pcollections](https://github.com/hrldcpr/pcollections) + * **License:** [The MIT License](https://opensource.org/licenses/mit-license.php) 1. **Group** : org.reflections. **Name** : reflections. **Version** : 0.10.2. * **Project URL:** [http://github.com/ronmamo/reflections](http://github.com/ronmamo/reflections) @@ -731,15 +866,19 @@ * **Project URL:** [https://www.threeten.org/threetenbp](https://www.threeten.org/threetenbp) * **License:** [BSD 3-clause](https://raw.githubusercontent.com/ThreeTen/threetenbp/master/LICENSE.txt) +1. **Group** : org.xmlresolver. **Name** : xmlresolver. **Version** : 4.4.3. + * **Project URL:** [https://github.com/xmlresolver/xmlresolver](https://github.com/xmlresolver/xmlresolver) + * **License:** [Apache License version 2.0](https://www.apache.org/licenses/LICENSE-2.0) + The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 11 14:29:57 EEST 2022** 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). +This report was generated on **Thu Aug 24 11:27:04 WEST 2023** 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.gcloud:spine-pubsub:2.0.0-SNAPSHOT.94` +# Dependencies of `io.spine.gcloud:spine-pubsub:2.0.0-SNAPSHOT.155` ## Runtime 1. **Group** : com.google.android. **Name** : annotations. **Version** : 4.1.1.4. @@ -758,8 +897,8 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **Project URL:** [https://github.com/googleapis/java-iam/proto-google-common-protos](https://github.com/googleapis/java-iam/proto-google-common-protos) * **License:** [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.auto.value. **Name** : auto-value-annotations. **Version** : 1.9. - * **Project URL:** [https://github.com/google/auto/tree/master/value](https://github.com/google/auto/tree/master/value) +1. **Group** : com.google.auto.value. **Name** : auto-value-annotations. **Version** : 1.10.2. + * **Project URL:** [https://github.com/google/auto/tree/main/value](https://github.com/google/auto/tree/main/value) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2. @@ -770,25 +909,23 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **Project URL:** [https://github.com/google/gson/gson](https://github.com/google/gson/gson) * **License:** [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.errorprone. **Name** : error_prone_annotations. **Version** : 2.10.0. +1. **Group** : com.google.errorprone. **Name** : error_prone_annotations. **Version** : 2.20.0. + * **Project URL:** [https://errorprone.info/error_prone_annotations](https://errorprone.info/error_prone_annotations) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.flogger. **Name** : flogger. **Version** : 0.7.4. - * **Project URL:** [https://github.com/google/flogger](https://github.com/google/flogger) - * **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) - -1. **Group** : com.google.flogger. **Name** : flogger-system-backend. **Version** : 0.7.4. - * **Project URL:** [https://github.com/google/flogger](https://github.com/google/flogger) - * **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : com.google.errorprone. **Name** : error_prone_type_annotations. **Version** : 2.20.0. + * **Project URL:** [https://errorprone.info/error_prone_type_annotations](https://errorprone.info/error_prone_type_annotations) + * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : com.google.guava. **Name** : failureaccess. **Version** : 1.0.1. * **Project URL:** [https://github.com/google/guava/](https://github.com/google/guava/) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.guava. **Name** : guava. **Version** : 31.1-jre. +1. **Group** : com.google.guava. **Name** : guava. **Version** : 32.1.2-jre. * **Project URL:** [https://github.com/google/guava](https://github.com/google/guava) * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : com.google.guava. **Name** : guava-parent. **Version** : 32.1.2-jre.**No license information found** 1. **Group** : com.google.guava. **Name** : listenablefuture. **Version** : 9999.0-empty-to-avoid-conflict-with-guava. * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -796,93 +933,127 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **Project URL:** [https://github.com/google/j2objc/](https://github.com/google/j2objc/) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.protobuf. **Name** : protobuf-java. **Version** : 3.19.4. +1. **Group** : com.google.protobuf. **Name** : protobuf-java. **Version** : 3.23.4. * **Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/) - * **License:** [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) + * **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -1. **Group** : com.google.protobuf. **Name** : protobuf-java-util. **Version** : 3.19.4. +1. **Group** : com.google.protobuf. **Name** : protobuf-java-util. **Version** : 3.23.4. * **Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/) - * **License:** [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) + * **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -1. **Group** : com.google.protobuf. **Name** : protobuf-kotlin. **Version** : 3.19.4. - * **License:** [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) +1. **Group** : com.google.protobuf. **Name** : protobuf-kotlin. **Version** : 3.23.4. + * **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -1. **Group** : io.grpc. **Name** : grpc-api. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-api. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-context. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-context. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-core. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-core. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-protobuf. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-protobuf. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-protobuf-lite. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-protobuf-lite. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-stub. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-stub. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.perfmark. **Name** : perfmark-api. **Version** : 0.23.0. +1. **Group** : io.perfmark. **Name** : perfmark-api. **Version** : 0.26.0. * **Project URL:** [https://github.com/perfmark/perfmark](https://github.com/perfmark/perfmark) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.spine.validation. **Name** : runtime. **Version** : 2.0.0-SNAPSHOT.12.**No license information found** +1. **Group** : io.spine.validation. **Name** : spine-validation-java-runtime. **Version** : 2.0.0-SNAPSHOT.99.**No license information found** 1. **Group** : javax.annotation. **Name** : javax.annotation-api. **Version** : 1.3.2. * **Project URL:** [http://jcp.org/en/jsr/detail?id=250](http://jcp.org/en/jsr/detail?id=250) * **License:** [CDDL + GPLv2 with classpath exception](https://github.com/javaee/javax.annotation/blob/master/LICENSE) -1. **Group** : org.checkerframework. **Name** : checker-compat-qual. **Version** : 2.5.5. - * **Project URL:** [https://checkerframework.org](https://checkerframework.org) - * **License:** [GNU General Public License, version 2 (GPL2), with the classpath exception](http://www.gnu.org/software/classpath/license.html) - * **License:** [The MIT License](http://opensource.org/licenses/MIT) - -1. **Group** : org.checkerframework. **Name** : checker-qual. **Version** : 3.21.3. - * **Project URL:** [https://checkerframework.org](https://checkerframework.org) +1. **Group** : org.checkerframework. **Name** : checker-qual. **Version** : 3.36.0. + * **Project URL:** [https://checkerframework.org/](https://checkerframework.org/) * **License:** [The MIT License](http://opensource.org/licenses/MIT) 1. **Group** : org.codehaus.mojo. **Name** : animal-sniffer-annotations. **Version** : 1.21. * **License:** [MIT license](http://www.opensource.org/licenses/mit-license.php) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains. **Name** : annotations. **Version** : 13.0. - * **Project URL:** [http://www.jetbrains.org](http://www.jetbrains.org) - * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : org.jetbrains. **Name** : annotations. **Version** : 23.0.0. + * **Project URL:** [https://github.com/JetBrains/java-annotations](https://github.com/JetBrains/java-annotations) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-reflect. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-reflect. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-common. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-common. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk7. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk7. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk8. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk8. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : org.ow2.asm. **Name** : asm. **Version** : 9.2. + * **Project URL:** [http://asm.ow2.io/](http://asm.ow2.io/) + * **License:** [BSD-3-Clause](https://asm.ow2.io/license.html) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + ## Compile, tests, and tooling +1. **Group** : aopalliance. **Name** : aopalliance. **Version** : 1.0. + * **Project URL:** [http://aopalliance.sourceforge.net](http://aopalliance.sourceforge.net) + * **License:** Public Domain + 1. **Group** : com.beust. **Name** : jcommander. **Version** : 1.48. * **Project URL:** [http://beust.com/jcommander](http://beust.com/jcommander) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.github.ben-manes.caffeine. **Name** : caffeine. **Version** : 2.8.8. +1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.15.2.**No license information found** +1. **Group** : com.fasterxml.jackson.core. **Name** : jackson-annotations. **Version** : 2.15.2. + * **Project URL:** [https://github.com/FasterXML/jackson](https://github.com/FasterXML/jackson) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : com.fasterxml.jackson.core. **Name** : jackson-core. **Version** : 2.15.2. + * **Project URL:** [https://github.com/FasterXML/jackson-core](https://github.com/FasterXML/jackson-core) + * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : com.fasterxml.jackson.core. **Name** : jackson-databind. **Version** : 2.15.2. + * **Project URL:** [https://github.com/FasterXML/jackson](https://github.com/FasterXML/jackson) + * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : com.fasterxml.jackson.dataformat. **Name** : jackson-dataformat-xml. **Version** : 2.15.2. + * **Project URL:** [https://github.com/FasterXML/jackson-dataformat-xml](https://github.com/FasterXML/jackson-dataformat-xml) + * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : com.fasterxml.jackson.module. **Name** : jackson-module-kotlin. **Version** : 2.15.2. + * **Project URL:** [https://github.com/FasterXML/jackson-module-kotlin](https://github.com/FasterXML/jackson-module-kotlin) + * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : com.fasterxml.woodstox. **Name** : woodstox-core. **Version** : 6.5.1. + * **Project URL:** [https://github.com/FasterXML/woodstox](https://github.com/FasterXML/woodstox) + * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : com.github.ben-manes.caffeine. **Name** : caffeine. **Version** : 3.0.5. * **Project URL:** [https://github.com/ben-manes/caffeine](https://github.com/ben-manes/caffeine) * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) @@ -906,22 +1077,18 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **Project URL:** [https://github.com/googleapis/java-iam/proto-google-common-protos](https://github.com/googleapis/java-iam/proto-google-common-protos) * **License:** [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.auto. **Name** : auto-common. **Version** : 1.2.1. - * **Project URL:** [https://github.com/google/auto/tree/master/common](https://github.com/google/auto/tree/master/common) +1. **Group** : com.google.auto. **Name** : auto-common. **Version** : 1.2.2. + * **Project URL:** [https://github.com/google/auto/tree/main/common](https://github.com/google/auto/tree/main/common) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.auto.service. **Name** : auto-service-annotations. **Version** : 1.0.1. - * **Project URL:** [https://github.com/google/auto/tree/master/service](https://github.com/google/auto/tree/master/service) +1. **Group** : com.google.auto.service. **Name** : auto-service-annotations. **Version** : 1.1.1. + * **Project URL:** [https://github.com/google/auto/tree/main/service](https://github.com/google/auto/tree/main/service) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.auto.value. **Name** : auto-value-annotations. **Version** : 1.9. - * **Project URL:** [https://github.com/google/auto/tree/master/value](https://github.com/google/auto/tree/master/value) +1. **Group** : com.google.auto.value. **Name** : auto-value-annotations. **Version** : 1.10.2. + * **Project URL:** [https://github.com/google/auto/tree/main/value](https://github.com/google/auto/tree/main/value) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.code.findbugs. **Name** : jFormatString. **Version** : 3.0.0. - * **Project URL:** [http://findbugs.sourceforge.net/](http://findbugs.sourceforge.net/) - * **License:** [GNU Lesser Public License](http://www.gnu.org/licenses/lgpl.html) - 1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2. * **Project URL:** [http://findbugs.sourceforge.net/](http://findbugs.sourceforge.net/) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -930,21 +1097,30 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **Project URL:** [https://github.com/google/gson/gson](https://github.com/google/gson/gson) * **License:** [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.errorprone. **Name** : error_prone_annotation. **Version** : 2.10.0. +1. **Group** : com.google.errorprone. **Name** : error_prone_annotation. **Version** : 2.20.0. + * **Project URL:** [https://errorprone.info/error_prone_annotation](https://errorprone.info/error_prone_annotation) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.errorprone. **Name** : error_prone_annotations. **Version** : 2.10.0. +1. **Group** : com.google.errorprone. **Name** : error_prone_annotations. **Version** : 2.20.0. + * **Project URL:** [https://errorprone.info/error_prone_annotations](https://errorprone.info/error_prone_annotations) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.errorprone. **Name** : error_prone_check_api. **Version** : 2.10.0. +1. **Group** : com.google.errorprone. **Name** : error_prone_check_api. **Version** : 2.20.0. + * **Project URL:** [https://errorprone.info/error_prone_check_api](https://errorprone.info/error_prone_check_api) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.errorprone. **Name** : error_prone_core. **Version** : 2.10.0. +1. **Group** : com.google.errorprone. **Name** : error_prone_core. **Version** : 2.20.0. + * **Project URL:** [https://errorprone.info/error_prone_core](https://errorprone.info/error_prone_core) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.errorprone. **Name** : error_prone_type_annotations. **Version** : 2.10.0. +1. **Group** : com.google.errorprone. **Name** : error_prone_type_annotations. **Version** : 2.20.0. + * **Project URL:** [https://errorprone.info/error_prone_type_annotations](https://errorprone.info/error_prone_type_annotations) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : com.google.errorprone. **Name** : javac. **Version** : 9+181-r4173-1. + * **Project URL:** [https://github.com/google/error-prone-javac](https://github.com/google/error-prone-javac) + * **License:** [GNU General Public License, version 2, with the Classpath Exception](http://openjdk.java.net/legal/gplv2+ce.html) + 1. **Group** : com.google.flogger. **Name** : flogger. **Version** : 0.7.4. * **Project URL:** [https://github.com/google/flogger](https://github.com/google/flogger) * **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) @@ -953,64 +1129,65 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **Project URL:** [https://github.com/google/flogger](https://github.com/google/flogger) * **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.gradle. **Name** : osdetector-gradle-plugin. **Version** : 1.7.0. - * **Project URL:** [https://github.com/google/osdetector-gradle-plugin](https://github.com/google/osdetector-gradle-plugin) - * **License:** [Apache License 2.0](http://opensource.org/licenses/Apache-2.0) - 1. **Group** : com.google.guava. **Name** : failureaccess. **Version** : 1.0.1. * **Project URL:** [https://github.com/google/guava/](https://github.com/google/guava/) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.guava. **Name** : guava. **Version** : 31.1-jre. +1. **Group** : com.google.guava. **Name** : guava. **Version** : 32.1.2-jre. * **Project URL:** [https://github.com/google/guava](https://github.com/google/guava) * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.guava. **Name** : guava-testlib. **Version** : 31.1-jre. +1. **Group** : com.google.guava. **Name** : guava-parent. **Version** : 32.1.2-jre.**No license information found** +1. **Group** : com.google.guava. **Name** : guava-testlib. **Version** : 32.1.2-jre. * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : com.google.guava. **Name** : listenablefuture. **Version** : 9999.0-empty-to-avoid-conflict-with-guava. * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : com.google.inject. **Name** : guice. **Version** : 5.1.0. + * **Project URL:** [https://github.com/google/guice](https://github.com/google/guice) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + 1. **Group** : com.google.j2objc. **Name** : j2objc-annotations. **Version** : 1.3. * **Project URL:** [https://github.com/google/j2objc/](https://github.com/google/j2objc/) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.protobuf. **Name** : protobuf-gradle-plugin. **Version** : 0.8.18. - * **Project URL:** [https://github.com/google/protobuf-gradle-plugin](https://github.com/google/protobuf-gradle-plugin) - * **License:** [BSD 3-Clause](http://opensource.org/licenses/BSD-3-Clause) - -1. **Group** : com.google.protobuf. **Name** : protobuf-java. **Version** : 3.19.4. +1. **Group** : com.google.protobuf. **Name** : protobuf-java. **Version** : 3.23.4. * **Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/) - * **License:** [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) + * **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -1. **Group** : com.google.protobuf. **Name** : protobuf-java-util. **Version** : 3.19.4. +1. **Group** : com.google.protobuf. **Name** : protobuf-java-util. **Version** : 3.23.4. * **Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/) - * **License:** [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) + * **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -1. **Group** : com.google.protobuf. **Name** : protobuf-kotlin. **Version** : 3.19.4. - * **License:** [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) +1. **Group** : com.google.protobuf. **Name** : protobuf-kotlin. **Version** : 3.23.4. + * **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -1. **Group** : com.google.protobuf. **Name** : protoc. **Version** : 3.18.0. +1. **Group** : com.google.protobuf. **Name** : protoc. **Version** : 3.23.4. * **Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/) - * **License:** [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) + * **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.truth. **Name** : truth. **Version** : 1.1.3. +1. **Group** : com.google.truth. **Name** : truth. **Version** : 1.1.5. * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.truth.extensions. **Name** : truth-java8-extension. **Version** : 1.1.3. +1. **Group** : com.google.truth.extensions. **Name** : truth-java8-extension. **Version** : 1.1.5. * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.truth.extensions. **Name** : truth-liteproto-extension. **Version** : 1.1.3. +1. **Group** : com.google.truth.extensions. **Name** : truth-liteproto-extension. **Version** : 1.1.5. * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.truth.extensions. **Name** : truth-proto-extension. **Version** : 1.1.3. +1. **Group** : com.google.truth.extensions. **Name** : truth-proto-extension. **Version** : 1.1.5. * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.puppycrawl.tools. **Name** : checkstyle. **Version** : 10.1. +1. **Group** : com.puppycrawl.tools. **Name** : checkstyle. **Version** : 10.3.4. * **Project URL:** [https://checkstyle.org/](https://checkstyle.org/) * **License:** [LGPL-2.1+](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt) +1. **Group** : com.soywiz.korlibs.korte. **Name** : korte-jvm. **Version** : 2.7.0. + * **Project URL:** [https://github.com/korlibs/korge-next](https://github.com/korlibs/korge-next) + * **License:** [MIT](https://raw.githubusercontent.com/korlibs/korge-next/master/korge/LICENSE.txt) + 1. **Group** : com.squareup. **Name** : javapoet. **Version** : 1.13.0. * **Project URL:** [http://github.com/square/javapoet/](http://github.com/square/javapoet/) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -1019,96 +1196,123 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **Project URL:** [https://commons.apache.org/proper/commons-beanutils/](https://commons.apache.org/proper/commons-beanutils/) * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : commons-codec. **Name** : commons-codec. **Version** : 1.16.0. + * **Project URL:** [https://commons.apache.org/proper/commons-codec/](https://commons.apache.org/proper/commons-codec/) + * **License:** [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + 1. **Group** : commons-collections. **Name** : commons-collections. **Version** : 3.2.2. * **Project URL:** [http://commons.apache.org/collections/](http://commons.apache.org/collections/) * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : commons-io. **Name** : commons-io. **Version** : 2.6. - * **Project URL:** [http://commons.apache.org/proper/commons-io/](http://commons.apache.org/proper/commons-io/) - * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) - -1. **Group** : commons-lang. **Name** : commons-lang. **Version** : 2.6. - * **Project URL:** [http://commons.apache.org/lang/](http://commons.apache.org/lang/) - * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) - 1. **Group** : info.picocli. **Name** : picocli. **Version** : 4.6.3. * **Project URL:** [http://picocli.info](http://picocli.info) * **License:** [The Apache Software License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : io.github.java-diff-utils. **Name** : java-diff-utils. **Version** : 4.0. - * **Project URL:** [https://github.com/java-diff-utils/java-diff-utils](https://github.com/java-diff-utils/java-diff-utils) +1. **Group** : io.github.eisop. **Name** : dataflow-errorprone. **Version** : 3.34.0-eisop1. + * **Project URL:** [https://eisop.github.io/](https://eisop.github.io/) + * **License:** [GNU General Public License, version 2 (GPL2), with the classpath exception](http://www.gnu.org/software/classpath/license.html) + +1. **Group** : io.github.java-diff-utils. **Name** : java-diff-utils. **Version** : 4.12. * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : io.grpc. **Name** : grpc-api. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-api. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-context. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-context. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-core. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-core. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-protobuf. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-protobuf. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-protobuf-lite. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-protobuf-lite. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-stub. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-stub. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : protoc-gen-grpc-java. **Version** : 1.38.0. +1. **Group** : io.grpc. **Name** : protoc-gen-grpc-java. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.perfmark. **Name** : perfmark-api. **Version** : 0.23.0. +1. **Group** : io.kotest. **Name** : kotest-assertions-api. **Version** : 5.6.2.**No license information found** +1. **Group** : io.kotest. **Name** : kotest-assertions-api-jvm. **Version** : 5.6.2. + * **Project URL:** [https://github.com/kotest/kotest](https://github.com/kotest/kotest) + * **License:** [Apache-2.0](https://opensource.org/licenses/Apache-2.0) + +1. **Group** : io.kotest. **Name** : kotest-assertions-core. **Version** : 5.6.2.**No license information found** +1. **Group** : io.kotest. **Name** : kotest-assertions-core-jvm. **Version** : 5.6.2. + * **Project URL:** [https://github.com/kotest/kotest](https://github.com/kotest/kotest) + * **License:** [Apache-2.0](https://opensource.org/licenses/Apache-2.0) + +1. **Group** : io.kotest. **Name** : kotest-assertions-shared. **Version** : 5.6.2.**No license information found** +1. **Group** : io.kotest. **Name** : kotest-assertions-shared-jvm. **Version** : 5.6.2. + * **Project URL:** [https://github.com/kotest/kotest](https://github.com/kotest/kotest) + * **License:** [Apache-2.0](https://opensource.org/licenses/Apache-2.0) + +1. **Group** : io.kotest. **Name** : kotest-common. **Version** : 5.6.2.**No license information found** +1. **Group** : io.kotest. **Name** : kotest-common-jvm. **Version** : 5.6.2. + * **Project URL:** [https://github.com/kotest/kotest](https://github.com/kotest/kotest) + * **License:** [Apache-2.0](https://opensource.org/licenses/Apache-2.0) + +1. **Group** : io.perfmark. **Name** : perfmark-api. **Version** : 0.26.0. * **Project URL:** [https://github.com/perfmark/perfmark](https://github.com/perfmark/perfmark) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.spine.validation. **Name** : runtime. **Version** : 2.0.0-SNAPSHOT.12.**No license information found** +1. **Group** : io.spine.protodata. **Name** : protodata-codegen-java. **Version** : 0.9.6.**No license information found** +1. **Group** : io.spine.protodata. **Name** : protodata-fat-cli. **Version** : 0.9.11.**No license information found** +1. **Group** : io.spine.protodata. **Name** : protodata-protoc. **Version** : 0.9.11.**No license information found** +1. **Group** : io.spine.validation. **Name** : spine-validation-configuration. **Version** : 2.0.0-SNAPSHOT.99.**No license information found** +1. **Group** : io.spine.validation. **Name** : spine-validation-context. **Version** : 2.0.0-SNAPSHOT.99.**No license information found** +1. **Group** : io.spine.validation. **Name** : spine-validation-java. **Version** : 2.0.0-SNAPSHOT.99.**No license information found** +1. **Group** : io.spine.validation. **Name** : spine-validation-java-bundle. **Version** : 2.0.0-SNAPSHOT.99.**No license information found** +1. **Group** : io.spine.validation. **Name** : spine-validation-java-runtime. **Version** : 2.0.0-SNAPSHOT.99.**No license information found** +1. **Group** : io.spine.validation. **Name** : spine-validation-model. **Version** : 2.0.0-SNAPSHOT.99.**No license information found** 1. **Group** : javax.annotation. **Name** : javax.annotation-api. **Version** : 1.3.2. * **Project URL:** [http://jcp.org/en/jsr/detail?id=250](http://jcp.org/en/jsr/detail?id=250) * **License:** [CDDL + GPLv2 with classpath exception](https://github.com/javaee/javax.annotation/blob/master/LICENSE) +1. **Group** : javax.inject. **Name** : javax.inject. **Version** : 1. + * **Project URL:** [http://code.google.com/p/atinject/](http://code.google.com/p/atinject/) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + 1. **Group** : junit. **Name** : junit. **Version** : 4.13.1. * **Project URL:** [http://junit.org](http://junit.org) * **License:** [Eclipse Public License 1.0](http://www.eclipse.org/legal/epl-v10.html) -1. **Group** : kr.motd.maven. **Name** : os-maven-plugin. **Version** : 1.7.0. - * **Project URL:** [https://github.com/trustin/os-maven-plugin/](https://github.com/trustin/os-maven-plugin/) - * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) - 1. **Group** : net.java.dev.jna. **Name** : jna. **Version** : 5.6.0. * **Project URL:** [https://github.com/java-native-access/jna](https://github.com/java-native-access/jna) * **License:** [Apache License v2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) * **License:** [LGPL, version 2.1](http://www.gnu.org/licenses/licenses.html) -1. **Group** : net.ltgt.gradle. **Name** : gradle-errorprone-plugin. **Version** : 2.0.2.**No license information found** -1. **Group** : net.sf.saxon. **Name** : Saxon-HE. **Version** : 10.6. +1. **Group** : net.ltgt.gradle. **Name** : gradle-errorprone-plugin. **Version** : 3.1.0.**No license information found** +1. **Group** : net.sf.saxon. **Name** : Saxon-HE. **Version** : 11.4. * **Project URL:** [http://www.saxonica.com/](http://www.saxonica.com/) * **License:** [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/2.0/) -1. **Group** : net.sourceforge.pmd. **Name** : pmd-core. **Version** : 6.44.0. +1. **Group** : net.sourceforge.pmd. **Name** : pmd-core. **Version** : 6.55.0. * **License:** [BSD-style](http://pmd.sourceforge.net/license.html) -1. **Group** : net.sourceforge.pmd. **Name** : pmd-java. **Version** : 6.44.0. +1. **Group** : net.sourceforge.pmd. **Name** : pmd-java. **Version** : 6.55.0. * **License:** [BSD-style](http://pmd.sourceforge.net/license.html) 1. **Group** : net.sourceforge.saxon. **Name** : saxon. **Version** : 9.1.0.8. * **Project URL:** [http://saxon.sourceforge.net/](http://saxon.sourceforge.net/) * **License:** [Mozilla Public License Version 1.0](http://www.mozilla.org/MPL/MPL-1.0.txt) -1. **Group** : org.antlr. **Name** : antlr4-runtime. **Version** : 4.7.2. - * **Project URL:** [http://www.antlr.org](http://www.antlr.org) - * **License:** [The BSD License](http://www.antlr.org/license.html) +1. **Group** : org.antlr. **Name** : antlr4-runtime. **Version** : 4.11.1. + * **Project URL:** [https://www.antlr.org/](https://www.antlr.org/) + * **License:** [BSD-3-Clause](https://www.antlr.org/license.html) -1. **Group** : org.antlr. **Name** : antlr4-runtime. **Version** : 4.9.3. +1. **Group** : org.antlr. **Name** : antlr4-runtime. **Version** : 4.7.2. * **Project URL:** [http://www.antlr.org](http://www.antlr.org) * **License:** [The BSD License](http://www.antlr.org/license.html) @@ -1116,43 +1320,59 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **Project URL:** [http://commons.apache.org/proper/commons-lang/](http://commons.apache.org/proper/commons-lang/) * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : org.apache.httpcomponents.client5. **Name** : httpclient5. **Version** : 5.1.3. + * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.apache.httpcomponents.core5. **Name** : httpcore5. **Version** : 5.1.3. + * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.apache.httpcomponents.core5. **Name** : httpcore5-h2. **Version** : 5.1.3. + * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + 1. **Group** : org.apiguardian. **Name** : apiguardian-api. **Version** : 1.1.2. * **Project URL:** [https://github.com/apiguardian-team/apiguardian](https://github.com/apiguardian-team/apiguardian) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.checkerframework. **Name** : checker-compat-qual. **Version** : 2.5.5. +1. **Group** : org.checkerframework. **Name** : checker-compat-qual. **Version** : 2.5.3. * **Project URL:** [https://checkerframework.org](https://checkerframework.org) * **License:** [GNU General Public License, version 2 (GPL2), with the classpath exception](http://www.gnu.org/software/classpath/license.html) * **License:** [The MIT License](http://opensource.org/licenses/MIT) -1. **Group** : org.checkerframework. **Name** : checker-qual. **Version** : 3.21.3. - * **Project URL:** [https://checkerframework.org](https://checkerframework.org) +1. **Group** : org.checkerframework. **Name** : checker-qual. **Version** : 3.36.0. + * **Project URL:** [https://checkerframework.org/](https://checkerframework.org/) * **License:** [The MIT License](http://opensource.org/licenses/MIT) -1. **Group** : org.checkerframework. **Name** : dataflow-errorprone. **Version** : 3.15.0. - * **Project URL:** [https://checkerframework.org](https://checkerframework.org) - * **License:** [GNU General Public License, version 2 (GPL2), with the classpath exception](http://www.gnu.org/software/classpath/license.html) - 1. **Group** : org.codehaus.mojo. **Name** : animal-sniffer-annotations. **Version** : 1.21. * **License:** [MIT license](http://www.opensource.org/licenses/mit-license.php) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.eclipse.jgit. **Name** : org.eclipse.jgit. **Version** : 4.4.1.201607150455-r. - * **License:** Eclipse Distribution License (New BSD License) +1. **Group** : org.codehaus.woodstox. **Name** : stax2-api. **Version** : 4.2.1. + * **Project URL:** [http://github.com/FasterXML/stax2-api](http://github.com/FasterXML/stax2-api) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [The BSD License](http://www.opensource.org/licenses/bsd-license.php) + +1. **Group** : org.freemarker. **Name** : freemarker. **Version** : 2.3.31. + * **Project URL:** [https://freemarker.apache.org/](https://freemarker.apache.org/) + * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.hamcrest. **Name** : hamcrest. **Version** : 2.2. + * **Project URL:** [http://hamcrest.org/JavaHamcrest/](http://hamcrest.org/JavaHamcrest/) + * **License:** [BSD License 3](http://opensource.org/licenses/BSD-3-Clause) -1. **Group** : org.hamcrest. **Name** : hamcrest-core. **Version** : 1.3. - * **License:** [New BSD License](http://www.opensource.org/licenses/bsd-license.php) +1. **Group** : org.hamcrest. **Name** : hamcrest-core. **Version** : 2.2. + * **Project URL:** [http://hamcrest.org/JavaHamcrest/](http://hamcrest.org/JavaHamcrest/) + * **License:** [BSD License 3](http://opensource.org/licenses/BSD-3-Clause) -1. **Group** : org.jacoco. **Name** : org.jacoco.agent. **Version** : 0.8.7. +1. **Group** : org.jacoco. **Name** : org.jacoco.agent. **Version** : 0.8.8. * **License:** [Eclipse Public License 2.0](https://www.eclipse.org/legal/epl-2.0/) -1. **Group** : org.jacoco. **Name** : org.jacoco.ant. **Version** : 0.8.7. +1. **Group** : org.jacoco. **Name** : org.jacoco.ant. **Version** : 0.8.8. * **License:** [Eclipse Public License 2.0](https://www.eclipse.org/legal/epl-2.0/) -1. **Group** : org.jacoco. **Name** : org.jacoco.core. **Version** : 0.8.7. +1. **Group** : org.jacoco. **Name** : org.jacoco.core. **Version** : 0.8.8. * **License:** [Eclipse Public License 2.0](https://www.eclipse.org/legal/epl-2.0/) -1. **Group** : org.jacoco. **Name** : org.jacoco.report. **Version** : 0.8.7. +1. **Group** : org.jacoco. **Name** : org.jacoco.report. **Version** : 0.8.8. * **License:** [Eclipse Public License 2.0](https://www.eclipse.org/legal/epl-2.0/) 1. **Group** : org.javassist. **Name** : javassist. **Version** : 3.28.0-GA. @@ -1161,134 +1381,202 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **License:** [LGPL 2.1](http://www.gnu.org/licenses/lgpl-2.1.html) * **License:** [MPL 1.1](http://www.mozilla.org/MPL/MPL-1.1.html) -1. **Group** : org.jetbrains. **Name** : annotations. **Version** : 13.0. - * **Project URL:** [http://www.jetbrains.org](http://www.jetbrains.org) +1. **Group** : org.jboss.forge.roaster. **Name** : roaster-api. **Version** : 2.28.0.Final. + * **License:** [Eclipse Public License version 1.0](http://www.eclipse.org/legal/epl-v10.html) + * **License:** [Public Domain](http://repository.jboss.org/licenses/cc0-1.0.txt) + +1. **Group** : org.jboss.forge.roaster. **Name** : roaster-jdt. **Version** : 2.28.0.Final. + * **License:** [Eclipse Public License version 1.0](http://www.eclipse.org/legal/epl-v10.html) + * **License:** [Public Domain](http://repository.jboss.org/licenses/cc0-1.0.txt) + +1. **Group** : org.jetbrains. **Name** : annotations. **Version** : 23.0.0. + * **Project URL:** [https://github.com/JetBrains/java-annotations](https://github.com/JetBrains/java-annotations) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains. **Name** : markdown. **Version** : 0.3.1.**No license information found** +1. **Group** : org.jetbrains. **Name** : markdown-jvm. **Version** : 0.3.1. + * **Project URL:** [https://github.com/JetBrains/markdown](https://github.com/JetBrains/markdown) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.intellij.deps. **Name** : trove4j. **Version** : 1.0.20181211. +1. **Group** : org.jetbrains.dokka. **Name** : dokka-analysis. **Version** : 1.8.10. + * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.dokka. **Name** : dokka-base. **Version** : 1.8.10. + * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.dokka. **Name** : dokka-core. **Version** : 1.8.10. + * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.dokka. **Name** : javadoc-plugin. **Version** : 1.8.10. + * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.dokka. **Name** : kotlin-analysis-compiler. **Version** : 1.8.10. + * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.dokka. **Name** : kotlin-analysis-intellij. **Version** : 1.8.10. + * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.dokka. **Name** : kotlin-as-java-plugin. **Version** : 1.8.10. + * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.intellij.deps. **Name** : trove4j. **Version** : 1.0.20200330. * **Project URL:** [https://github.com/JetBrains/intellij-deps-trove4j](https://github.com/JetBrains/intellij-deps-trove4j) * **License:** [GNU LESSER GENERAL PUBLIC LICENSE 2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-compiler-embeddable. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-compiler-embeddable. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-daemon-embeddable. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-daemon-embeddable. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-klib-commonizer-embeddable. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-klib-commonizer-embeddable. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-reflect. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-reflect. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-script-runtime. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-script-runtime. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-common. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-common. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-compiler-embeddable. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-compiler-embeddable. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-compiler-impl-embeddable. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-compiler-impl-embeddable. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-jvm. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-jvm. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-common. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-common. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk7. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk7. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk8. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk8. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.junit. **Name** : junit-bom. **Version** : 5.8.2.**No license information found** -1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-api. **Version** : 5.8.2. +1. **Group** : org.jetbrains.kotlinx. **Name** : atomicfu. **Version** : 0.20.2. + * **Project URL:** [https://github.com/Kotlin/kotlinx.atomicfu](https://github.com/Kotlin/kotlinx.atomicfu) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-bom. **Version** : 1.6.3.**No license information found** +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-bom. **Version** : 1.7.0.**No license information found** +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-core. **Version** : 1.6.3.**No license information found** +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-core. **Version** : 1.7.0.**No license information found** +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-core-jvm. **Version** : 1.6.3. + * **Project URL:** [https://github.com/Kotlin/kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-core-jvm. **Version** : 1.7.0. + * **Project URL:** [https://github.com/Kotlin/kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-jdk8. **Version** : 1.7.0. + * **Project URL:** [https://github.com/Kotlin/kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-html-jvm. **Version** : 0.7.5. + * **Project URL:** [https://github.com/Kotlin/kotlinx.html](https://github.com/Kotlin/kotlinx.html) + * **License:** [The Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jsoup. **Name** : jsoup. **Version** : 1.15.3. + * **Project URL:** [https://jsoup.org/](https://jsoup.org/) + * **License:** [The MIT License](https://jsoup.org/license) + +1. **Group** : org.junit. **Name** : junit-bom. **Version** : 5.10.0.**No license information found** +1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-api. **Version** : 5.10.0. * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-engine. **Version** : 5.8.2. +1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-engine. **Version** : 5.10.0. * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-params. **Version** : 5.8.2. +1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-params. **Version** : 5.10.0. * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.platform. **Name** : junit-platform-commons. **Version** : 1.8.2. +1. **Group** : org.junit.platform. **Name** : junit-platform-commons. **Version** : 1.10.0. * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.platform. **Name** : junit-platform-engine. **Version** : 1.8.2. +1. **Group** : org.junit.platform. **Name** : junit-platform-engine. **Version** : 1.10.0. * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.opentest4j. **Name** : opentest4j. **Version** : 1.2.0. +1. **Group** : org.opentest4j. **Name** : opentest4j. **Version** : 1.3.0. * **Project URL:** [https://github.com/ota4j-team/opentest4j](https://github.com/ota4j-team/opentest4j) - * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) - -1. **Group** : org.ow2.asm. **Name** : asm. **Version** : 9.1. - * **Project URL:** [http://asm.ow2.io/](http://asm.ow2.io/) - * **License:** [BSD-3-Clause](https://asm.ow2.io/license.html) - * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [The Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : org.ow2.asm. **Name** : asm. **Version** : 9.2. * **Project URL:** [http://asm.ow2.io/](http://asm.ow2.io/) * **License:** [BSD-3-Clause](https://asm.ow2.io/license.html) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.ow2.asm. **Name** : asm-analysis. **Version** : 9.1. +1. **Group** : org.ow2.asm. **Name** : asm-analysis. **Version** : 9.2. * **Project URL:** [http://asm.ow2.io/](http://asm.ow2.io/) * **License:** [BSD-3-Clause](https://asm.ow2.io/license.html) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.ow2.asm. **Name** : asm-commons. **Version** : 9.1. +1. **Group** : org.ow2.asm. **Name** : asm-commons. **Version** : 9.2. * **Project URL:** [http://asm.ow2.io/](http://asm.ow2.io/) * **License:** [BSD-3-Clause](https://asm.ow2.io/license.html) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.ow2.asm. **Name** : asm-tree. **Version** : 9.1. +1. **Group** : org.ow2.asm. **Name** : asm-tree. **Version** : 9.2. * **Project URL:** [http://asm.ow2.io/](http://asm.ow2.io/) * **License:** [BSD-3-Clause](https://asm.ow2.io/license.html) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.pcollections. **Name** : pcollections. **Version** : 2.1.2. - * **Project URL:** [http://pcollections.org](http://pcollections.org) - * **License:** [The MIT License](http://www.opensource.org/licenses/mit-license.php) +1. **Group** : org.pcollections. **Name** : pcollections. **Version** : 3.1.4. + * **Project URL:** [https://github.com/hrldcpr/pcollections](https://github.com/hrldcpr/pcollections) + * **License:** [The MIT License](https://opensource.org/licenses/mit-license.php) 1. **Group** : org.reflections. **Name** : reflections. **Version** : 0.10.2. * **Project URL:** [http://github.com/ronmamo/reflections](http://github.com/ronmamo/reflections) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) * **License:** [WTFPL](http://www.wtfpl.net/) +1. **Group** : org.xmlresolver. **Name** : xmlresolver. **Version** : 4.4.3. + * **Project URL:** [https://github.com/xmlresolver/xmlresolver](https://github.com/xmlresolver/xmlresolver) + * **License:** [Apache License version 2.0](https://www.apache.org/licenses/LICENSE-2.0) + The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 11 14:29:57 EEST 2022** 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). +This report was generated on **Thu Aug 24 11:27:06 WEST 2023** 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.gcloud:spine-stackdriver-trace:2.0.0-SNAPSHOT.94` +# Dependencies of `io.spine.gcloud:spine-stackdriver-trace:2.0.0-SNAPSHOT.155` ## Runtime 1. **Group** : com.google.android. **Name** : annotations. **Version** : 4.1.1.4. @@ -1325,8 +1613,8 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic 1. **Group** : com.google.auth. **Name** : google-auth-library-oauth2-http. **Version** : 1.3.0. * **License:** [BSD New license](http://opensource.org/licenses/BSD-3-Clause) -1. **Group** : com.google.auto.value. **Name** : auto-value-annotations. **Version** : 1.9. - * **Project URL:** [https://github.com/google/auto/tree/master/value](https://github.com/google/auto/tree/master/value) +1. **Group** : com.google.auto.value. **Name** : auto-value-annotations. **Version** : 1.10.2. + * **Project URL:** [https://github.com/google/auto/tree/main/value](https://github.com/google/auto/tree/main/value) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : com.google.cloud. **Name** : google-cloud-trace. **Version** : 2.1.0. @@ -1341,25 +1629,23 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **Project URL:** [https://github.com/google/gson/gson](https://github.com/google/gson/gson) * **License:** [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.errorprone. **Name** : error_prone_annotations. **Version** : 2.10.0. +1. **Group** : com.google.errorprone. **Name** : error_prone_annotations. **Version** : 2.20.0. + * **Project URL:** [https://errorprone.info/error_prone_annotations](https://errorprone.info/error_prone_annotations) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.flogger. **Name** : flogger. **Version** : 0.7.4. - * **Project URL:** [https://github.com/google/flogger](https://github.com/google/flogger) - * **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) - -1. **Group** : com.google.flogger. **Name** : flogger-system-backend. **Version** : 0.7.4. - * **Project URL:** [https://github.com/google/flogger](https://github.com/google/flogger) - * **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : com.google.errorprone. **Name** : error_prone_type_annotations. **Version** : 2.20.0. + * **Project URL:** [https://errorprone.info/error_prone_type_annotations](https://errorprone.info/error_prone_type_annotations) + * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : com.google.guava. **Name** : failureaccess. **Version** : 1.0.1. * **Project URL:** [https://github.com/google/guava/](https://github.com/google/guava/) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.guava. **Name** : guava. **Version** : 31.1-jre. +1. **Group** : com.google.guava. **Name** : guava. **Version** : 32.1.2-jre. * **Project URL:** [https://github.com/google/guava](https://github.com/google/guava) * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : com.google.guava. **Name** : guava-parent. **Version** : 32.1.2-jre.**No license information found** 1. **Group** : com.google.guava. **Name** : listenablefuture. **Version** : 9999.0-empty-to-avoid-conflict-with-guava. * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -1374,24 +1660,24 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **Project URL:** [https://github.com/google/j2objc/](https://github.com/google/j2objc/) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.protobuf. **Name** : protobuf-java. **Version** : 3.19.4. +1. **Group** : com.google.protobuf. **Name** : protobuf-java. **Version** : 3.23.4. * **Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/) - * **License:** [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) + * **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -1. **Group** : com.google.protobuf. **Name** : protobuf-java-util. **Version** : 3.19.4. +1. **Group** : com.google.protobuf. **Name** : protobuf-java-util. **Version** : 3.23.4. * **Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/) - * **License:** [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) + * **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -1. **Group** : com.google.protobuf. **Name** : protobuf-kotlin. **Version** : 3.19.4. - * **License:** [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) +1. **Group** : com.google.protobuf. **Name** : protobuf-kotlin. **Version** : 3.23.4. + * **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) 1. **Group** : com.google.re2j. **Name** : re2j. **Version** : 1.5. * **Project URL:** [http://github.com/google/re2j](http://github.com/google/re2j) * **License:** [Go License](https://golang.org/LICENSE) -1. **Group** : commons-codec. **Name** : commons-codec. **Version** : 1.15. +1. **Group** : commons-codec. **Name** : commons-codec. **Version** : 1.16.0. * **Project URL:** [https://commons.apache.org/proper/commons-codec/](https://commons.apache.org/proper/commons-codec/) - * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : commons-logging. **Name** : commons-logging. **Version** : 1.2. * **Project URL:** [http://commons.apache.org/proper/commons-logging/](http://commons.apache.org/proper/commons-logging/) @@ -1401,19 +1687,19 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-api. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-api. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-auth. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-auth. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-context. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-context. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-core. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-core. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) @@ -1425,11 +1711,11 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-protobuf. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-protobuf. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-protobuf-lite. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-protobuf-lite. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) @@ -1437,7 +1723,7 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-stub. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-stub. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) @@ -1457,11 +1743,11 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **Project URL:** [https://github.com/census-instrumentation/opencensus-proto](https://github.com/census-instrumentation/opencensus-proto) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : io.perfmark. **Name** : perfmark-api. **Version** : 0.23.0. +1. **Group** : io.perfmark. **Name** : perfmark-api. **Version** : 0.26.0. * **Project URL:** [https://github.com/perfmark/perfmark](https://github.com/perfmark/perfmark) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.spine.validation. **Name** : runtime. **Version** : 2.0.0-SNAPSHOT.12.**No license information found** +1. **Group** : io.spine.validation. **Name** : spine-validation-java-runtime. **Version** : 2.0.0-SNAPSHOT.99.**No license information found** 1. **Group** : javax.annotation. **Name** : javax.annotation-api. **Version** : 1.3.2. * **Project URL:** [http://jcp.org/en/jsr/detail?id=250](http://jcp.org/en/jsr/detail?id=250) * **License:** [CDDL + GPLv2 with classpath exception](https://github.com/javaee/javax.annotation/blob/master/LICENSE) @@ -1482,13 +1768,8 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **Project URL:** [http://www.bouncycastle.org/java.html](http://www.bouncycastle.org/java.html) * **License:** [Bouncy Castle Licence](http://www.bouncycastle.org/licence.html) -1. **Group** : org.checkerframework. **Name** : checker-compat-qual. **Version** : 2.5.5. - * **Project URL:** [https://checkerframework.org](https://checkerframework.org) - * **License:** [GNU General Public License, version 2 (GPL2), with the classpath exception](http://www.gnu.org/software/classpath/license.html) - * **License:** [The MIT License](http://opensource.org/licenses/MIT) - -1. **Group** : org.checkerframework. **Name** : checker-qual. **Version** : 3.21.3. - * **Project URL:** [https://checkerframework.org](https://checkerframework.org) +1. **Group** : org.checkerframework. **Name** : checker-qual. **Version** : 3.36.0. + * **Project URL:** [https://checkerframework.org/](https://checkerframework.org/) * **License:** [The MIT License](http://opensource.org/licenses/MIT) 1. **Group** : org.codehaus.mojo. **Name** : animal-sniffer-annotations. **Version** : 1.21. @@ -1499,40 +1780,79 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **Project URL:** [https://conscrypt.org/](https://conscrypt.org/) * **License:** [Apache 2](https://www.apache.org/licenses/LICENSE-2.0) -1. **Group** : org.jetbrains. **Name** : annotations. **Version** : 13.0. - * **Project URL:** [http://www.jetbrains.org](http://www.jetbrains.org) - * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : org.jetbrains. **Name** : annotations. **Version** : 23.0.0. + * **Project URL:** [https://github.com/JetBrains/java-annotations](https://github.com/JetBrains/java-annotations) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-reflect. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-reflect. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-common. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-common. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk7. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk7. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk8. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk8. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : org.ow2.asm. **Name** : asm. **Version** : 9.2. + * **Project URL:** [http://asm.ow2.io/](http://asm.ow2.io/) + * **License:** [BSD-3-Clause](https://asm.ow2.io/license.html) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + 1. **Group** : org.threeten. **Name** : threetenbp. **Version** : 1.5.2. * **Project URL:** [https://www.threeten.org/threetenbp](https://www.threeten.org/threetenbp) * **License:** [BSD 3-clause](https://raw.githubusercontent.com/ThreeTen/threetenbp/master/LICENSE.txt) ## Compile, tests, and tooling +1. **Group** : aopalliance. **Name** : aopalliance. **Version** : 1.0. + * **Project URL:** [http://aopalliance.sourceforge.net](http://aopalliance.sourceforge.net) + * **License:** Public Domain + 1. **Group** : com.beust. **Name** : jcommander. **Version** : 1.48. * **Project URL:** [http://beust.com/jcommander](http://beust.com/jcommander) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.github.ben-manes.caffeine. **Name** : caffeine. **Version** : 2.8.8. +1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.15.2.**No license information found** +1. **Group** : com.fasterxml.jackson.core. **Name** : jackson-annotations. **Version** : 2.15.2. + * **Project URL:** [https://github.com/FasterXML/jackson](https://github.com/FasterXML/jackson) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : com.fasterxml.jackson.core. **Name** : jackson-core. **Version** : 2.15.2. + * **Project URL:** [https://github.com/FasterXML/jackson-core](https://github.com/FasterXML/jackson-core) + * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : com.fasterxml.jackson.core. **Name** : jackson-databind. **Version** : 2.15.2. + * **Project URL:** [https://github.com/FasterXML/jackson](https://github.com/FasterXML/jackson) + * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : com.fasterxml.jackson.dataformat. **Name** : jackson-dataformat-xml. **Version** : 2.15.2. + * **Project URL:** [https://github.com/FasterXML/jackson-dataformat-xml](https://github.com/FasterXML/jackson-dataformat-xml) + * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : com.fasterxml.jackson.module. **Name** : jackson-module-kotlin. **Version** : 2.15.2. + * **Project URL:** [https://github.com/FasterXML/jackson-module-kotlin](https://github.com/FasterXML/jackson-module-kotlin) + * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : com.fasterxml.woodstox. **Name** : woodstox-core. **Version** : 6.5.1. + * **Project URL:** [https://github.com/FasterXML/woodstox](https://github.com/FasterXML/woodstox) + * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : com.github.ben-manes.caffeine. **Name** : caffeine. **Version** : 3.0.5. * **Project URL:** [https://github.com/ben-manes/caffeine](https://github.com/ben-manes/caffeine) * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) @@ -1574,26 +1894,22 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic 1. **Group** : com.google.auth. **Name** : google-auth-library-oauth2-http. **Version** : 1.3.0. * **License:** [BSD New license](http://opensource.org/licenses/BSD-3-Clause) -1. **Group** : com.google.auto. **Name** : auto-common. **Version** : 1.2.1. - * **Project URL:** [https://github.com/google/auto/tree/master/common](https://github.com/google/auto/tree/master/common) +1. **Group** : com.google.auto. **Name** : auto-common. **Version** : 1.2.2. + * **Project URL:** [https://github.com/google/auto/tree/main/common](https://github.com/google/auto/tree/main/common) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.auto.service. **Name** : auto-service-annotations. **Version** : 1.0.1. - * **Project URL:** [https://github.com/google/auto/tree/master/service](https://github.com/google/auto/tree/master/service) +1. **Group** : com.google.auto.service. **Name** : auto-service-annotations. **Version** : 1.1.1. + * **Project URL:** [https://github.com/google/auto/tree/main/service](https://github.com/google/auto/tree/main/service) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.auto.value. **Name** : auto-value-annotations. **Version** : 1.9. - * **Project URL:** [https://github.com/google/auto/tree/master/value](https://github.com/google/auto/tree/master/value) +1. **Group** : com.google.auto.value. **Name** : auto-value-annotations. **Version** : 1.10.2. + * **Project URL:** [https://github.com/google/auto/tree/main/value](https://github.com/google/auto/tree/main/value) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : com.google.cloud. **Name** : google-cloud-trace. **Version** : 2.1.0. * **Project URL:** [https://github.com/googleapis/java-trace](https://github.com/googleapis/java-trace) * **License:** [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.code.findbugs. **Name** : jFormatString. **Version** : 3.0.0. - * **Project URL:** [http://findbugs.sourceforge.net/](http://findbugs.sourceforge.net/) - * **License:** [GNU Lesser Public License](http://www.gnu.org/licenses/lgpl.html) - 1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2. * **Project URL:** [http://findbugs.sourceforge.net/](http://findbugs.sourceforge.net/) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -1602,21 +1918,30 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **Project URL:** [https://github.com/google/gson/gson](https://github.com/google/gson/gson) * **License:** [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.errorprone. **Name** : error_prone_annotation. **Version** : 2.10.0. +1. **Group** : com.google.errorprone. **Name** : error_prone_annotation. **Version** : 2.20.0. + * **Project URL:** [https://errorprone.info/error_prone_annotation](https://errorprone.info/error_prone_annotation) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.errorprone. **Name** : error_prone_annotations. **Version** : 2.10.0. +1. **Group** : com.google.errorprone. **Name** : error_prone_annotations. **Version** : 2.20.0. + * **Project URL:** [https://errorprone.info/error_prone_annotations](https://errorprone.info/error_prone_annotations) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.errorprone. **Name** : error_prone_check_api. **Version** : 2.10.0. +1. **Group** : com.google.errorprone. **Name** : error_prone_check_api. **Version** : 2.20.0. + * **Project URL:** [https://errorprone.info/error_prone_check_api](https://errorprone.info/error_prone_check_api) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.errorprone. **Name** : error_prone_core. **Version** : 2.10.0. +1. **Group** : com.google.errorprone. **Name** : error_prone_core. **Version** : 2.20.0. + * **Project URL:** [https://errorprone.info/error_prone_core](https://errorprone.info/error_prone_core) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.errorprone. **Name** : error_prone_type_annotations. **Version** : 2.10.0. +1. **Group** : com.google.errorprone. **Name** : error_prone_type_annotations. **Version** : 2.20.0. + * **Project URL:** [https://errorprone.info/error_prone_type_annotations](https://errorprone.info/error_prone_type_annotations) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : com.google.errorprone. **Name** : javac. **Version** : 9+181-r4173-1. + * **Project URL:** [https://github.com/google/error-prone-javac](https://github.com/google/error-prone-javac) + * **License:** [GNU General Public License, version 2, with the Classpath Exception](http://openjdk.java.net/legal/gplv2+ce.html) + 1. **Group** : com.google.flogger. **Name** : flogger. **Version** : 0.7.4. * **Project URL:** [https://github.com/google/flogger](https://github.com/google/flogger) * **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) @@ -1625,19 +1950,16 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **Project URL:** [https://github.com/google/flogger](https://github.com/google/flogger) * **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.gradle. **Name** : osdetector-gradle-plugin. **Version** : 1.7.0. - * **Project URL:** [https://github.com/google/osdetector-gradle-plugin](https://github.com/google/osdetector-gradle-plugin) - * **License:** [Apache License 2.0](http://opensource.org/licenses/Apache-2.0) - 1. **Group** : com.google.guava. **Name** : failureaccess. **Version** : 1.0.1. * **Project URL:** [https://github.com/google/guava/](https://github.com/google/guava/) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.guava. **Name** : guava. **Version** : 31.1-jre. +1. **Group** : com.google.guava. **Name** : guava. **Version** : 32.1.2-jre. * **Project URL:** [https://github.com/google/guava](https://github.com/google/guava) * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.guava. **Name** : guava-testlib. **Version** : 31.1-jre. +1. **Group** : com.google.guava. **Name** : guava-parent. **Version** : 32.1.2-jre.**No license information found** +1. **Group** : com.google.guava. **Name** : guava-testlib. **Version** : 32.1.2-jre. * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : com.google.guava. **Name** : listenablefuture. **Version** : 9999.0-empty-to-avoid-conflict-with-guava. @@ -1650,50 +1972,54 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic 1. **Group** : com.google.http-client. **Name** : google-http-client-gson. **Version** : 1.40.1. * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : com.google.inject. **Name** : guice. **Version** : 5.1.0. + * **Project URL:** [https://github.com/google/guice](https://github.com/google/guice) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + 1. **Group** : com.google.j2objc. **Name** : j2objc-annotations. **Version** : 1.3. * **Project URL:** [https://github.com/google/j2objc/](https://github.com/google/j2objc/) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.protobuf. **Name** : protobuf-gradle-plugin. **Version** : 0.8.18. - * **Project URL:** [https://github.com/google/protobuf-gradle-plugin](https://github.com/google/protobuf-gradle-plugin) - * **License:** [BSD 3-Clause](http://opensource.org/licenses/BSD-3-Clause) - -1. **Group** : com.google.protobuf. **Name** : protobuf-java. **Version** : 3.19.4. +1. **Group** : com.google.protobuf. **Name** : protobuf-java. **Version** : 3.23.4. * **Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/) - * **License:** [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) + * **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -1. **Group** : com.google.protobuf. **Name** : protobuf-java-util. **Version** : 3.19.4. +1. **Group** : com.google.protobuf. **Name** : protobuf-java-util. **Version** : 3.23.4. * **Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/) - * **License:** [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) + * **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -1. **Group** : com.google.protobuf. **Name** : protobuf-kotlin. **Version** : 3.19.4. - * **License:** [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) +1. **Group** : com.google.protobuf. **Name** : protobuf-kotlin. **Version** : 3.23.4. + * **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -1. **Group** : com.google.protobuf. **Name** : protoc. **Version** : 3.18.0. +1. **Group** : com.google.protobuf. **Name** : protoc. **Version** : 3.23.4. * **Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/) - * **License:** [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) + * **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : com.google.re2j. **Name** : re2j. **Version** : 1.5. * **Project URL:** [http://github.com/google/re2j](http://github.com/google/re2j) * **License:** [Go License](https://golang.org/LICENSE) -1. **Group** : com.google.truth. **Name** : truth. **Version** : 1.1.3. +1. **Group** : com.google.truth. **Name** : truth. **Version** : 1.1.5. * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.truth.extensions. **Name** : truth-java8-extension. **Version** : 1.1.3. +1. **Group** : com.google.truth.extensions. **Name** : truth-java8-extension. **Version** : 1.1.5. * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.truth.extensions. **Name** : truth-liteproto-extension. **Version** : 1.1.3. +1. **Group** : com.google.truth.extensions. **Name** : truth-liteproto-extension. **Version** : 1.1.5. * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.truth.extensions. **Name** : truth-proto-extension. **Version** : 1.1.3. +1. **Group** : com.google.truth.extensions. **Name** : truth-proto-extension. **Version** : 1.1.5. * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.puppycrawl.tools. **Name** : checkstyle. **Version** : 10.1. +1. **Group** : com.puppycrawl.tools. **Name** : checkstyle. **Version** : 10.3.4. * **Project URL:** [https://checkstyle.org/](https://checkstyle.org/) * **License:** [LGPL-2.1+](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt) +1. **Group** : com.soywiz.korlibs.korte. **Name** : korte-jvm. **Version** : 2.7.0. + * **Project URL:** [https://github.com/korlibs/korge-next](https://github.com/korlibs/korge-next) + * **License:** [MIT](https://raw.githubusercontent.com/korlibs/korge-next/master/korge/LICENSE.txt) + 1. **Group** : com.squareup. **Name** : javapoet. **Version** : 1.13.0. * **Project URL:** [http://github.com/square/javapoet/](http://github.com/square/javapoet/) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -1702,22 +2028,14 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **Project URL:** [https://commons.apache.org/proper/commons-beanutils/](https://commons.apache.org/proper/commons-beanutils/) * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : commons-codec. **Name** : commons-codec. **Version** : 1.15. +1. **Group** : commons-codec. **Name** : commons-codec. **Version** : 1.16.0. * **Project URL:** [https://commons.apache.org/proper/commons-codec/](https://commons.apache.org/proper/commons-codec/) - * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : commons-collections. **Name** : commons-collections. **Version** : 3.2.2. * **Project URL:** [http://commons.apache.org/collections/](http://commons.apache.org/collections/) * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : commons-io. **Name** : commons-io. **Version** : 2.6. - * **Project URL:** [http://commons.apache.org/proper/commons-io/](http://commons.apache.org/proper/commons-io/) - * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) - -1. **Group** : commons-lang. **Name** : commons-lang. **Version** : 2.6. - * **Project URL:** [http://commons.apache.org/lang/](http://commons.apache.org/lang/) - * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) - 1. **Group** : commons-logging. **Name** : commons-logging. **Version** : 1.2. * **Project URL:** [http://commons.apache.org/proper/commons-logging/](http://commons.apache.org/proper/commons-logging/) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -1726,27 +2044,30 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **Project URL:** [http://picocli.info](http://picocli.info) * **License:** [The Apache Software License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : io.github.java-diff-utils. **Name** : java-diff-utils. **Version** : 4.0. - * **Project URL:** [https://github.com/java-diff-utils/java-diff-utils](https://github.com/java-diff-utils/java-diff-utils) +1. **Group** : io.github.eisop. **Name** : dataflow-errorprone. **Version** : 3.34.0-eisop1. + * **Project URL:** [https://eisop.github.io/](https://eisop.github.io/) + * **License:** [GNU General Public License, version 2 (GPL2), with the classpath exception](http://www.gnu.org/software/classpath/license.html) + +1. **Group** : io.github.java-diff-utils. **Name** : java-diff-utils. **Version** : 4.12. * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : io.grpc. **Name** : grpc-alts. **Version** : 1.42.1. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-api. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-api. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-auth. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-auth. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-context. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-context. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-core. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-core. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) @@ -1758,11 +2079,11 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-protobuf. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-protobuf. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-protobuf-lite. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-protobuf-lite. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) @@ -1770,7 +2091,7 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-stub. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-stub. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) @@ -1778,10 +2099,30 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : protoc-gen-grpc-java. **Version** : 1.38.0. +1. **Group** : io.grpc. **Name** : protoc-gen-grpc-java. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) +1. **Group** : io.kotest. **Name** : kotest-assertions-api. **Version** : 5.6.2.**No license information found** +1. **Group** : io.kotest. **Name** : kotest-assertions-api-jvm. **Version** : 5.6.2. + * **Project URL:** [https://github.com/kotest/kotest](https://github.com/kotest/kotest) + * **License:** [Apache-2.0](https://opensource.org/licenses/Apache-2.0) + +1. **Group** : io.kotest. **Name** : kotest-assertions-core. **Version** : 5.6.2.**No license information found** +1. **Group** : io.kotest. **Name** : kotest-assertions-core-jvm. **Version** : 5.6.2. + * **Project URL:** [https://github.com/kotest/kotest](https://github.com/kotest/kotest) + * **License:** [Apache-2.0](https://opensource.org/licenses/Apache-2.0) + +1. **Group** : io.kotest. **Name** : kotest-assertions-shared. **Version** : 5.6.2.**No license information found** +1. **Group** : io.kotest. **Name** : kotest-assertions-shared-jvm. **Version** : 5.6.2. + * **Project URL:** [https://github.com/kotest/kotest](https://github.com/kotest/kotest) + * **License:** [Apache-2.0](https://opensource.org/licenses/Apache-2.0) + +1. **Group** : io.kotest. **Name** : kotest-common. **Version** : 5.6.2.**No license information found** +1. **Group** : io.kotest. **Name** : kotest-common-jvm. **Version** : 5.6.2. + * **Project URL:** [https://github.com/kotest/kotest](https://github.com/kotest/kotest) + * **License:** [Apache-2.0](https://opensource.org/licenses/Apache-2.0) + 1. **Group** : io.opencensus. **Name** : opencensus-api. **Version** : 0.28.0. * **Project URL:** [https://github.com/census-instrumentation/opencensus-java](https://github.com/census-instrumentation/opencensus-java) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -1794,48 +2135,56 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **Project URL:** [https://github.com/census-instrumentation/opencensus-proto](https://github.com/census-instrumentation/opencensus-proto) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : io.perfmark. **Name** : perfmark-api. **Version** : 0.23.0. +1. **Group** : io.perfmark. **Name** : perfmark-api. **Version** : 0.26.0. * **Project URL:** [https://github.com/perfmark/perfmark](https://github.com/perfmark/perfmark) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.spine.validation. **Name** : runtime. **Version** : 2.0.0-SNAPSHOT.12.**No license information found** +1. **Group** : io.spine.protodata. **Name** : protodata-codegen-java. **Version** : 0.9.6.**No license information found** +1. **Group** : io.spine.protodata. **Name** : protodata-fat-cli. **Version** : 0.9.11.**No license information found** +1. **Group** : io.spine.protodata. **Name** : protodata-protoc. **Version** : 0.9.11.**No license information found** +1. **Group** : io.spine.validation. **Name** : spine-validation-configuration. **Version** : 2.0.0-SNAPSHOT.99.**No license information found** +1. **Group** : io.spine.validation. **Name** : spine-validation-context. **Version** : 2.0.0-SNAPSHOT.99.**No license information found** +1. **Group** : io.spine.validation. **Name** : spine-validation-java. **Version** : 2.0.0-SNAPSHOT.99.**No license information found** +1. **Group** : io.spine.validation. **Name** : spine-validation-java-bundle. **Version** : 2.0.0-SNAPSHOT.99.**No license information found** +1. **Group** : io.spine.validation. **Name** : spine-validation-java-runtime. **Version** : 2.0.0-SNAPSHOT.99.**No license information found** +1. **Group** : io.spine.validation. **Name** : spine-validation-model. **Version** : 2.0.0-SNAPSHOT.99.**No license information found** 1. **Group** : javax.annotation. **Name** : javax.annotation-api. **Version** : 1.3.2. * **Project URL:** [http://jcp.org/en/jsr/detail?id=250](http://jcp.org/en/jsr/detail?id=250) * **License:** [CDDL + GPLv2 with classpath exception](https://github.com/javaee/javax.annotation/blob/master/LICENSE) +1. **Group** : javax.inject. **Name** : javax.inject. **Version** : 1. + * **Project URL:** [http://code.google.com/p/atinject/](http://code.google.com/p/atinject/) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + 1. **Group** : junit. **Name** : junit. **Version** : 4.13.1. * **Project URL:** [http://junit.org](http://junit.org) * **License:** [Eclipse Public License 1.0](http://www.eclipse.org/legal/epl-v10.html) -1. **Group** : kr.motd.maven. **Name** : os-maven-plugin. **Version** : 1.7.0. - * **Project URL:** [https://github.com/trustin/os-maven-plugin/](https://github.com/trustin/os-maven-plugin/) - * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) - 1. **Group** : net.java.dev.jna. **Name** : jna. **Version** : 5.6.0. * **Project URL:** [https://github.com/java-native-access/jna](https://github.com/java-native-access/jna) * **License:** [Apache License v2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) * **License:** [LGPL, version 2.1](http://www.gnu.org/licenses/licenses.html) -1. **Group** : net.ltgt.gradle. **Name** : gradle-errorprone-plugin. **Version** : 2.0.2.**No license information found** -1. **Group** : net.sf.saxon. **Name** : Saxon-HE. **Version** : 10.6. +1. **Group** : net.ltgt.gradle. **Name** : gradle-errorprone-plugin. **Version** : 3.1.0.**No license information found** +1. **Group** : net.sf.saxon. **Name** : Saxon-HE. **Version** : 11.4. * **Project URL:** [http://www.saxonica.com/](http://www.saxonica.com/) * **License:** [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/2.0/) -1. **Group** : net.sourceforge.pmd. **Name** : pmd-core. **Version** : 6.44.0. +1. **Group** : net.sourceforge.pmd. **Name** : pmd-core. **Version** : 6.55.0. * **License:** [BSD-style](http://pmd.sourceforge.net/license.html) -1. **Group** : net.sourceforge.pmd. **Name** : pmd-java. **Version** : 6.44.0. +1. **Group** : net.sourceforge.pmd. **Name** : pmd-java. **Version** : 6.55.0. * **License:** [BSD-style](http://pmd.sourceforge.net/license.html) 1. **Group** : net.sourceforge.saxon. **Name** : saxon. **Version** : 9.1.0.8. * **Project URL:** [http://saxon.sourceforge.net/](http://saxon.sourceforge.net/) * **License:** [Mozilla Public License Version 1.0](http://www.mozilla.org/MPL/MPL-1.0.txt) -1. **Group** : org.antlr. **Name** : antlr4-runtime. **Version** : 4.7.2. - * **Project URL:** [http://www.antlr.org](http://www.antlr.org) - * **License:** [The BSD License](http://www.antlr.org/license.html) +1. **Group** : org.antlr. **Name** : antlr4-runtime. **Version** : 4.11.1. + * **Project URL:** [https://www.antlr.org/](https://www.antlr.org/) + * **License:** [BSD-3-Clause](https://www.antlr.org/license.html) -1. **Group** : org.antlr. **Name** : antlr4-runtime. **Version** : 4.9.3. +1. **Group** : org.antlr. **Name** : antlr4-runtime. **Version** : 4.7.2. * **Project URL:** [http://www.antlr.org](http://www.antlr.org) * **License:** [The BSD License](http://www.antlr.org/license.html) @@ -1851,6 +2200,15 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **Project URL:** [http://hc.apache.org/httpcomponents-core-ga](http://hc.apache.org/httpcomponents-core-ga) * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : org.apache.httpcomponents.client5. **Name** : httpclient5. **Version** : 5.1.3. + * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.apache.httpcomponents.core5. **Name** : httpcore5. **Version** : 5.1.3. + * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.apache.httpcomponents.core5. **Name** : httpcore5-h2. **Version** : 5.1.3. + * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + 1. **Group** : org.apiguardian. **Name** : apiguardian-api. **Version** : 1.1.2. * **Project URL:** [https://github.com/apiguardian-team/apiguardian](https://github.com/apiguardian-team/apiguardian) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -1863,43 +2221,50 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **Project URL:** [http://www.bouncycastle.org/java.html](http://www.bouncycastle.org/java.html) * **License:** [Bouncy Castle Licence](http://www.bouncycastle.org/licence.html) -1. **Group** : org.checkerframework. **Name** : checker-compat-qual. **Version** : 2.5.5. +1. **Group** : org.checkerframework. **Name** : checker-compat-qual. **Version** : 2.5.3. * **Project URL:** [https://checkerframework.org](https://checkerframework.org) * **License:** [GNU General Public License, version 2 (GPL2), with the classpath exception](http://www.gnu.org/software/classpath/license.html) * **License:** [The MIT License](http://opensource.org/licenses/MIT) -1. **Group** : org.checkerframework. **Name** : checker-qual. **Version** : 3.21.3. - * **Project URL:** [https://checkerframework.org](https://checkerframework.org) +1. **Group** : org.checkerframework. **Name** : checker-qual. **Version** : 3.36.0. + * **Project URL:** [https://checkerframework.org/](https://checkerframework.org/) * **License:** [The MIT License](http://opensource.org/licenses/MIT) -1. **Group** : org.checkerframework. **Name** : dataflow-errorprone. **Version** : 3.15.0. - * **Project URL:** [https://checkerframework.org](https://checkerframework.org) - * **License:** [GNU General Public License, version 2 (GPL2), with the classpath exception](http://www.gnu.org/software/classpath/license.html) - 1. **Group** : org.codehaus.mojo. **Name** : animal-sniffer-annotations. **Version** : 1.21. * **License:** [MIT license](http://www.opensource.org/licenses/mit-license.php) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : org.codehaus.woodstox. **Name** : stax2-api. **Version** : 4.2.1. + * **Project URL:** [http://github.com/FasterXML/stax2-api](http://github.com/FasterXML/stax2-api) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [The BSD License](http://www.opensource.org/licenses/bsd-license.php) + 1. **Group** : org.conscrypt. **Name** : conscrypt-openjdk-uber. **Version** : 2.5.1. * **Project URL:** [https://conscrypt.org/](https://conscrypt.org/) * **License:** [Apache 2](https://www.apache.org/licenses/LICENSE-2.0) -1. **Group** : org.eclipse.jgit. **Name** : org.eclipse.jgit. **Version** : 4.4.1.201607150455-r. - * **License:** Eclipse Distribution License (New BSD License) +1. **Group** : org.freemarker. **Name** : freemarker. **Version** : 2.3.31. + * **Project URL:** [https://freemarker.apache.org/](https://freemarker.apache.org/) + * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.hamcrest. **Name** : hamcrest. **Version** : 2.2. + * **Project URL:** [http://hamcrest.org/JavaHamcrest/](http://hamcrest.org/JavaHamcrest/) + * **License:** [BSD License 3](http://opensource.org/licenses/BSD-3-Clause) -1. **Group** : org.hamcrest. **Name** : hamcrest-core. **Version** : 1.3. - * **License:** [New BSD License](http://www.opensource.org/licenses/bsd-license.php) +1. **Group** : org.hamcrest. **Name** : hamcrest-core. **Version** : 2.2. + * **Project URL:** [http://hamcrest.org/JavaHamcrest/](http://hamcrest.org/JavaHamcrest/) + * **License:** [BSD License 3](http://opensource.org/licenses/BSD-3-Clause) -1. **Group** : org.jacoco. **Name** : org.jacoco.agent. **Version** : 0.8.7. +1. **Group** : org.jacoco. **Name** : org.jacoco.agent. **Version** : 0.8.8. * **License:** [Eclipse Public License 2.0](https://www.eclipse.org/legal/epl-2.0/) -1. **Group** : org.jacoco. **Name** : org.jacoco.ant. **Version** : 0.8.7. +1. **Group** : org.jacoco. **Name** : org.jacoco.ant. **Version** : 0.8.8. * **License:** [Eclipse Public License 2.0](https://www.eclipse.org/legal/epl-2.0/) -1. **Group** : org.jacoco. **Name** : org.jacoco.core. **Version** : 0.8.7. +1. **Group** : org.jacoco. **Name** : org.jacoco.core. **Version** : 0.8.8. * **License:** [Eclipse Public License 2.0](https://www.eclipse.org/legal/epl-2.0/) -1. **Group** : org.jacoco. **Name** : org.jacoco.report. **Version** : 0.8.7. +1. **Group** : org.jacoco. **Name** : org.jacoco.report. **Version** : 0.8.8. * **License:** [Eclipse Public License 2.0](https://www.eclipse.org/legal/epl-2.0/) 1. **Group** : org.javassist. **Name** : javassist. **Version** : 3.28.0-GA. @@ -1908,119 +2273,183 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **License:** [LGPL 2.1](http://www.gnu.org/licenses/lgpl-2.1.html) * **License:** [MPL 1.1](http://www.mozilla.org/MPL/MPL-1.1.html) -1. **Group** : org.jetbrains. **Name** : annotations. **Version** : 13.0. - * **Project URL:** [http://www.jetbrains.org](http://www.jetbrains.org) +1. **Group** : org.jboss.forge.roaster. **Name** : roaster-api. **Version** : 2.28.0.Final. + * **License:** [Eclipse Public License version 1.0](http://www.eclipse.org/legal/epl-v10.html) + * **License:** [Public Domain](http://repository.jboss.org/licenses/cc0-1.0.txt) + +1. **Group** : org.jboss.forge.roaster. **Name** : roaster-jdt. **Version** : 2.28.0.Final. + * **License:** [Eclipse Public License version 1.0](http://www.eclipse.org/legal/epl-v10.html) + * **License:** [Public Domain](http://repository.jboss.org/licenses/cc0-1.0.txt) + +1. **Group** : org.jetbrains. **Name** : annotations. **Version** : 23.0.0. + * **Project URL:** [https://github.com/JetBrains/java-annotations](https://github.com/JetBrains/java-annotations) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains. **Name** : markdown. **Version** : 0.3.1.**No license information found** +1. **Group** : org.jetbrains. **Name** : markdown-jvm. **Version** : 0.3.1. + * **Project URL:** [https://github.com/JetBrains/markdown](https://github.com/JetBrains/markdown) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.dokka. **Name** : dokka-analysis. **Version** : 1.8.10. + * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.intellij.deps. **Name** : trove4j. **Version** : 1.0.20181211. +1. **Group** : org.jetbrains.dokka. **Name** : dokka-base. **Version** : 1.8.10. + * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.dokka. **Name** : dokka-core. **Version** : 1.8.10. + * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.dokka. **Name** : javadoc-plugin. **Version** : 1.8.10. + * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.dokka. **Name** : kotlin-analysis-compiler. **Version** : 1.8.10. + * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.dokka. **Name** : kotlin-analysis-intellij. **Version** : 1.8.10. + * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.dokka. **Name** : kotlin-as-java-plugin. **Version** : 1.8.10. + * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.intellij.deps. **Name** : trove4j. **Version** : 1.0.20200330. * **Project URL:** [https://github.com/JetBrains/intellij-deps-trove4j](https://github.com/JetBrains/intellij-deps-trove4j) * **License:** [GNU LESSER GENERAL PUBLIC LICENSE 2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-compiler-embeddable. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-compiler-embeddable. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-daemon-embeddable. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-daemon-embeddable. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-klib-commonizer-embeddable. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-klib-commonizer-embeddable. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-reflect. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-reflect. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-script-runtime. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-script-runtime. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-common. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-common. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-compiler-embeddable. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-compiler-embeddable. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-compiler-impl-embeddable. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-compiler-impl-embeddable. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-jvm. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-jvm. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-common. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-common. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk7. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk7. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk8. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk8. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.junit. **Name** : junit-bom. **Version** : 5.8.2.**No license information found** -1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-api. **Version** : 5.8.2. +1. **Group** : org.jetbrains.kotlinx. **Name** : atomicfu. **Version** : 0.20.2. + * **Project URL:** [https://github.com/Kotlin/kotlinx.atomicfu](https://github.com/Kotlin/kotlinx.atomicfu) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-bom. **Version** : 1.6.3.**No license information found** +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-bom. **Version** : 1.7.0.**No license information found** +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-core. **Version** : 1.6.3.**No license information found** +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-core. **Version** : 1.7.0.**No license information found** +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-core-jvm. **Version** : 1.6.3. + * **Project URL:** [https://github.com/Kotlin/kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-core-jvm. **Version** : 1.7.0. + * **Project URL:** [https://github.com/Kotlin/kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-jdk8. **Version** : 1.7.0. + * **Project URL:** [https://github.com/Kotlin/kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-html-jvm. **Version** : 0.7.5. + * **Project URL:** [https://github.com/Kotlin/kotlinx.html](https://github.com/Kotlin/kotlinx.html) + * **License:** [The Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jsoup. **Name** : jsoup. **Version** : 1.15.3. + * **Project URL:** [https://jsoup.org/](https://jsoup.org/) + * **License:** [The MIT License](https://jsoup.org/license) + +1. **Group** : org.junit. **Name** : junit-bom. **Version** : 5.10.0.**No license information found** +1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-api. **Version** : 5.10.0. * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-engine. **Version** : 5.8.2. +1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-engine. **Version** : 5.10.0. * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-params. **Version** : 5.8.2. +1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-params. **Version** : 5.10.0. * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.platform. **Name** : junit-platform-commons. **Version** : 1.8.2. +1. **Group** : org.junit.platform. **Name** : junit-platform-commons. **Version** : 1.10.0. * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.platform. **Name** : junit-platform-engine. **Version** : 1.8.2. +1. **Group** : org.junit.platform. **Name** : junit-platform-engine. **Version** : 1.10.0. * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.opentest4j. **Name** : opentest4j. **Version** : 1.2.0. +1. **Group** : org.opentest4j. **Name** : opentest4j. **Version** : 1.3.0. * **Project URL:** [https://github.com/ota4j-team/opentest4j](https://github.com/ota4j-team/opentest4j) - * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) - -1. **Group** : org.ow2.asm. **Name** : asm. **Version** : 9.1. - * **Project URL:** [http://asm.ow2.io/](http://asm.ow2.io/) - * **License:** [BSD-3-Clause](https://asm.ow2.io/license.html) - * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [The Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : org.ow2.asm. **Name** : asm. **Version** : 9.2. * **Project URL:** [http://asm.ow2.io/](http://asm.ow2.io/) * **License:** [BSD-3-Clause](https://asm.ow2.io/license.html) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.ow2.asm. **Name** : asm-analysis. **Version** : 9.1. +1. **Group** : org.ow2.asm. **Name** : asm-analysis. **Version** : 9.2. * **Project URL:** [http://asm.ow2.io/](http://asm.ow2.io/) * **License:** [BSD-3-Clause](https://asm.ow2.io/license.html) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.ow2.asm. **Name** : asm-commons. **Version** : 9.1. +1. **Group** : org.ow2.asm. **Name** : asm-commons. **Version** : 9.2. * **Project URL:** [http://asm.ow2.io/](http://asm.ow2.io/) * **License:** [BSD-3-Clause](https://asm.ow2.io/license.html) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.ow2.asm. **Name** : asm-tree. **Version** : 9.1. +1. **Group** : org.ow2.asm. **Name** : asm-tree. **Version** : 9.2. * **Project URL:** [http://asm.ow2.io/](http://asm.ow2.io/) * **License:** [BSD-3-Clause](https://asm.ow2.io/license.html) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.pcollections. **Name** : pcollections. **Version** : 2.1.2. - * **Project URL:** [http://pcollections.org](http://pcollections.org) - * **License:** [The MIT License](http://www.opensource.org/licenses/mit-license.php) +1. **Group** : org.pcollections. **Name** : pcollections. **Version** : 3.1.4. + * **Project URL:** [https://github.com/hrldcpr/pcollections](https://github.com/hrldcpr/pcollections) + * **License:** [The MIT License](https://opensource.org/licenses/mit-license.php) 1. **Group** : org.reflections. **Name** : reflections. **Version** : 0.10.2. * **Project URL:** [http://github.com/ronmamo/reflections](http://github.com/ronmamo/reflections) @@ -2031,22 +2460,26 @@ This report was generated on **Mon Apr 11 14:29:57 EEST 2022** using [Gradle-Lic * **Project URL:** [https://www.threeten.org/threetenbp](https://www.threeten.org/threetenbp) * **License:** [BSD 3-clause](https://raw.githubusercontent.com/ThreeTen/threetenbp/master/LICENSE.txt) +1. **Group** : org.xmlresolver. **Name** : xmlresolver. **Version** : 4.4.3. + * **Project URL:** [https://github.com/xmlresolver/xmlresolver](https://github.com/xmlresolver/xmlresolver) + * **License:** [Apache License version 2.0](https://www.apache.org/licenses/LICENSE-2.0) + The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 11 14:29:58 EEST 2022** 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). +This report was generated on **Thu Aug 24 11:27:07 WEST 2023** 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.gcloud:spine-testutil-gcloud:2.0.0-SNAPSHOT.94` +# Dependencies of `io.spine.gcloud:spine-testutil-gcloud:2.0.0-SNAPSHOT.155` ## Runtime -1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.13.0.**No license information found** -1. **Group** : com.fasterxml.jackson.core. **Name** : jackson-core. **Version** : 2.13.0. +1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.15.2.**No license information found** +1. **Group** : com.fasterxml.jackson.core. **Name** : jackson-core. **Version** : 2.15.2. * **Project URL:** [https://github.com/FasterXML/jackson-core](https://github.com/FasterXML/jackson-core) * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) - * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : com.google.android. **Name** : annotations. **Version** : 4.1.1.4. * **Project URL:** [http://source.android.com/](http://source.android.com/) @@ -2086,8 +2519,8 @@ This report was generated on **Mon Apr 11 14:29:58 EEST 2022** using [Gradle-Lic 1. **Group** : com.google.auth. **Name** : google-auth-library-oauth2-http. **Version** : 1.3.0. * **License:** [BSD New license](http://opensource.org/licenses/BSD-3-Clause) -1. **Group** : com.google.auto.value. **Name** : auto-value-annotations. **Version** : 1.9. - * **Project URL:** [https://github.com/google/auto/tree/master/value](https://github.com/google/auto/tree/master/value) +1. **Group** : com.google.auto.value. **Name** : auto-value-annotations. **Version** : 1.10.2. + * **Project URL:** [https://github.com/google/auto/tree/main/value](https://github.com/google/auto/tree/main/value) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : com.google.cloud. **Name** : google-cloud-core. **Version** : 2.3.3. @@ -2113,25 +2546,23 @@ This report was generated on **Mon Apr 11 14:29:58 EEST 2022** using [Gradle-Lic * **Project URL:** [https://github.com/google/gson/gson](https://github.com/google/gson/gson) * **License:** [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.errorprone. **Name** : error_prone_annotations. **Version** : 2.10.0. +1. **Group** : com.google.errorprone. **Name** : error_prone_annotations. **Version** : 2.20.0. + * **Project URL:** [https://errorprone.info/error_prone_annotations](https://errorprone.info/error_prone_annotations) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.flogger. **Name** : flogger. **Version** : 0.7.4. - * **Project URL:** [https://github.com/google/flogger](https://github.com/google/flogger) - * **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) - -1. **Group** : com.google.flogger. **Name** : flogger-system-backend. **Version** : 0.7.4. - * **Project URL:** [https://github.com/google/flogger](https://github.com/google/flogger) - * **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : com.google.errorprone. **Name** : error_prone_type_annotations. **Version** : 2.20.0. + * **Project URL:** [https://errorprone.info/error_prone_type_annotations](https://errorprone.info/error_prone_type_annotations) + * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : com.google.guava. **Name** : failureaccess. **Version** : 1.0.1. * **Project URL:** [https://github.com/google/guava/](https://github.com/google/guava/) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.guava. **Name** : guava. **Version** : 31.1-jre. +1. **Group** : com.google.guava. **Name** : guava. **Version** : 32.1.2-jre. * **Project URL:** [https://github.com/google/guava](https://github.com/google/guava) * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : com.google.guava. **Name** : guava-parent. **Version** : 32.1.2-jre.**No license information found** 1. **Group** : com.google.guava. **Name** : listenablefuture. **Version** : 9999.0-empty-to-avoid-conflict-with-guava. * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -2163,46 +2594,46 @@ This report was generated on **Mon Apr 11 14:29:58 EEST 2022** using [Gradle-Lic * **Project URL:** [https://www.google.com/](https://www.google.com/) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.protobuf. **Name** : protobuf-java. **Version** : 3.19.4. +1. **Group** : com.google.protobuf. **Name** : protobuf-java. **Version** : 3.23.4. * **Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/) - * **License:** [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) + * **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -1. **Group** : com.google.protobuf. **Name** : protobuf-java-util. **Version** : 3.19.4. +1. **Group** : com.google.protobuf. **Name** : protobuf-java-util. **Version** : 3.23.4. * **Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/) - * **License:** [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) + * **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -1. **Group** : com.google.protobuf. **Name** : protobuf-kotlin. **Version** : 3.19.4. - * **License:** [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) +1. **Group** : com.google.protobuf. **Name** : protobuf-kotlin. **Version** : 3.23.4. + * **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -1. **Group** : commons-codec. **Name** : commons-codec. **Version** : 1.15. +1. **Group** : commons-codec. **Name** : commons-codec. **Version** : 1.16.0. * **Project URL:** [https://commons.apache.org/proper/commons-codec/](https://commons.apache.org/proper/commons-codec/) - * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : commons-logging. **Name** : commons-logging. **Version** : 1.2. * **Project URL:** [http://commons.apache.org/proper/commons-logging/](http://commons.apache.org/proper/commons-logging/) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : io.grpc. **Name** : grpc-api. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-api. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-context. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-context. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-core. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-core. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-protobuf. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-protobuf. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-protobuf-lite. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-protobuf-lite. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-stub. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-stub. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) @@ -2214,11 +2645,11 @@ This report was generated on **Mon Apr 11 14:29:58 EEST 2022** using [Gradle-Lic * **Project URL:** [https://github.com/census-instrumentation/opencensus-java](https://github.com/census-instrumentation/opencensus-java) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : io.perfmark. **Name** : perfmark-api. **Version** : 0.23.0. +1. **Group** : io.perfmark. **Name** : perfmark-api. **Version** : 0.26.0. * **Project URL:** [https://github.com/perfmark/perfmark](https://github.com/perfmark/perfmark) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.spine.validation. **Name** : runtime. **Version** : 2.0.0-SNAPSHOT.12.**No license information found** +1. **Group** : io.spine.validation. **Name** : spine-validation-java-runtime. **Version** : 2.0.0-SNAPSHOT.99.**No license information found** 1. **Group** : javax.annotation. **Name** : javax.annotation-api. **Version** : 1.3.2. * **Project URL:** [http://jcp.org/en/jsr/detail?id=250](http://jcp.org/en/jsr/detail?id=250) * **License:** [CDDL + GPLv2 with classpath exception](https://github.com/javaee/javax.annotation/blob/master/LICENSE) @@ -2231,59 +2662,87 @@ This report was generated on **Mon Apr 11 14:29:58 EEST 2022** using [Gradle-Lic * **Project URL:** [http://hc.apache.org/httpcomponents-core-ga](http://hc.apache.org/httpcomponents-core-ga) * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.checkerframework. **Name** : checker-compat-qual. **Version** : 2.5.5. - * **Project URL:** [https://checkerframework.org](https://checkerframework.org) - * **License:** [GNU General Public License, version 2 (GPL2), with the classpath exception](http://www.gnu.org/software/classpath/license.html) - * **License:** [The MIT License](http://opensource.org/licenses/MIT) - -1. **Group** : org.checkerframework. **Name** : checker-qual. **Version** : 3.21.3. - * **Project URL:** [https://checkerframework.org](https://checkerframework.org) +1. **Group** : org.checkerframework. **Name** : checker-qual. **Version** : 3.36.0. + * **Project URL:** [https://checkerframework.org/](https://checkerframework.org/) * **License:** [The MIT License](http://opensource.org/licenses/MIT) 1. **Group** : org.codehaus.mojo. **Name** : animal-sniffer-annotations. **Version** : 1.21. * **License:** [MIT license](http://www.opensource.org/licenses/mit-license.php) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains. **Name** : annotations. **Version** : 13.0. - * **Project URL:** [http://www.jetbrains.org](http://www.jetbrains.org) - * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : org.jetbrains. **Name** : annotations. **Version** : 23.0.0. + * **Project URL:** [https://github.com/JetBrains/java-annotations](https://github.com/JetBrains/java-annotations) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-reflect. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-reflect. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-common. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-common. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk7. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk7. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk8. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk8. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : org.ow2.asm. **Name** : asm. **Version** : 9.2. + * **Project URL:** [http://asm.ow2.io/](http://asm.ow2.io/) + * **License:** [BSD-3-Clause](https://asm.ow2.io/license.html) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + 1. **Group** : org.threeten. **Name** : threetenbp. **Version** : 1.5.2. * **Project URL:** [https://www.threeten.org/threetenbp](https://www.threeten.org/threetenbp) * **License:** [BSD 3-clause](https://raw.githubusercontent.com/ThreeTen/threetenbp/master/LICENSE.txt) ## Compile, tests, and tooling +1. **Group** : aopalliance. **Name** : aopalliance. **Version** : 1.0. + * **Project URL:** [http://aopalliance.sourceforge.net](http://aopalliance.sourceforge.net) + * **License:** Public Domain + 1. **Group** : com.beust. **Name** : jcommander. **Version** : 1.48. * **Project URL:** [http://beust.com/jcommander](http://beust.com/jcommander) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.13.0.**No license information found** -1. **Group** : com.fasterxml.jackson.core. **Name** : jackson-core. **Version** : 2.13.0. +1. **Group** : com.fasterxml.jackson. **Name** : jackson-bom. **Version** : 2.15.2.**No license information found** +1. **Group** : com.fasterxml.jackson.core. **Name** : jackson-annotations. **Version** : 2.15.2. + * **Project URL:** [https://github.com/FasterXML/jackson](https://github.com/FasterXML/jackson) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : com.fasterxml.jackson.core. **Name** : jackson-core. **Version** : 2.15.2. * **Project URL:** [https://github.com/FasterXML/jackson-core](https://github.com/FasterXML/jackson-core) * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : com.fasterxml.jackson.core. **Name** : jackson-databind. **Version** : 2.15.2. + * **Project URL:** [https://github.com/FasterXML/jackson](https://github.com/FasterXML/jackson) + * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : com.fasterxml.jackson.dataformat. **Name** : jackson-dataformat-xml. **Version** : 2.15.2. + * **Project URL:** [https://github.com/FasterXML/jackson-dataformat-xml](https://github.com/FasterXML/jackson-dataformat-xml) + * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : com.fasterxml.jackson.module. **Name** : jackson-module-kotlin. **Version** : 2.15.2. + * **Project URL:** [https://github.com/FasterXML/jackson-module-kotlin](https://github.com/FasterXML/jackson-module-kotlin) + * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : com.fasterxml.woodstox. **Name** : woodstox-core. **Version** : 6.5.1. + * **Project URL:** [https://github.com/FasterXML/woodstox](https://github.com/FasterXML/woodstox) + * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.github.ben-manes.caffeine. **Name** : caffeine. **Version** : 2.8.8. +1. **Group** : com.github.ben-manes.caffeine. **Name** : caffeine. **Version** : 3.0.5. * **Project URL:** [https://github.com/ben-manes/caffeine](https://github.com/ben-manes/caffeine) * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) @@ -2329,16 +2788,16 @@ This report was generated on **Mon Apr 11 14:29:58 EEST 2022** using [Gradle-Lic 1. **Group** : com.google.auth. **Name** : google-auth-library-oauth2-http. **Version** : 1.3.0. * **License:** [BSD New license](http://opensource.org/licenses/BSD-3-Clause) -1. **Group** : com.google.auto. **Name** : auto-common. **Version** : 1.2.1. - * **Project URL:** [https://github.com/google/auto/tree/master/common](https://github.com/google/auto/tree/master/common) +1. **Group** : com.google.auto. **Name** : auto-common. **Version** : 1.2.2. + * **Project URL:** [https://github.com/google/auto/tree/main/common](https://github.com/google/auto/tree/main/common) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.auto.service. **Name** : auto-service-annotations. **Version** : 1.0.1. - * **Project URL:** [https://github.com/google/auto/tree/master/service](https://github.com/google/auto/tree/master/service) +1. **Group** : com.google.auto.service. **Name** : auto-service-annotations. **Version** : 1.1.1. + * **Project URL:** [https://github.com/google/auto/tree/main/service](https://github.com/google/auto/tree/main/service) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.auto.value. **Name** : auto-value-annotations. **Version** : 1.9. - * **Project URL:** [https://github.com/google/auto/tree/master/value](https://github.com/google/auto/tree/master/value) +1. **Group** : com.google.auto.value. **Name** : auto-value-annotations. **Version** : 1.10.2. + * **Project URL:** [https://github.com/google/auto/tree/main/value](https://github.com/google/auto/tree/main/value) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : com.google.cloud. **Name** : google-cloud-core. **Version** : 2.3.3. @@ -2356,10 +2815,6 @@ This report was generated on **Mon Apr 11 14:29:58 EEST 2022** using [Gradle-Lic 1. **Group** : com.google.cloud.datastore. **Name** : datastore-v1-proto-client. **Version** : 2.2.1. * **License:** [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.code.findbugs. **Name** : jFormatString. **Version** : 3.0.0. - * **Project URL:** [http://findbugs.sourceforge.net/](http://findbugs.sourceforge.net/) - * **License:** [GNU Lesser Public License](http://www.gnu.org/licenses/lgpl.html) - 1. **Group** : com.google.code.findbugs. **Name** : jsr305. **Version** : 3.0.2. * **Project URL:** [http://findbugs.sourceforge.net/](http://findbugs.sourceforge.net/) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -2368,21 +2823,30 @@ This report was generated on **Mon Apr 11 14:29:58 EEST 2022** using [Gradle-Lic * **Project URL:** [https://github.com/google/gson/gson](https://github.com/google/gson/gson) * **License:** [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.errorprone. **Name** : error_prone_annotation. **Version** : 2.10.0. +1. **Group** : com.google.errorprone. **Name** : error_prone_annotation. **Version** : 2.20.0. + * **Project URL:** [https://errorprone.info/error_prone_annotation](https://errorprone.info/error_prone_annotation) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.errorprone. **Name** : error_prone_annotations. **Version** : 2.10.0. +1. **Group** : com.google.errorprone. **Name** : error_prone_annotations. **Version** : 2.20.0. + * **Project URL:** [https://errorprone.info/error_prone_annotations](https://errorprone.info/error_prone_annotations) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.errorprone. **Name** : error_prone_check_api. **Version** : 2.10.0. +1. **Group** : com.google.errorprone. **Name** : error_prone_check_api. **Version** : 2.20.0. + * **Project URL:** [https://errorprone.info/error_prone_check_api](https://errorprone.info/error_prone_check_api) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.errorprone. **Name** : error_prone_core. **Version** : 2.10.0. +1. **Group** : com.google.errorprone. **Name** : error_prone_core. **Version** : 2.20.0. + * **Project URL:** [https://errorprone.info/error_prone_core](https://errorprone.info/error_prone_core) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.errorprone. **Name** : error_prone_type_annotations. **Version** : 2.10.0. +1. **Group** : com.google.errorprone. **Name** : error_prone_type_annotations. **Version** : 2.20.0. + * **Project URL:** [https://errorprone.info/error_prone_type_annotations](https://errorprone.info/error_prone_type_annotations) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : com.google.errorprone. **Name** : javac. **Version** : 9+181-r4173-1. + * **Project URL:** [https://github.com/google/error-prone-javac](https://github.com/google/error-prone-javac) + * **License:** [GNU General Public License, version 2, with the Classpath Exception](http://openjdk.java.net/legal/gplv2+ce.html) + 1. **Group** : com.google.flogger. **Name** : flogger. **Version** : 0.7.4. * **Project URL:** [https://github.com/google/flogger](https://github.com/google/flogger) * **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) @@ -2391,19 +2855,16 @@ This report was generated on **Mon Apr 11 14:29:58 EEST 2022** using [Gradle-Lic * **Project URL:** [https://github.com/google/flogger](https://github.com/google/flogger) * **License:** [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.gradle. **Name** : osdetector-gradle-plugin. **Version** : 1.7.0. - * **Project URL:** [https://github.com/google/osdetector-gradle-plugin](https://github.com/google/osdetector-gradle-plugin) - * **License:** [Apache License 2.0](http://opensource.org/licenses/Apache-2.0) - 1. **Group** : com.google.guava. **Name** : failureaccess. **Version** : 1.0.1. * **Project URL:** [https://github.com/google/guava/](https://github.com/google/guava/) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.guava. **Name** : guava. **Version** : 31.1-jre. +1. **Group** : com.google.guava. **Name** : guava. **Version** : 32.1.2-jre. * **Project URL:** [https://github.com/google/guava](https://github.com/google/guava) * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.guava. **Name** : guava-testlib. **Version** : 31.1-jre. +1. **Group** : com.google.guava. **Name** : guava-parent. **Version** : 32.1.2-jre.**No license information found** +1. **Group** : com.google.guava. **Name** : guava-testlib. **Version** : 32.1.2-jre. * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : com.google.guava. **Name** : listenablefuture. **Version** : 9999.0-empty-to-avoid-conflict-with-guava. @@ -2429,6 +2890,10 @@ This report was generated on **Mon Apr 11 14:29:58 EEST 2022** using [Gradle-Lic 1. **Group** : com.google.http-client. **Name** : google-http-client-protobuf. **Version** : 1.40.1. * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : com.google.inject. **Name** : guice. **Version** : 5.1.0. + * **Project URL:** [https://github.com/google/guice](https://github.com/google/guice) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + 1. **Group** : com.google.j2objc. **Name** : j2objc-annotations. **Version** : 1.3. * **Project URL:** [https://github.com/google/j2objc/](https://github.com/google/j2objc/) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -2437,42 +2902,42 @@ This report was generated on **Mon Apr 11 14:29:58 EEST 2022** using [Gradle-Lic * **Project URL:** [https://www.google.com/](https://www.google.com/) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.protobuf. **Name** : protobuf-gradle-plugin. **Version** : 0.8.18. - * **Project URL:** [https://github.com/google/protobuf-gradle-plugin](https://github.com/google/protobuf-gradle-plugin) - * **License:** [BSD 3-Clause](http://opensource.org/licenses/BSD-3-Clause) - -1. **Group** : com.google.protobuf. **Name** : protobuf-java. **Version** : 3.19.4. +1. **Group** : com.google.protobuf. **Name** : protobuf-java. **Version** : 3.23.4. * **Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/) - * **License:** [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) + * **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -1. **Group** : com.google.protobuf. **Name** : protobuf-java-util. **Version** : 3.19.4. +1. **Group** : com.google.protobuf. **Name** : protobuf-java-util. **Version** : 3.23.4. * **Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/) - * **License:** [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) + * **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -1. **Group** : com.google.protobuf. **Name** : protobuf-kotlin. **Version** : 3.19.4. - * **License:** [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) +1. **Group** : com.google.protobuf. **Name** : protobuf-kotlin. **Version** : 3.23.4. + * **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) -1. **Group** : com.google.protobuf. **Name** : protoc. **Version** : 3.18.0. +1. **Group** : com.google.protobuf. **Name** : protoc. **Version** : 3.23.4. * **Project URL:** [https://developers.google.com/protocol-buffers/](https://developers.google.com/protocol-buffers/) - * **License:** [3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause) + * **License:** [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.truth. **Name** : truth. **Version** : 1.1.3. +1. **Group** : com.google.truth. **Name** : truth. **Version** : 1.1.5. * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.truth.extensions. **Name** : truth-java8-extension. **Version** : 1.1.3. +1. **Group** : com.google.truth.extensions. **Name** : truth-java8-extension. **Version** : 1.1.5. * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.truth.extensions. **Name** : truth-liteproto-extension. **Version** : 1.1.3. +1. **Group** : com.google.truth.extensions. **Name** : truth-liteproto-extension. **Version** : 1.1.5. * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.google.truth.extensions. **Name** : truth-proto-extension. **Version** : 1.1.3. +1. **Group** : com.google.truth.extensions. **Name** : truth-proto-extension. **Version** : 1.1.5. * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : com.puppycrawl.tools. **Name** : checkstyle. **Version** : 10.1. +1. **Group** : com.puppycrawl.tools. **Name** : checkstyle. **Version** : 10.3.4. * **Project URL:** [https://checkstyle.org/](https://checkstyle.org/) * **License:** [LGPL-2.1+](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt) +1. **Group** : com.soywiz.korlibs.korte. **Name** : korte-jvm. **Version** : 2.7.0. + * **Project URL:** [https://github.com/korlibs/korge-next](https://github.com/korlibs/korge-next) + * **License:** [MIT](https://raw.githubusercontent.com/korlibs/korge-next/master/korge/LICENSE.txt) + 1. **Group** : com.squareup. **Name** : javapoet. **Version** : 1.13.0. * **Project URL:** [http://github.com/square/javapoet/](http://github.com/square/javapoet/) * **License:** [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -2481,22 +2946,14 @@ This report was generated on **Mon Apr 11 14:29:58 EEST 2022** using [Gradle-Lic * **Project URL:** [https://commons.apache.org/proper/commons-beanutils/](https://commons.apache.org/proper/commons-beanutils/) * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : commons-codec. **Name** : commons-codec. **Version** : 1.15. +1. **Group** : commons-codec. **Name** : commons-codec. **Version** : 1.16.0. * **Project URL:** [https://commons.apache.org/proper/commons-codec/](https://commons.apache.org/proper/commons-codec/) - * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : commons-collections. **Name** : commons-collections. **Version** : 3.2.2. * **Project URL:** [http://commons.apache.org/collections/](http://commons.apache.org/collections/) * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : commons-io. **Name** : commons-io. **Version** : 2.6. - * **Project URL:** [http://commons.apache.org/proper/commons-io/](http://commons.apache.org/proper/commons-io/) - * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) - -1. **Group** : commons-lang. **Name** : commons-lang. **Version** : 2.6. - * **Project URL:** [http://commons.apache.org/lang/](http://commons.apache.org/lang/) - * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) - 1. **Group** : commons-logging. **Name** : commons-logging. **Version** : 1.2. * **Project URL:** [http://commons.apache.org/proper/commons-logging/](http://commons.apache.org/proper/commons-logging/) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -2505,38 +2962,61 @@ This report was generated on **Mon Apr 11 14:29:58 EEST 2022** using [Gradle-Lic * **Project URL:** [http://picocli.info](http://picocli.info) * **License:** [The Apache Software License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : io.github.java-diff-utils. **Name** : java-diff-utils. **Version** : 4.0. - * **Project URL:** [https://github.com/java-diff-utils/java-diff-utils](https://github.com/java-diff-utils/java-diff-utils) +1. **Group** : io.github.eisop. **Name** : dataflow-errorprone. **Version** : 3.34.0-eisop1. + * **Project URL:** [https://eisop.github.io/](https://eisop.github.io/) + * **License:** [GNU General Public License, version 2 (GPL2), with the classpath exception](http://www.gnu.org/software/classpath/license.html) + +1. **Group** : io.github.java-diff-utils. **Name** : java-diff-utils. **Version** : 4.12. * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : io.grpc. **Name** : grpc-api. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-api. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-context. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-context. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-core. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-core. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-protobuf. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-protobuf. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-protobuf-lite. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-protobuf-lite. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : grpc-stub. **Version** : 1.45.0. +1. **Group** : io.grpc. **Name** : grpc-stub. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.grpc. **Name** : protoc-gen-grpc-java. **Version** : 1.38.0. +1. **Group** : io.grpc. **Name** : protoc-gen-grpc-java. **Version** : 1.57.0. * **Project URL:** [https://github.com/grpc/grpc-java](https://github.com/grpc/grpc-java) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) +1. **Group** : io.kotest. **Name** : kotest-assertions-api. **Version** : 5.6.2.**No license information found** +1. **Group** : io.kotest. **Name** : kotest-assertions-api-jvm. **Version** : 5.6.2. + * **Project URL:** [https://github.com/kotest/kotest](https://github.com/kotest/kotest) + * **License:** [Apache-2.0](https://opensource.org/licenses/Apache-2.0) + +1. **Group** : io.kotest. **Name** : kotest-assertions-core. **Version** : 5.6.2.**No license information found** +1. **Group** : io.kotest. **Name** : kotest-assertions-core-jvm. **Version** : 5.6.2. + * **Project URL:** [https://github.com/kotest/kotest](https://github.com/kotest/kotest) + * **License:** [Apache-2.0](https://opensource.org/licenses/Apache-2.0) + +1. **Group** : io.kotest. **Name** : kotest-assertions-shared. **Version** : 5.6.2.**No license information found** +1. **Group** : io.kotest. **Name** : kotest-assertions-shared-jvm. **Version** : 5.6.2. + * **Project URL:** [https://github.com/kotest/kotest](https://github.com/kotest/kotest) + * **License:** [Apache-2.0](https://opensource.org/licenses/Apache-2.0) + +1. **Group** : io.kotest. **Name** : kotest-common. **Version** : 5.6.2.**No license information found** +1. **Group** : io.kotest. **Name** : kotest-common-jvm. **Version** : 5.6.2. + * **Project URL:** [https://github.com/kotest/kotest](https://github.com/kotest/kotest) + * **License:** [Apache-2.0](https://opensource.org/licenses/Apache-2.0) + 1. **Group** : io.opencensus. **Name** : opencensus-api. **Version** : 0.28.0. * **Project URL:** [https://github.com/census-instrumentation/opencensus-java](https://github.com/census-instrumentation/opencensus-java) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) @@ -2545,48 +3025,56 @@ This report was generated on **Mon Apr 11 14:29:58 EEST 2022** using [Gradle-Lic * **Project URL:** [https://github.com/census-instrumentation/opencensus-java](https://github.com/census-instrumentation/opencensus-java) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : io.perfmark. **Name** : perfmark-api. **Version** : 0.23.0. +1. **Group** : io.perfmark. **Name** : perfmark-api. **Version** : 0.26.0. * **Project URL:** [https://github.com/perfmark/perfmark](https://github.com/perfmark/perfmark) * **License:** [Apache 2.0](https://opensource.org/licenses/Apache-2.0) -1. **Group** : io.spine.validation. **Name** : runtime. **Version** : 2.0.0-SNAPSHOT.12.**No license information found** +1. **Group** : io.spine.protodata. **Name** : protodata-codegen-java. **Version** : 0.9.6.**No license information found** +1. **Group** : io.spine.protodata. **Name** : protodata-fat-cli. **Version** : 0.9.11.**No license information found** +1. **Group** : io.spine.protodata. **Name** : protodata-protoc. **Version** : 0.9.11.**No license information found** +1. **Group** : io.spine.validation. **Name** : spine-validation-configuration. **Version** : 2.0.0-SNAPSHOT.99.**No license information found** +1. **Group** : io.spine.validation. **Name** : spine-validation-context. **Version** : 2.0.0-SNAPSHOT.99.**No license information found** +1. **Group** : io.spine.validation. **Name** : spine-validation-java. **Version** : 2.0.0-SNAPSHOT.99.**No license information found** +1. **Group** : io.spine.validation. **Name** : spine-validation-java-bundle. **Version** : 2.0.0-SNAPSHOT.99.**No license information found** +1. **Group** : io.spine.validation. **Name** : spine-validation-java-runtime. **Version** : 2.0.0-SNAPSHOT.99.**No license information found** +1. **Group** : io.spine.validation. **Name** : spine-validation-model. **Version** : 2.0.0-SNAPSHOT.99.**No license information found** 1. **Group** : javax.annotation. **Name** : javax.annotation-api. **Version** : 1.3.2. * **Project URL:** [http://jcp.org/en/jsr/detail?id=250](http://jcp.org/en/jsr/detail?id=250) * **License:** [CDDL + GPLv2 with classpath exception](https://github.com/javaee/javax.annotation/blob/master/LICENSE) +1. **Group** : javax.inject. **Name** : javax.inject. **Version** : 1. + * **Project URL:** [http://code.google.com/p/atinject/](http://code.google.com/p/atinject/) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + 1. **Group** : junit. **Name** : junit. **Version** : 4.13.1. * **Project URL:** [http://junit.org](http://junit.org) * **License:** [Eclipse Public License 1.0](http://www.eclipse.org/legal/epl-v10.html) -1. **Group** : kr.motd.maven. **Name** : os-maven-plugin. **Version** : 1.7.0. - * **Project URL:** [https://github.com/trustin/os-maven-plugin/](https://github.com/trustin/os-maven-plugin/) - * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) - 1. **Group** : net.java.dev.jna. **Name** : jna. **Version** : 5.6.0. * **Project URL:** [https://github.com/java-native-access/jna](https://github.com/java-native-access/jna) * **License:** [Apache License v2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) * **License:** [LGPL, version 2.1](http://www.gnu.org/licenses/licenses.html) -1. **Group** : net.ltgt.gradle. **Name** : gradle-errorprone-plugin. **Version** : 2.0.2.**No license information found** -1. **Group** : net.sf.saxon. **Name** : Saxon-HE. **Version** : 10.6. +1. **Group** : net.ltgt.gradle. **Name** : gradle-errorprone-plugin. **Version** : 3.1.0.**No license information found** +1. **Group** : net.sf.saxon. **Name** : Saxon-HE. **Version** : 11.4. * **Project URL:** [http://www.saxonica.com/](http://www.saxonica.com/) * **License:** [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/2.0/) -1. **Group** : net.sourceforge.pmd. **Name** : pmd-core. **Version** : 6.44.0. +1. **Group** : net.sourceforge.pmd. **Name** : pmd-core. **Version** : 6.55.0. * **License:** [BSD-style](http://pmd.sourceforge.net/license.html) -1. **Group** : net.sourceforge.pmd. **Name** : pmd-java. **Version** : 6.44.0. +1. **Group** : net.sourceforge.pmd. **Name** : pmd-java. **Version** : 6.55.0. * **License:** [BSD-style](http://pmd.sourceforge.net/license.html) 1. **Group** : net.sourceforge.saxon. **Name** : saxon. **Version** : 9.1.0.8. * **Project URL:** [http://saxon.sourceforge.net/](http://saxon.sourceforge.net/) * **License:** [Mozilla Public License Version 1.0](http://www.mozilla.org/MPL/MPL-1.0.txt) -1. **Group** : org.antlr. **Name** : antlr4-runtime. **Version** : 4.7.2. - * **Project URL:** [http://www.antlr.org](http://www.antlr.org) - * **License:** [The BSD License](http://www.antlr.org/license.html) +1. **Group** : org.antlr. **Name** : antlr4-runtime. **Version** : 4.11.1. + * **Project URL:** [https://www.antlr.org/](https://www.antlr.org/) + * **License:** [BSD-3-Clause](https://www.antlr.org/license.html) -1. **Group** : org.antlr. **Name** : antlr4-runtime. **Version** : 4.9.3. +1. **Group** : org.antlr. **Name** : antlr4-runtime. **Version** : 4.7.2. * **Project URL:** [http://www.antlr.org](http://www.antlr.org) * **License:** [The BSD License](http://www.antlr.org/license.html) @@ -2602,43 +3090,59 @@ This report was generated on **Mon Apr 11 14:29:58 EEST 2022** using [Gradle-Lic * **Project URL:** [http://hc.apache.org/httpcomponents-core-ga](http://hc.apache.org/httpcomponents-core-ga) * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +1. **Group** : org.apache.httpcomponents.client5. **Name** : httpclient5. **Version** : 5.1.3. + * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.apache.httpcomponents.core5. **Name** : httpcore5. **Version** : 5.1.3. + * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.apache.httpcomponents.core5. **Name** : httpcore5-h2. **Version** : 5.1.3. + * **License:** [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + 1. **Group** : org.apiguardian. **Name** : apiguardian-api. **Version** : 1.1.2. * **Project URL:** [https://github.com/apiguardian-team/apiguardian](https://github.com/apiguardian-team/apiguardian) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.checkerframework. **Name** : checker-compat-qual. **Version** : 2.5.5. +1. **Group** : org.checkerframework. **Name** : checker-compat-qual. **Version** : 2.5.3. * **Project URL:** [https://checkerframework.org](https://checkerframework.org) * **License:** [GNU General Public License, version 2 (GPL2), with the classpath exception](http://www.gnu.org/software/classpath/license.html) * **License:** [The MIT License](http://opensource.org/licenses/MIT) -1. **Group** : org.checkerframework. **Name** : checker-qual. **Version** : 3.21.3. - * **Project URL:** [https://checkerframework.org](https://checkerframework.org) +1. **Group** : org.checkerframework. **Name** : checker-qual. **Version** : 3.36.0. + * **Project URL:** [https://checkerframework.org/](https://checkerframework.org/) * **License:** [The MIT License](http://opensource.org/licenses/MIT) -1. **Group** : org.checkerframework. **Name** : dataflow-errorprone. **Version** : 3.15.0. - * **Project URL:** [https://checkerframework.org](https://checkerframework.org) - * **License:** [GNU General Public License, version 2 (GPL2), with the classpath exception](http://www.gnu.org/software/classpath/license.html) - 1. **Group** : org.codehaus.mojo. **Name** : animal-sniffer-annotations. **Version** : 1.21. * **License:** [MIT license](http://www.opensource.org/licenses/mit-license.php) * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.eclipse.jgit. **Name** : org.eclipse.jgit. **Version** : 4.4.1.201607150455-r. - * **License:** Eclipse Distribution License (New BSD License) +1. **Group** : org.codehaus.woodstox. **Name** : stax2-api. **Version** : 4.2.1. + * **Project URL:** [http://github.com/FasterXML/stax2-api](http://github.com/FasterXML/stax2-api) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [The BSD License](http://www.opensource.org/licenses/bsd-license.php) + +1. **Group** : org.freemarker. **Name** : freemarker. **Version** : 2.3.31. + * **Project URL:** [https://freemarker.apache.org/](https://freemarker.apache.org/) + * **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.hamcrest. **Name** : hamcrest. **Version** : 2.2. + * **Project URL:** [http://hamcrest.org/JavaHamcrest/](http://hamcrest.org/JavaHamcrest/) + * **License:** [BSD License 3](http://opensource.org/licenses/BSD-3-Clause) -1. **Group** : org.hamcrest. **Name** : hamcrest-core. **Version** : 1.3. - * **License:** [New BSD License](http://www.opensource.org/licenses/bsd-license.php) +1. **Group** : org.hamcrest. **Name** : hamcrest-core. **Version** : 2.2. + * **Project URL:** [http://hamcrest.org/JavaHamcrest/](http://hamcrest.org/JavaHamcrest/) + * **License:** [BSD License 3](http://opensource.org/licenses/BSD-3-Clause) -1. **Group** : org.jacoco. **Name** : org.jacoco.agent. **Version** : 0.8.7. +1. **Group** : org.jacoco. **Name** : org.jacoco.agent. **Version** : 0.8.8. * **License:** [Eclipse Public License 2.0](https://www.eclipse.org/legal/epl-2.0/) -1. **Group** : org.jacoco. **Name** : org.jacoco.ant. **Version** : 0.8.7. +1. **Group** : org.jacoco. **Name** : org.jacoco.ant. **Version** : 0.8.8. * **License:** [Eclipse Public License 2.0](https://www.eclipse.org/legal/epl-2.0/) -1. **Group** : org.jacoco. **Name** : org.jacoco.core. **Version** : 0.8.7. +1. **Group** : org.jacoco. **Name** : org.jacoco.core. **Version** : 0.8.8. * **License:** [Eclipse Public License 2.0](https://www.eclipse.org/legal/epl-2.0/) -1. **Group** : org.jacoco. **Name** : org.jacoco.report. **Version** : 0.8.7. +1. **Group** : org.jacoco. **Name** : org.jacoco.report. **Version** : 0.8.8. * **License:** [Eclipse Public License 2.0](https://www.eclipse.org/legal/epl-2.0/) 1. **Group** : org.javassist. **Name** : javassist. **Version** : 3.28.0-GA. @@ -2647,119 +3151,183 @@ This report was generated on **Mon Apr 11 14:29:58 EEST 2022** using [Gradle-Lic * **License:** [LGPL 2.1](http://www.gnu.org/licenses/lgpl-2.1.html) * **License:** [MPL 1.1](http://www.mozilla.org/MPL/MPL-1.1.html) -1. **Group** : org.jetbrains. **Name** : annotations. **Version** : 13.0. - * **Project URL:** [http://www.jetbrains.org](http://www.jetbrains.org) +1. **Group** : org.jboss.forge.roaster. **Name** : roaster-api. **Version** : 2.28.0.Final. + * **License:** [Eclipse Public License version 1.0](http://www.eclipse.org/legal/epl-v10.html) + * **License:** [Public Domain](http://repository.jboss.org/licenses/cc0-1.0.txt) + +1. **Group** : org.jboss.forge.roaster. **Name** : roaster-jdt. **Version** : 2.28.0.Final. + * **License:** [Eclipse Public License version 1.0](http://www.eclipse.org/legal/epl-v10.html) + * **License:** [Public Domain](http://repository.jboss.org/licenses/cc0-1.0.txt) + +1. **Group** : org.jetbrains. **Name** : annotations. **Version** : 23.0.0. + * **Project URL:** [https://github.com/JetBrains/java-annotations](https://github.com/JetBrains/java-annotations) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains. **Name** : markdown. **Version** : 0.3.1.**No license information found** +1. **Group** : org.jetbrains. **Name** : markdown-jvm. **Version** : 0.3.1. + * **Project URL:** [https://github.com/JetBrains/markdown](https://github.com/JetBrains/markdown) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.dokka. **Name** : dokka-analysis. **Version** : 1.8.10. + * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.intellij.deps. **Name** : trove4j. **Version** : 1.0.20181211. +1. **Group** : org.jetbrains.dokka. **Name** : dokka-base. **Version** : 1.8.10. + * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.dokka. **Name** : dokka-core. **Version** : 1.8.10. + * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.dokka. **Name** : javadoc-plugin. **Version** : 1.8.10. + * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.dokka. **Name** : kotlin-analysis-compiler. **Version** : 1.8.10. + * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.dokka. **Name** : kotlin-analysis-intellij. **Version** : 1.8.10. + * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.dokka. **Name** : kotlin-as-java-plugin. **Version** : 1.8.10. + * **Project URL:** [https://github.com/Kotlin/dokka](https://github.com/Kotlin/dokka) + * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.intellij.deps. **Name** : trove4j. **Version** : 1.0.20200330. * **Project URL:** [https://github.com/JetBrains/intellij-deps-trove4j](https://github.com/JetBrains/intellij-deps-trove4j) * **License:** [GNU LESSER GENERAL PUBLIC LICENSE 2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-compiler-embeddable. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-compiler-embeddable. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-daemon-embeddable. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-daemon-embeddable. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-klib-commonizer-embeddable. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-klib-commonizer-embeddable. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-reflect. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-reflect. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-script-runtime. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-script-runtime. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-common. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-common. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-compiler-embeddable. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-compiler-embeddable. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-compiler-impl-embeddable. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-compiler-impl-embeddable. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-jvm. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-scripting-jvm. **Version** : 1.8.22. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-common. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-common. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk7. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk7. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk8. **Version** : 1.6.10. +1. **Group** : org.jetbrains.kotlin. **Name** : kotlin-stdlib-jdk8. **Version** : 1.9.0. * **Project URL:** [https://kotlinlang.org/](https://kotlinlang.org/) * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.junit. **Name** : junit-bom. **Version** : 5.8.2.**No license information found** -1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-api. **Version** : 5.8.2. +1. **Group** : org.jetbrains.kotlinx. **Name** : atomicfu. **Version** : 0.20.2. + * **Project URL:** [https://github.com/Kotlin/kotlinx.atomicfu](https://github.com/Kotlin/kotlinx.atomicfu) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-bom. **Version** : 1.6.3.**No license information found** +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-bom. **Version** : 1.7.0.**No license information found** +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-core. **Version** : 1.6.3.**No license information found** +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-core. **Version** : 1.7.0.**No license information found** +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-core-jvm. **Version** : 1.6.3. + * **Project URL:** [https://github.com/Kotlin/kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-core-jvm. **Version** : 1.7.0. + * **Project URL:** [https://github.com/Kotlin/kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-coroutines-jdk8. **Version** : 1.7.0. + * **Project URL:** [https://github.com/Kotlin/kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines) + * **License:** [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jetbrains.kotlinx. **Name** : kotlinx-html-jvm. **Version** : 0.7.5. + * **Project URL:** [https://github.com/Kotlin/kotlinx.html](https://github.com/Kotlin/kotlinx.html) + * **License:** [The Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) + +1. **Group** : org.jsoup. **Name** : jsoup. **Version** : 1.15.3. + * **Project URL:** [https://jsoup.org/](https://jsoup.org/) + * **License:** [The MIT License](https://jsoup.org/license) + +1. **Group** : org.junit. **Name** : junit-bom. **Version** : 5.10.0.**No license information found** +1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-api. **Version** : 5.10.0. * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-engine. **Version** : 5.8.2. +1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-engine. **Version** : 5.10.0. * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-params. **Version** : 5.8.2. +1. **Group** : org.junit.jupiter. **Name** : junit-jupiter-params. **Version** : 5.10.0. * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.platform. **Name** : junit-platform-commons. **Version** : 1.8.2. +1. **Group** : org.junit.platform. **Name** : junit-platform-commons. **Version** : 1.10.0. * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.junit.platform. **Name** : junit-platform-engine. **Version** : 1.8.2. +1. **Group** : org.junit.platform. **Name** : junit-platform-engine. **Version** : 1.10.0. * **Project URL:** [https://junit.org/junit5/](https://junit.org/junit5/) * **License:** [Eclipse Public License v2.0](https://www.eclipse.org/legal/epl-v20.html) -1. **Group** : org.opentest4j. **Name** : opentest4j. **Version** : 1.2.0. +1. **Group** : org.opentest4j. **Name** : opentest4j. **Version** : 1.3.0. * **Project URL:** [https://github.com/ota4j-team/opentest4j](https://github.com/ota4j-team/opentest4j) - * **License:** [The Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) - -1. **Group** : org.ow2.asm. **Name** : asm. **Version** : 9.1. - * **Project URL:** [http://asm.ow2.io/](http://asm.ow2.io/) - * **License:** [BSD-3-Clause](https://asm.ow2.io/license.html) - * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) + * **License:** [The Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) 1. **Group** : org.ow2.asm. **Name** : asm. **Version** : 9.2. * **Project URL:** [http://asm.ow2.io/](http://asm.ow2.io/) * **License:** [BSD-3-Clause](https://asm.ow2.io/license.html) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.ow2.asm. **Name** : asm-analysis. **Version** : 9.1. +1. **Group** : org.ow2.asm. **Name** : asm-analysis. **Version** : 9.2. * **Project URL:** [http://asm.ow2.io/](http://asm.ow2.io/) * **License:** [BSD-3-Clause](https://asm.ow2.io/license.html) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.ow2.asm. **Name** : asm-commons. **Version** : 9.1. +1. **Group** : org.ow2.asm. **Name** : asm-commons. **Version** : 9.2. * **Project URL:** [http://asm.ow2.io/](http://asm.ow2.io/) * **License:** [BSD-3-Clause](https://asm.ow2.io/license.html) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.ow2.asm. **Name** : asm-tree. **Version** : 9.1. +1. **Group** : org.ow2.asm. **Name** : asm-tree. **Version** : 9.2. * **Project URL:** [http://asm.ow2.io/](http://asm.ow2.io/) * **License:** [BSD-3-Clause](https://asm.ow2.io/license.html) * **License:** [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) -1. **Group** : org.pcollections. **Name** : pcollections. **Version** : 2.1.2. - * **Project URL:** [http://pcollections.org](http://pcollections.org) - * **License:** [The MIT License](http://www.opensource.org/licenses/mit-license.php) +1. **Group** : org.pcollections. **Name** : pcollections. **Version** : 3.1.4. + * **Project URL:** [https://github.com/hrldcpr/pcollections](https://github.com/hrldcpr/pcollections) + * **License:** [The MIT License](https://opensource.org/licenses/mit-license.php) 1. **Group** : org.reflections. **Name** : reflections. **Version** : 0.10.2. * **Project URL:** [http://github.com/ronmamo/reflections](http://github.com/ronmamo/reflections) @@ -2770,7 +3338,11 @@ This report was generated on **Mon Apr 11 14:29:58 EEST 2022** using [Gradle-Lic * **Project URL:** [https://www.threeten.org/threetenbp](https://www.threeten.org/threetenbp) * **License:** [BSD 3-clause](https://raw.githubusercontent.com/ThreeTen/threetenbp/master/LICENSE.txt) +1. **Group** : org.xmlresolver. **Name** : xmlresolver. **Version** : 4.4.3. + * **Project URL:** [https://github.com/xmlresolver/xmlresolver](https://github.com/xmlresolver/xmlresolver) + * **License:** [Apache License version 2.0](https://www.apache.org/licenses/LICENSE-2.0) + The dependencies distributed under several licenses, are used according their commercial-use-friendly license. -This report was generated on **Mon Apr 11 14:29:58 EEST 2022** 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). \ No newline at end of file +This report was generated on **Thu Aug 24 11:27:09 WEST 2023** 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). \ No newline at end of file diff --git a/pom.xml b/pom.xml index 50d5deae..d943f8c6 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ all modules and does not describe the project structure per-subproject. --> io.spine.gcloud spine-gcloud-java -2.0.0-SNAPSHOT.94 +2.0.0-SNAPSHOT.155 2015 @@ -44,25 +44,37 @@ all modules and does not describe the project structure per-subproject. io.spine spine-base - 2.0.0-SNAPSHOT.88 + 2.0.0-SNAPSHOT.187 compile io.spine spine-base-types - 2.0.0-SNAPSHOT.88 + 2.0.0-SNAPSHOT.124 + compile + + + io.spine + spine-logging + 2.0.0-SNAPSHOT.206 compile io.spine spine-server - 2.0.0-SNAPSHOT.94 + 2.0.0-SNAPSHOT.155 + compile + + + io.spine.validation + spine-validation-java-runtime + 2.0.0-SNAPSHOT.99 compile org.jetbrains.kotlin kotlin-stdlib-jdk8 - 1.6.10 + 1.8.22 compile @@ -74,81 +86,162 @@ all modules and does not describe the project structure per-subproject. io.grpc grpc-auth - 1.45.0 + 1.57.0 + test + + + io.spine.tools + spine-testlib + 2.0.0-SNAPSHOT.184 test io.spine.tools spine-testutil-server - 2.0.0-SNAPSHOT.94 + 2.0.0-SNAPSHOT.155 test org.junit.jupiter junit-jupiter-engine - 5.8.2 + 5.10.0 test com.google.errorprone error_prone_core - 2.10.0 + 2.20.0 + + + com.google.errorprone + javac + 9+181-r4173-1 com.google.protobuf protoc - 3.18.0 + 3.23.4 com.puppycrawl.tools checkstyle - 10.1 + 10.3.4 io.grpc protoc-gen-grpc-java - 1.38.0 + 1.56.1 + + + io.spine.protodata + protodata-fat-cli + 0.9.11 + + + io.spine.protodata + protodata-protoc + 0.9.11 + + + io.spine.tools + spine-dokka-extensions + 2.0.0-SNAPSHOT.4 + + + io.spine.tools + spine-mc-java-annotation + 2.0.0-SNAPSHOT.168 + + + io.spine.tools + spine-mc-java-base + 2.0.0-SNAPSHOT.168 io.spine.tools spine-mc-java-checks - 2.0.0-SNAPSHOT.83 + 2.0.0-SNAPSHOT.168 provided io.spine.tools - spine-mc-java-protoc - 2.0.0-SNAPSHOT.83 + spine-mc-java-plugins + 2.0.0-SNAPSHOT.168 + + + io.spine.tools + spine-mc-java-rejection + 2.0.0-SNAPSHOT.168 + + + io.spine.tools + spine-tool-base + 2.0.0-SNAPSHOT.182 + + + io.spine.validation + spine-validation-java + 2.0.0-SNAPSHOT.99 + + + io.spine.validation + spine-validation-java-bundle + 2.0.0-SNAPSHOT.99 net.sourceforge.pmd pmd-java - 6.44.0 + 6.55.0 org.jacoco org.jacoco.agent - 0.8.7 + 0.8.8 org.jacoco org.jacoco.ant - 0.8.7 + 0.8.8 + + + org.jetbrains.dokka + dokka-analysis + 1.8.10 + + + org.jetbrains.dokka + dokka-base + 1.8.10 + + + org.jetbrains.dokka + dokka-core + 1.8.10 + + + org.jetbrains.dokka + javadoc-plugin + 1.8.10 + + + org.jetbrains.dokka + kotlin-as-java-plugin + 1.8.10 org.jetbrains.kotlin kotlin-compiler-embeddable - 1.6.10 + 1.8.22 org.jetbrains.kotlin kotlin-klib-commonizer-embeddable - 1.6.10 + 1.8.22 org.jetbrains.kotlin kotlin-scripting-compiler-embeddable - 1.6.10 + 1.8.22 diff --git a/pubsub/build.gradle.kts b/pubsub/build.gradle.kts index e5fcbb3e..09e29653 100644 --- a/pubsub/build.gradle.kts +++ b/pubsub/build.gradle.kts @@ -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. diff --git a/pubsub/src/main/proto/spine/messaging/pubsub/push.proto b/pubsub/src/main/proto/spine/messaging/pubsub/push.proto index f33182c3..9cc75245 100644 --- a/pubsub/src/main/proto/spine/messaging/pubsub/push.proto +++ b/pubsub/src/main/proto/spine/messaging/pubsub/push.proto @@ -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. diff --git a/scripts/create-indexes.sh b/scripts/create-indexes.sh index a47e332d..66f184cf 100755 --- a/scripts/create-indexes.sh +++ b/scripts/create-indexes.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # -# 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. diff --git a/scripts/fetch-test-report.sh b/scripts/fetch-test-report.sh index 848336ab..fd75514f 100755 --- a/scripts/fetch-test-report.sh +++ b/scripts/fetch-test-report.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # -# 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. diff --git a/scripts/install-gcloud.sh b/scripts/install-gcloud.sh index 6ffb50c8..cca3ab8b 100644 --- a/scripts/install-gcloud.sh +++ b/scripts/install-gcloud.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # -# 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. diff --git a/scripts/start-datastore.bat b/scripts/start-datastore.bat index 0483d8d5..7ee72290 100644 --- a/scripts/start-datastore.bat +++ b/scripts/start-datastore.bat @@ -1,5 +1,5 @@ @REM -@REM Copyright 2022, TeamDev. All rights reserved. +@REM Copyright 2023, TeamDev. All rights reserved. @REM @REM Licensed under the Apache License, Version 2.0 (the "License"); @REM you may not use this file except in compliance with the License. diff --git a/scripts/start-datastore.sh b/scripts/start-datastore.sh index 55e99435..bef2c253 100755 --- a/scripts/start-datastore.sh +++ b/scripts/start-datastore.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # -# 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. diff --git a/scripts/upload-artifacts.sh b/scripts/upload-artifacts.sh index 6dc6ba2e..77d4f2b1 100644 --- a/scripts/upload-artifacts.sh +++ b/scripts/upload-artifacts.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # -# 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. diff --git a/settings.gradle.kts b/settings.gradle.kts index a2f6d673..23dc734b 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -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. diff --git a/stackdriver-trace/build.gradle.kts b/stackdriver-trace/build.gradle.kts index 4dbff517..fe313c4a 100644 --- a/stackdriver-trace/build.gradle.kts +++ b/stackdriver-trace/build.gradle.kts @@ -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. diff --git a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/AsyncTraceService.java b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/AsyncTraceService.java index 6af55869..4f875157 100644 --- a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/AsyncTraceService.java +++ b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/AsyncTraceService.java @@ -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. @@ -28,17 +28,18 @@ import com.google.cloud.trace.v2.stub.GrpcTraceServiceStub; import com.google.devtools.cloudtrace.v2.BatchWriteSpansRequest; -import io.spine.logging.Logging; +import io.spine.logging.WithLogging; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.util.concurrent.MoreExecutors.directExecutor; +import static java.lang.String.format; /** * An async implementation of the {@link TraceService}. * *

Logs when the request is executed successfully. */ -final class AsyncTraceService implements TraceService, Logging { +final class AsyncTraceService implements TraceService, WithLogging { private final GrpcTraceServiceStub client; @@ -49,9 +50,13 @@ final class AsyncTraceService implements TraceService, Logging { @Override public void writeSpans(BatchWriteSpansRequest request) { client.batchWriteSpansCallable() - .futureCall(request) - .addListener(() -> _debug().log("Submitted %d spans.", request.getSpansCount()), - directExecutor()); + .futureCall(request) + .addListener(() -> logSpans(request), directExecutor()); + } + + private void logSpans(BatchWriteSpansRequest request) { + logger().atDebug() + .log(() -> format("Submitted %d spans.", request.getSpansCount())); } @Override diff --git a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/ProjectId.java b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/ProjectId.java index d38a2d37..46604c99 100644 --- a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/ProjectId.java +++ b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/ProjectId.java @@ -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. diff --git a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/ProjectName.java b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/ProjectName.java index 6b358bea..b79d06a6 100644 --- a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/ProjectName.java +++ b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/ProjectName.java @@ -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. diff --git a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/ShortTraceApiString.java b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/ShortTraceApiString.java index e9d3c0d4..5b36e99f 100644 --- a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/ShortTraceApiString.java +++ b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/ShortTraceApiString.java @@ -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. diff --git a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/SignalSpan.java b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/SignalSpan.java index a17046ed..96abae19 100644 --- a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/SignalSpan.java +++ b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/SignalSpan.java @@ -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. diff --git a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/SpanAttribute.java b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/SpanAttribute.java index c5120b7b..29f4ad80 100644 --- a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/SpanAttribute.java +++ b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/SpanAttribute.java @@ -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. @@ -27,8 +27,8 @@ package io.spine.server.trace.stackdriver; import com.google.devtools.cloudtrace.v2.AttributeValue; -import io.spine.json.Json; import io.spine.string.Stringifiers; +import io.spine.type.Json; import static io.spine.protobuf.AnyPacker.unpack; diff --git a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/SpanId.java b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/SpanId.java index 6dd146a5..b6940a2c 100644 --- a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/SpanId.java +++ b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/SpanId.java @@ -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. diff --git a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/SpanName.java b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/SpanName.java index a621e380..720a1ce8 100644 --- a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/SpanName.java +++ b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/SpanName.java @@ -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. diff --git a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/StackdriverTracer.java b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/StackdriverTracer.java index eff1cc8f..896910e6 100644 --- a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/StackdriverTracer.java +++ b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/StackdriverTracer.java @@ -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. diff --git a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/StackdriverTracerFactory.java b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/StackdriverTracerFactory.java index a54d50f3..9c1f1fbb 100644 --- a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/StackdriverTracerFactory.java +++ b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/StackdriverTracerFactory.java @@ -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. diff --git a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/SyncTraceService.java b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/SyncTraceService.java index 80efae67..cfd0c2e2 100644 --- a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/SyncTraceService.java +++ b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/SyncTraceService.java @@ -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. diff --git a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/TraceApiString.java b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/TraceApiString.java index 0ddefeb2..bd86dc41 100644 --- a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/TraceApiString.java +++ b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/TraceApiString.java @@ -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. diff --git a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/TraceId.java b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/TraceId.java index 5889ffe9..212b79d8 100644 --- a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/TraceId.java +++ b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/TraceId.java @@ -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. diff --git a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/TraceService.java b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/TraceService.java index fb818487..f383b511 100644 --- a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/TraceService.java +++ b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/TraceService.java @@ -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. diff --git a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/Truncate.java b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/Truncate.java index 02fd13f7..884b1fde 100644 --- a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/Truncate.java +++ b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/Truncate.java @@ -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. diff --git a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/package-info.java b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/package-info.java index 585041ff..3706a4cf 100644 --- a/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/package-info.java +++ b/stackdriver-trace/src/main/java/io/spine/server/trace/stackdriver/package-info.java @@ -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. diff --git a/stackdriver-trace/src/test/java/io/spine/server/trace/stackdriver/SignalSpanTest.java b/stackdriver-trace/src/test/java/io/spine/server/trace/stackdriver/SignalSpanTest.java index 821686d1..e067a289 100644 --- a/stackdriver-trace/src/test/java/io/spine/server/trace/stackdriver/SignalSpanTest.java +++ b/stackdriver-trace/src/test/java/io/spine/server/trace/stackdriver/SignalSpanTest.java @@ -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. diff --git a/stackdriver-trace/src/test/java/io/spine/server/trace/stackdriver/StackdriverTracerFactoryTest.java b/stackdriver-trace/src/test/java/io/spine/server/trace/stackdriver/StackdriverTracerFactoryTest.java index 286bc31e..c354f5d7 100644 --- a/stackdriver-trace/src/test/java/io/spine/server/trace/stackdriver/StackdriverTracerFactoryTest.java +++ b/stackdriver-trace/src/test/java/io/spine/server/trace/stackdriver/StackdriverTracerFactoryTest.java @@ -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. @@ -239,7 +239,7 @@ void nonEmpty() throws Exception { var command = CreateProject.newBuilder() .setUuid(newUuid()) .setName("TestProject") - .vBuild(); + .build(); var cmd = requests.command() .create(command); var tracer = tracerFactory.trace(SPEC, cmd); @@ -247,10 +247,10 @@ void nonEmpty() throws Exception { .setId(Identifier.pack("SampleEntityId")) .setTypeUrl(TypeUrl.of(Empty.class).value()) .setVersion(zero()) - .vBuild(); + .build(); var entityType = EntityTypeName.newBuilder() .setJavaClassName(StackdriverTracerFactoryTest.class.getCanonicalName()) - .vBuild(); + .build(); tracer.processedBy(receiverId, entityType); tracer.close(); tracerFactory.close(); diff --git a/stackdriver-trace/src/test/java/io/spine/server/trace/stackdriver/given/CountingInterceptor.java b/stackdriver-trace/src/test/java/io/spine/server/trace/stackdriver/given/CountingInterceptor.java index fdcc65b0..cb17db13 100644 --- a/stackdriver-trace/src/test/java/io/spine/server/trace/stackdriver/given/CountingInterceptor.java +++ b/stackdriver-trace/src/test/java/io/spine/server/trace/stackdriver/given/CountingInterceptor.java @@ -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. diff --git a/stackdriver-trace/src/test/java/io/spine/server/trace/stackdriver/given/package-info.java b/stackdriver-trace/src/test/java/io/spine/server/trace/stackdriver/given/package-info.java index 4ce75cd8..58a24890 100644 --- a/stackdriver-trace/src/test/java/io/spine/server/trace/stackdriver/given/package-info.java +++ b/stackdriver-trace/src/test/java/io/spine/server/trace/stackdriver/given/package-info.java @@ -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. diff --git a/stackdriver-trace/src/test/proto/spine/test/stackdriver/commands.proto b/stackdriver-trace/src/test/proto/spine/test/stackdriver/commands.proto index 61a8d5a4..82c90d7d 100644 --- a/stackdriver-trace/src/test/proto/spine/test/stackdriver/commands.proto +++ b/stackdriver-trace/src/test/proto/spine/test/stackdriver/commands.proto @@ -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. diff --git a/testutil-gcloud/build.gradle.kts b/testutil-gcloud/build.gradle.kts index db2f331f..2136ada3 100644 --- a/testutil-gcloud/build.gradle.kts +++ b/testutil-gcloud/build.gradle.kts @@ -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. diff --git a/testutil-gcloud/src/main/java/io/spine/testing/server/storage/datastore/SpyStorageFactory.java b/testutil-gcloud/src/main/java/io/spine/testing/server/storage/datastore/SpyStorageFactory.java index 0101c0dc..5d731afd 100644 --- a/testutil-gcloud/src/main/java/io/spine/testing/server/storage/datastore/SpyStorageFactory.java +++ b/testutil-gcloud/src/main/java/io/spine/testing/server/storage/datastore/SpyStorageFactory.java @@ -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. diff --git a/testutil-gcloud/src/main/java/io/spine/testing/server/storage/datastore/TestDatastoreStorageFactory.java b/testutil-gcloud/src/main/java/io/spine/testing/server/storage/datastore/TestDatastoreStorageFactory.java index b00a760c..289f7140 100644 --- a/testutil-gcloud/src/main/java/io/spine/testing/server/storage/datastore/TestDatastoreStorageFactory.java +++ b/testutil-gcloud/src/main/java/io/spine/testing/server/storage/datastore/TestDatastoreStorageFactory.java @@ -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. @@ -28,7 +28,6 @@ import com.google.cloud.datastore.Datastore; import com.google.common.collect.ImmutableSet; -import com.google.common.flogger.FluentLogger; import io.spine.annotation.Internal; import io.spine.server.storage.datastore.DatastoreStorageFactory; import io.spine.server.storage.datastore.DatastoreWrapper; @@ -37,6 +36,7 @@ import java.util.HashSet; import static com.google.common.base.Preconditions.checkNotNull; +import static java.lang.String.format; /** * A test implementation of the {@link DatastoreStorageFactory}. @@ -46,8 +46,6 @@ */ public class TestDatastoreStorageFactory extends DatastoreStorageFactory { - private static final FluentLogger logger = FluentLogger.forEnclosingClass(); - private final Collection allCreatedWrappers = new HashSet<>(); protected TestDatastoreStorageFactory(Datastore datastore) { @@ -131,9 +129,9 @@ public void clear() { try { datastore.dropAllTables(); } catch (Throwable e) { - logger.atSevere() - .withCause(e) - .log("Unable to drop tables in Datastore `%s`.", datastore); + logger().atError() + .withCause(e) + .log(() -> format("Unable to drop tables in Datastore `%s`.", datastore)); throw new IllegalStateException(e); } } diff --git a/testutil-gcloud/src/main/java/io/spine/testing/server/storage/datastore/TestDatastoreWrapper.java b/testutil-gcloud/src/main/java/io/spine/testing/server/storage/datastore/TestDatastoreWrapper.java index bf7ae1f0..c658a011 100644 --- a/testutil-gcloud/src/main/java/io/spine/testing/server/storage/datastore/TestDatastoreWrapper.java +++ b/testutil-gcloud/src/main/java/io/spine/testing/server/storage/datastore/TestDatastoreWrapper.java @@ -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. @@ -163,10 +163,12 @@ private void dropTableConsistently(Kind table) { private void waitForConsistency() { if (!waitForConsistency) { - _debug().log("Wait for consistency is not required."); + logger().atDebug() + .log(() -> "Waiting for consistency is not required."); return; } - _debug().log("Waiting for data consistency to establish."); + logger().atDebug() + .log(() -> "Waiting for data consistency to establish."); doWaitForConsistency(); } @@ -182,7 +184,8 @@ protected void doWaitForConsistency() { * Deletes all records from the datastore. */ public void dropAllTables() { - _debug().log("Dropping all tables..."); + logger().atDebug() + .log(() -> "Dropping all tables..."); for (var kind : kindsCache) { dropTable(kind); } diff --git a/testutil-gcloud/src/main/java/io/spine/testing/server/storage/datastore/TestDatastores.java b/testutil-gcloud/src/main/java/io/spine/testing/server/storage/datastore/TestDatastores.java index 1761cafc..c7d2b112 100644 --- a/testutil-gcloud/src/main/java/io/spine/testing/server/storage/datastore/TestDatastores.java +++ b/testutil-gcloud/src/main/java/io/spine/testing/server/storage/datastore/TestDatastores.java @@ -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. @@ -32,7 +32,7 @@ import com.google.cloud.datastore.DatastoreOptions; import com.google.common.annotations.VisibleForTesting; import io.spine.io.Resource; -import io.spine.logging.Logging; +import io.spine.logging.WithLogging; import io.spine.server.storage.datastore.ProjectId; import java.io.IOException; @@ -46,7 +46,7 @@ /** * A factory of test {@link Datastore} instances. */ -public final class TestDatastores implements Logging { +public final class TestDatastores implements WithLogging { /** * The default port to which the local Datastore emulator is bound. diff --git a/testutil-gcloud/src/main/java/io/spine/testing/server/storage/datastore/package-info.java b/testutil-gcloud/src/main/java/io/spine/testing/server/storage/datastore/package-info.java index 6ea2adef..70828145 100644 --- a/testutil-gcloud/src/main/java/io/spine/testing/server/storage/datastore/package-info.java +++ b/testutil-gcloud/src/main/java/io/spine/testing/server/storage/datastore/package-info.java @@ -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. diff --git a/testutil-gcloud/src/test/java/io/spine/testing/server/storage/datastore/SpyStorageFactoryTest.java b/testutil-gcloud/src/test/java/io/spine/testing/server/storage/datastore/SpyStorageFactoryTest.java index cc6db179..a6ee7776 100644 --- a/testutil-gcloud/src/test/java/io/spine/testing/server/storage/datastore/SpyStorageFactoryTest.java +++ b/testutil-gcloud/src/test/java/io/spine/testing/server/storage/datastore/SpyStorageFactoryTest.java @@ -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. diff --git a/testutil-gcloud/src/test/java/io/spine/testing/server/storage/datastore/TestDatastoreStorageFactoryTest.java b/testutil-gcloud/src/test/java/io/spine/testing/server/storage/datastore/TestDatastoreStorageFactoryTest.java index 710259fc..42081171 100644 --- a/testutil-gcloud/src/test/java/io/spine/testing/server/storage/datastore/TestDatastoreStorageFactoryTest.java +++ b/testutil-gcloud/src/test/java/io/spine/testing/server/storage/datastore/TestDatastoreStorageFactoryTest.java @@ -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. diff --git a/testutil-gcloud/src/test/java/io/spine/testing/server/storage/datastore/TestDatastoreWrapperTest.java b/testutil-gcloud/src/test/java/io/spine/testing/server/storage/datastore/TestDatastoreWrapperTest.java index ee875218..530e4050 100644 --- a/testutil-gcloud/src/test/java/io/spine/testing/server/storage/datastore/TestDatastoreWrapperTest.java +++ b/testutil-gcloud/src/test/java/io/spine/testing/server/storage/datastore/TestDatastoreWrapperTest.java @@ -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. diff --git a/testutil-gcloud/src/test/java/io/spine/testing/server/storage/datastore/TestDatastoresTest.java b/testutil-gcloud/src/test/java/io/spine/testing/server/storage/datastore/TestDatastoresTest.java index 78403050..a1fbe44b 100644 --- a/testutil-gcloud/src/test/java/io/spine/testing/server/storage/datastore/TestDatastoresTest.java +++ b/testutil-gcloud/src/test/java/io/spine/testing/server/storage/datastore/TestDatastoresTest.java @@ -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. diff --git a/testutil-gcloud/src/test/java/io/spine/testing/server/storage/datastore/given/ATestDatastoreWrapper.java b/testutil-gcloud/src/test/java/io/spine/testing/server/storage/datastore/given/ATestDatastoreWrapper.java index 51727d95..17b4d7d7 100644 --- a/testutil-gcloud/src/test/java/io/spine/testing/server/storage/datastore/given/ATestDatastoreWrapper.java +++ b/testutil-gcloud/src/test/java/io/spine/testing/server/storage/datastore/given/ATestDatastoreWrapper.java @@ -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. diff --git a/testutil-gcloud/src/test/java/io/spine/testing/server/storage/datastore/given/AnEntity.java b/testutil-gcloud/src/test/java/io/spine/testing/server/storage/datastore/given/AnEntity.java index 470c8db8..aa8308a9 100644 --- a/testutil-gcloud/src/test/java/io/spine/testing/server/storage/datastore/given/AnEntity.java +++ b/testutil-gcloud/src/test/java/io/spine/testing/server/storage/datastore/given/AnEntity.java @@ -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. diff --git a/testutil-gcloud/src/test/java/io/spine/testing/server/storage/datastore/given/package-info.java b/testutil-gcloud/src/test/java/io/spine/testing/server/storage/datastore/given/package-info.java index 4ab02c9e..452653de 100644 --- a/testutil-gcloud/src/test/java/io/spine/testing/server/storage/datastore/given/package-info.java +++ b/testutil-gcloud/src/test/java/io/spine/testing/server/storage/datastore/given/package-info.java @@ -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. diff --git a/version.gradle.kts b/version.gradle.kts index c69419a7..249031a2 100644 --- a/version.gradle.kts +++ b/version.gradle.kts @@ -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. @@ -24,9 +24,4 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -val spineBaseVersion: String by extra("2.0.0-SNAPSHOT.88") -val spineBaseTypesVersion: String by extra("2.0.0-SNAPSHOT.88") -val spineCoreVersion: String by extra("2.0.0-SNAPSHOT.94") -val mcJavaVersion: String by extra("2.0.0-SNAPSHOT.83") - -val versionToPublish: String by extra("2.0.0-SNAPSHOT.94") +val versionToPublish: String by extra("2.0.0-SNAPSHOT.155")