Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better versions #21

Merged
merged 100 commits into from
May 7, 2022
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
0f590cd
Bump Gradle -> 7.4
alexander-yevsyukov Feb 22, 2022
a3ff20b
Update config
alexander-yevsyukov Feb 22, 2022
04bbed2
Update config
alexander-yevsyukov Feb 22, 2022
d93696b
Bump version -> `2.0.0-SNAPSHOT.91`
alexander-yevsyukov Feb 22, 2022
74e167c
Introduce `MavenArtifact` dependency
alexander-yevsyukov Feb 23, 2022
1f45c9c
Introduce `KManifest`
alexander-yevsyukov Feb 23, 2022
44f4ac9
Add symver dependency
alexander-yevsyukov Feb 23, 2022
49a051f
Update config
alexander-yevsyukov Apr 16, 2022
9804da1
Merge remote-tracking branch 'origin/master' into better-versions
alexander-yevsyukov Apr 16, 2022
1cc5447
Bump version in tests
alexander-yevsyukov Apr 16, 2022
d0809f2
Update config
alexander-yevsyukov Apr 16, 2022
81e1f5a
Update version numbers
alexander-yevsyukov Apr 16, 2022
b462244
Add missing EOF
alexander-yevsyukov Apr 16, 2022
01b2ea4
Add customization of manifests
alexander-yevsyukov Apr 16, 2022
ebb395e
Update build time
alexander-yevsyukov Apr 16, 2022
e0fda9e
Remove unused scripts
alexander-yevsyukov Apr 16, 2022
911df41
Bump dependencies
alexander-yevsyukov Apr 16, 2022
5dee374
Expose Maven artifact properties
alexander-yevsyukov Apr 16, 2022
ceb7a93
Update config
alexander-yevsyukov Apr 17, 2022
43db722
Improve diag. message
alexander-yevsyukov Apr 17, 2022
c62e023
Test string form
alexander-yevsyukov Apr 18, 2022
b243e54
Add parsing of dependencies
alexander-yevsyukov Apr 18, 2022
9af4641
Update build time
alexander-yevsyukov Apr 18, 2022
dfcbd22
Allow writing into existing manifest
alexander-yevsyukov Apr 18, 2022
10e0a66
Add Ivy dependency impl.
alexander-yevsyukov Apr 19, 2022
a2c6167
Extract constant
alexander-yevsyukov Apr 19, 2022
b10ef92
Document string form
alexander-yevsyukov Apr 19, 2022
96f4718
Add constructor with parts
alexander-yevsyukov Apr 20, 2022
49d7236
Update config
alexander-yevsyukov Apr 20, 2022
c7705ee
Update config
alexander-yevsyukov Apr 20, 2022
263a4c1
Parse dependencies with escaped quotes
alexander-yevsyukov Apr 20, 2022
4f5dacf
Improve names
alexander-yevsyukov Apr 20, 2022
0648fc5
Try splitting regexp to prevent detekt failure
alexander-yevsyukov Apr 20, 2022
1bbdf8d
Temporarily comment out suspected regexp
alexander-yevsyukov Apr 20, 2022
f170cf6
Return regexp back
alexander-yevsyukov Apr 20, 2022
db5b6f7
Bump detekt -> 1.20.0
alexander-yevsyukov Apr 20, 2022
03c4c79
Rollback detekt version
alexander-yevsyukov Apr 20, 2022
93168aa
Apply newer detekt workflow
alexander-yevsyukov Apr 20, 2022
a624620
Apply detekt workflow once more
alexander-yevsyukov Apr 20, 2022
43594f9
Try detekt 1.20 once again
alexander-yevsyukov Apr 20, 2022
2694b84
Temporarily comment out commit check
alexander-yevsyukov Apr 20, 2022
8fb1bf5
Restore commented block
alexander-yevsyukov Apr 20, 2022
b2e5957
Comment SHA check again
alexander-yevsyukov Apr 20, 2022
3b88e1a
Copy workflow from ProtoData
alexander-yevsyukov Apr 20, 2022
72644aa
Update detekt workflow
alexander-yevsyukov Apr 20, 2022
63ba1d3
Remove SHA check
alexander-yevsyukov Apr 20, 2022
e1fefb1
Bump detekt
alexander-yevsyukov Apr 20, 2022
8efb2f8
Echo download URL
alexander-yevsyukov Apr 20, 2022
4d434ad
Try older script with the newest version tag
alexander-yevsyukov Apr 21, 2022
14b40c0
Rollback workflow to initial state
alexander-yevsyukov Apr 21, 2022
8de04b0
Bump `upload-sarif`
alexander-yevsyukov Apr 21, 2022
6a6229d
Bump detekt -> v1.20.0
alexander-yevsyukov Apr 21, 2022
7367beb
Bump detekt -> v1.19.0
alexander-yevsyukov Apr 21, 2022
6db91d6
Bump detekt -> v1.15.0
alexander-yevsyukov Apr 21, 2022
8955207
Bump detekt -> v1.16.0
alexander-yevsyukov Apr 21, 2022
c5ffda0
Remove workflow (see #22)
alexander-yevsyukov Apr 21, 2022
7827047
Fix data class decl.
alexander-yevsyukov Apr 21, 2022
3d6abf5
Update config
alexander-yevsyukov Apr 26, 2022
cc8c285
Bump `base` -> `2.0.0-SNAPSHOT.90`
alexander-yevsyukov Apr 26, 2022
ad7ba87
Remove `pmd` plugin from the root script
alexander-yevsyukov Apr 26, 2022
66dd957
Update config
alexander-yevsyukov Apr 26, 2022
aefda95
Add more `implementation-` attributes
alexander-yevsyukov Apr 26, 2022
bbf15a4
Remove `pmd` plugin from the root project
alexander-yevsyukov Apr 28, 2022
8574739
Merge remote-tracking branch 'origin/master' into better-versions
alexander-yevsyukov Apr 28, 2022
d59fb6c
Bump version -> `2.0.0-SNAPSHOT.93`
alexander-yevsyukov Apr 28, 2022
3840422
Bump versions
alexander-yevsyukov Apr 28, 2022
d22f8f8
Add `toString()`
alexander-yevsyukov Apr 29, 2022
949cdef
Load a version from a manifest
alexander-yevsyukov Apr 29, 2022
aff17fb
Simplify treating absent version
alexander-yevsyukov Apr 29, 2022
0d3697f
Write manifest files on build
alexander-yevsyukov Apr 30, 2022
baf0cbd
Load a manifest by a class
alexander-yevsyukov Apr 30, 2022
1faaed3
Remove `semver` dependency
alexander-yevsyukov Apr 30, 2022
76932da
Remove `semver` dependency
alexander-yevsyukov Apr 30, 2022
0b40283
Load a manifest by a class
alexander-yevsyukov Apr 30, 2022
1aa8835
Fix creating manifest for tests
alexander-yevsyukov May 1, 2022
e060cbf
Move writer to tests
alexander-yevsyukov May 1, 2022
faf20c0
Update build time
alexander-yevsyukov May 1, 2022
8b2d24e
Add documentation
alexander-yevsyukov May 1, 2022
014ea61
Ignore build timestamp during normalization
alexander-yevsyukov May 5, 2022
a810911
Remove unused code
alexander-yevsyukov May 5, 2022
ffdf039
Update build time
alexander-yevsyukov May 5, 2022
acf3109
Extend diagnostics for manifest loading failure
alexander-yevsyukov May 5, 2022
c9b15ad
Update build time
alexander-yevsyukov May 5, 2022
f1804a6
Use `layout` for obtaining a file
alexander-yevsyukov May 5, 2022
14459ab
Improve diagnostic message
alexander-yevsyukov May 5, 2022
31ed7a1
Simplify file reference
alexander-yevsyukov May 5, 2022
cc5f532
Revert to absolute path
alexander-yevsyukov May 5, 2022
baaa126
Fix diags message
alexander-yevsyukov May 5, 2022
c0708d7
Use artifact prefix in impl. title
alexander-yevsyukov May 5, 2022
481b609
Declare output property
alexander-yevsyukov May 5, 2022
d0a3438
Name the output property
alexander-yevsyukov May 5, 2022
28b0401
Extract variable
alexander-yevsyukov May 5, 2022
0de87f6
Optimise imports
alexander-yevsyukov May 5, 2022
5b082e0
Update build time
alexander-yevsyukov May 6, 2022
47d48cc
Update config
alexander-yevsyukov May 6, 2022
93f8397
Improve documentation
alexander-yevsyukov May 6, 2022
993d01a
Avoid redundant inheritance
alexander-yevsyukov May 6, 2022
2464068
Update build time
alexander-yevsyukov May 6, 2022
7e06988
Fix typos
alexander-yevsyukov May 7, 2022
1416a6f
Update build time
alexander-yevsyukov May 7, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/build-on-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,15 @@ jobs:
shell: bash
run: ./gradlew build --stacktrace

# See: https://github.com/marketplace/actions/junit-report-action
- name: Publish Test Report
uses: mikepenz/[email protected]
if: always() # always run even if the previous step fails
with:
report_paths: '**/build/test-results/test/TEST-*.xml'

- name: Upload code coverage report
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
fail_ci_if_error: false
verbose: true
7 changes: 7 additions & 0 deletions .github/workflows/build-on-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,10 @@ jobs:
shell: cmd
# For the reason on `--no-daemon` see https://github.com/actions/cache/issues/454
run: gradlew.bat build --stacktrace --no-daemon

# See: https://github.com/marketplace/actions/junit-report-action
- name: Publish Test Report
uses: mikepenz/[email protected]
if: always() # always run even if the previous step fails
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
44 changes: 35 additions & 9 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 14 additions & 5 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,14 @@
* This script uses two declarations of the constant [licenseReportVersion] because
* currently there is no way to define a constant _before_ a build script of `buildSrc`.
* We cannot use imports or do something else before the `buildscript` or `plugin` clauses.
*
* Therefore, when a version of [io.spine.internal.dependency.LicenseReport] changes, it should be
* changed in the Kotlin object _and_ in this file below twice.
*/

plugins {
java
groovy
`kotlin-dsl`
pmd
val licenseReportVersion = "2.0"
val licenseReportVersion = "2.1"
id("com.github.jk1.dependency-license-report").version(licenseReportVersion)
}

Expand All @@ -57,7 +54,7 @@ repositories {
val jacksonVersion = "2.13.0"

val googleAuthToolVersion = "2.1.2"
val licenseReportVersion = "2.0"
val licenseReportVersion = "2.1"
val grGitVersion = "3.1.1"

/**
Expand Down Expand Up @@ -96,6 +93,16 @@ val errorProneVersion = "2.0.2"
*/
val protobufPluginVersion = "0.8.18"

/**
* The version of Dokka Gradle Plugins.
*
* Please keep in sync with [io.spine.internal.dependency.Dokka.version].
*
* @see <a href="https://github.com/Kotlin/dokka/releases">
* Dokka Releases</a>
*/
val dokkaVersion = "1.6.10"

dependencies {
implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jacksonVersion")
Expand All @@ -108,4 +115,6 @@ dependencies {
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("org.jetbrains.dokka:dokka-gradle-plugin:${dokkaVersion}")
implementation("org.jetbrains.dokka:dokka-base:${dokkaVersion}")
}
85 changes: 85 additions & 0 deletions buildSrc/src/main/kotlin/dokka-for-java.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/*
* 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.Dokka
import java.time.LocalDate
import org.jetbrains.dokka.base.DokkaBase
import org.jetbrains.dokka.base.DokkaBaseConfiguration
import org.jetbrains.dokka.gradle.DokkaTask

plugins {
id("org.jetbrains.dokka")
}

dependencies {
/**
* To generate the documentation as seen from Java perspective, the kotlin-as-java plugin was
* added to the Dokka's classpath.
*
* @see <a href="https://github.com/Kotlin/dokka#output-formats">
* Dokka output formats</a>
*/
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 <a href="https://github.com/SpineEventEngine/dokka-tools/tree/master/dokka-extensions">
* Custom Dokka Plugins</a>
*/
dokkaPlugin(Dokka.SpineExtensions.lib)
}

tasks.withType<DokkaTask>().configureEach {
dokkaSourceSets.configureEach {
skipEmptyPackages.set(true)
}

outputDirectory.set(buildDir.resolve("docs/dokka"))

val dokkaConfDir = rootDir.resolve("buildSrc/src/main/resources/dokka")

/**
* Dokka Base plugin allows to set a few properties to customize the output:
*
* - `customStyleSheets` property to which we can pass our css files overriding styles generated
* by Dokka;
* - `customAssets` property to provide resources. We need to provide an image with the name
* "logo-icon.svg" to overwrite the default one used by Dokka;
* - `separateInheritedMembers` when set to `true`, creates a separate tab in type-documentation
* for inherited members.
*
* @see <a href="https://kotlin.github.io/dokka/1.6.10/user_guide/base-specific/frontend/#prerequisites">
* Dokka modifying frontend assets</a>
*/
pluginConfiguration<DokkaBase, DokkaBaseConfiguration> {
customStyleSheets = listOf(file("${dokkaConfDir.resolve("styles/custom-styles.css")}"))
customAssets = listOf(file("${dokkaConfDir.resolve("assets/logo-icon.svg")}"))
separateInheritedMembers = true
footerMessage = "Copyright ${LocalDate.now().year}, TeamDev"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ package io.spine.internal.dependency

// https://www.mojohaus.org/animal-sniffer/animal-sniffer-maven-plugin/
object AnimalSniffer {
private const val version = "1.19"
private const val version = "1.21"
const val lib = "org.codehaus.mojo:animal-sniffer-annotations:${version}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ package io.spine.internal.dependency
*
* [AssertK](https://github.com/willowtreeapps/assertk)
*/
@Suppress("unused")
object AssertK {
private const val version = "0.23.1"
private const val version = "0.25"
const val libJvm = "com.willowtreeapps.assertk:assertk-jvm:${version}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
package io.spine.internal.dependency

// https://www.bouncycastle.org/java.html
@Suppress("unused")
object BouncyCastle {
const val libPkcsJdk15 = "org.bouncycastle:bcpkix-jdk15on:1.68"
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ package io.spine.internal.dependency
// See `io.spine.internal.gradle.checkstyle.CheckStyleConfig`.
@Suppress("unused")
object CheckStyle {
const val version = "9.2"
const val version = "10.1"
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ package io.spine.internal.dependency

// https://checkerframework.org/
object CheckerFramework {
private const val version = "3.21.0"
private const val version = "3.21.3"
const val annotations = "org.checkerframework:checker-qual:${version}"
@Suppress("unused")
val dataflow = listOf(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ package io.spine.internal.dependency
* [Commons CLI](https://commons.apache.org/proper/commons-cli/)
*/
object CommonsCli {
private const val version = "1.4"
private const val version = "1.5.0"
const val lib = "commons-cli:commons-cli:${version}"
}
46 changes: 44 additions & 2 deletions buildSrc/src/main/kotlin/io/spine/internal/dependency/Dokka.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,48 @@ package io.spine.internal.dependency
// https://github.com/Kotlin/dokka
@Suppress("unused")
object Dokka {
const val version = "1.5.0"
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.6.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}"
}

/**
* To generate the documentation as seen from Java perspective use this plugin.
*
* @see <a href="https://github.com/Kotlin/dokka#output-formats">
* Dokka output formats</a>
*/
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 <a href="https://github.com/SpineEventEngine/dokka-tools/tree/master/dokka-extensions">
* Custom Dokka Plugins</a>
*/
object SpineExtensions {
private const val group = "io.spine.tools"

const val version = "2.0.0-SNAPSHOT.2"
const val lib = "${group}:spine-dokka-extensions:${version}"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ package io.spine.internal.dependency
@Suppress("unused")
object ErrorProne {
// https://github.com/google/error-prone
private const val version = "2.10.0"
private const val version = "2.11.0"
// https://github.com/tbroyer/gradle-errorprone-plugin/blob/v0.8/build.gradle.kts
private const val javacPluginVersion = "9+181-r4173-1"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ package io.spine.internal.dependency
@Suppress("unused")
object Grpc {
@Suppress("MemberVisibilityCanBePrivate")
const val version = "1.43.1"
const val version = "1.45.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}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ package io.spine.internal.dependency
* [Gson](https://github.com/google/gson)
*/
object Gson {
private const val version = "2.8.9"
private const val version = "2.9.0"
const val lib = "com.google.code.gson:gson:${version}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ package io.spine.internal.dependency
*/
// https://github.com/google/guava
object Guava {
private const val version = "31.0.1-jre"
private const val version = "31.1-jre"
const val lib = "com.google.guava:guava:${version}"
const val testLib = "com.google.guava:guava-testlib:${version}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ package io.spine.internal.dependency
@Suppress("unused")
object HttpClient {
// https://github.com/googleapis/google-http-java-client
const val version = "1.40.1"
const val version = "1.41.5"
const val google = "com.google.http-client:google-http-client:${version}"
const val jackson2 = "com.google.http-client:google-http-client-jackson2:${version}"
const val gson = "com.google.http-client:google-http-client-gson:${version}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ package io.spine.internal.dependency

@Suppress("unused")
object Jackson {
private const val version = "2.13.1"
private const val version = "2.13.2"
private const val databindVersion = "2.13.2.2"
// https://github.com/FasterXML/jackson-core
const val core = "com.fasterxml.jackson.core:jackson-core:${version}"
// https://github.com/FasterXML/jackson-databind
const val databind = "com.fasterxml.jackson.core:jackson-databind:${version}"
const val databind = "com.fasterxml.jackson.core:jackson-databind:${databindVersion}"
// https://github.com/FasterXML/jackson-dataformat-xml/releases
const val dataformatXml = "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${version}"
// https://github.com/FasterXML/jackson-dataformats-text/releases
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ package io.spine.internal.dependency
*
* [Java JWT](https://github.com/auth0/java-jwt)
*/
@Suppress("unused")
object JavaJwt {
private const val version = "3.18.1"
private const val version = "3.19.1"
const val lib = "com.auth0:java-jwt:${version}"
}
Loading