Skip to content

Commit

Permalink
chore(Java): version by properties file only
Browse files Browse the repository at this point in the history
  • Loading branch information
texastony committed Dec 9, 2024
1 parent 6a36141 commit 72765d5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 39 deletions.
25 changes: 2 additions & 23 deletions .releaserc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -103,27 +103,6 @@ module.exports = {
"semantic-release-replace-plugin",
{
replacements: [
// Update the version for all Gradle Java projects
// Does not update the dependencies
{
files: Object.keys(Runtimes.java),
from: 'version = ".*"',
to: 'version = "${nextRelease.version}"',
results: Object.keys(Runtimes.java).map(CheckResults),
countMatches: true,
},
// Now update the Gradle Java dependencies
...Object.entries(Runtimes.java).flatMap(([file, { dependencies }]) =>
dependencies.map((dependency) => ({
files: [file],
from: `implementation("${dependency}:.*")`,
to:
`implementation("${dependency}:` + '${nextRelease.version}" />',
results: [CheckResults(file)],
countMatches: true,
})),
),

// Update the version for all DotNet projects
// Does not update the dependencies
{
Expand Down Expand Up @@ -211,8 +190,8 @@ function CheckDependencyReplacementResults(file) {
return {
file,
hasChanged: true,
numMatches: 4,
numReplacements: 4,
numMatches: 3,
numReplacements: 3,
};
} else if (file.includes("StandardLibrary")) {
return {
Expand Down
26 changes: 13 additions & 13 deletions AwsCryptographicMaterialProviders/runtimes/java/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var props = Properties().apply {
var dafnyVersion = props.getProperty("dafnyVersion")

group = "software.amazon.cryptography"
version = "1.8.0-SNAPSHOT"
version = props.getProperty("mplVersion")
description = "AWS Cryptographic Material Providers Library"

java {
Expand Down Expand Up @@ -224,18 +224,18 @@ tasks.test {
// This will show System.out.println statements
testLogging.showStandardStreams = true

testLogging {
lifecycle {
events = mutableSetOf(org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED, org.gradle.api.tasks.testing.logging.TestLogEvent.PASSED, org.gradle.api.tasks.testing.logging.TestLogEvent.SKIPPED)
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
showExceptions = true
showCauses = true
showStackTraces = true
showStandardStreams = true
}
info.events = lifecycle.events
info.exceptionFormat = lifecycle.exceptionFormat
}
// testLogging {
// lifecycle {
// events = mutableSetOf(org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED, org.gradle.api.tasks.testing.logging.TestLogEvent.PASSED, org.gradle.api.tasks.testing.logging.TestLogEvent.SKIPPED)
// exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
// showExceptions = true
// showCauses = true
// showStackTraces = true
// showStandardStreams = true
// }
// info.events = lifecycle.events
// info.exceptionFormat = lifecycle.exceptionFormat
// }

// See https://github.com/gradle/kotlin-dsl/issues/836
addTestListener(object : TestListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var props = Properties().apply {
var dafnyVersion = props.getProperty("dafnyVersion")

group = "software.amazon.cryptography"
version = "1.8.0-SNAPSHOT"
version = props.getProperty("mplVersion")
description = "TestAwsCryptographicMaterialProviders"

java {
Expand Down Expand Up @@ -68,7 +68,7 @@ repositories {
dependencies {
implementation("org.dafny:DafnyRuntime:${dafnyVersion}")
implementation("software.amazon.smithy.dafny:conversion:0.1.1")
implementation("software.amazon.cryptography:aws-cryptographic-material-providers:1.8.0-SNAPSHOT")
implementation("software.amazon.cryptography:aws-cryptographic-material-providers:${version}")
implementation(platform("software.amazon.awssdk:bom:2.25.1"))
implementation("software.amazon.awssdk:dynamodb")
implementation("software.amazon.awssdk:dynamodb-enhanced")
Expand Down
2 changes: 1 addition & 1 deletion project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
# And the Dotnet projects include and parse this file.
dafnyVersion=4.9.0
dafnyVerifyVersion=4.9.0
mplVersion=1.8.0-SNAPSHOT
mplVersion=1.9.0-rc

0 comments on commit 72765d5

Please sign in to comment.