Skip to content

Commit 11687e8

Browse files
committed
chore(Java): version by properties file only
1 parent 01a9b92 commit 11687e8

File tree

4 files changed

+18
-39
lines changed

4 files changed

+18
-39
lines changed

.releaserc.cjs

+2-23
Original file line numberDiff line numberDiff line change
@@ -103,27 +103,6 @@ module.exports = {
103103
"semantic-release-replace-plugin",
104104
{
105105
replacements: [
106-
// Update the version for all Gradle Java projects
107-
// Does not update the dependencies
108-
{
109-
files: Object.keys(Runtimes.java),
110-
from: 'version = ".*"',
111-
to: 'version = "${nextRelease.version}"',
112-
results: Object.keys(Runtimes.java).map(CheckResults),
113-
countMatches: true,
114-
},
115-
// Now update the Gradle Java dependencies
116-
...Object.entries(Runtimes.java).flatMap(([file, { dependencies }]) =>
117-
dependencies.map((dependency) => ({
118-
files: [file],
119-
from: `implementation("${dependency}:.*")`,
120-
to:
121-
`implementation("${dependency}:` + '${nextRelease.version}" />',
122-
results: [CheckResults(file)],
123-
countMatches: true,
124-
})),
125-
),
126-
127106
// Update the version for all DotNet projects
128107
// Does not update the dependencies
129108
{
@@ -211,8 +190,8 @@ function CheckDependencyReplacementResults(file) {
211190
return {
212191
file,
213192
hasChanged: true,
214-
numMatches: 4,
215-
numReplacements: 4,
193+
numMatches: 3,
194+
numReplacements: 3,
216195
};
217196
} else if (file.includes("StandardLibrary")) {
218197
return {

AwsCryptographicMaterialProviders/runtimes/java/build.gradle.kts

+13-13
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var props = Properties().apply {
1818
var dafnyVersion = props.getProperty("dafnyVersion")
1919

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

2424
java {
@@ -224,18 +224,18 @@ tasks.test {
224224
// This will show System.out.println statements
225225
testLogging.showStandardStreams = true
226226

227-
testLogging {
228-
lifecycle {
229-
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)
230-
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
231-
showExceptions = true
232-
showCauses = true
233-
showStackTraces = true
234-
showStandardStreams = true
235-
}
236-
info.events = lifecycle.events
237-
info.exceptionFormat = lifecycle.exceptionFormat
238-
}
227+
// testLogging {
228+
// lifecycle {
229+
// 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)
230+
// exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
231+
// showExceptions = true
232+
// showCauses = true
233+
// showStackTraces = true
234+
// showStandardStreams = true
235+
// }
236+
// info.events = lifecycle.events
237+
// info.exceptionFormat = lifecycle.exceptionFormat
238+
// }
239239

240240
// See https://github.com/gradle/kotlin-dsl/issues/836
241241
addTestListener(object : TestListener {

TestVectorsAwsCryptographicMaterialProviders/runtimes/java/build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var props = Properties().apply {
2020
var dafnyVersion = props.getProperty("dafnyVersion")
2121

2222
group = "software.amazon.cryptography"
23-
version = "1.8.0-SNAPSHOT"
23+
version = props.getProperty("mplVersion")
2424
description = "TestAwsCryptographicMaterialProviders"
2525

2626
java {
@@ -68,7 +68,7 @@ repositories {
6868
dependencies {
6969
implementation("org.dafny:DafnyRuntime:${dafnyVersion}")
7070
implementation("software.amazon.smithy.dafny:conversion:0.1.1")
71-
implementation("software.amazon.cryptography:aws-cryptographic-material-providers:1.8.0-SNAPSHOT")
71+
implementation("software.amazon.cryptography:aws-cryptographic-material-providers:${version}")
7272
implementation(platform("software.amazon.awssdk:bom:2.25.1"))
7373
implementation("software.amazon.awssdk:dynamodb")
7474
implementation("software.amazon.awssdk:dynamodb-enhanced")

project.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
# And the Dotnet projects include and parse this file.
88
dafnyVersion=4.9.0
99
dafnyVerifyVersion=4.9.0
10-
mplVersion=1.8.0-SNAPSHOT
10+
mplVersion=1.9.0-rc

0 commit comments

Comments
 (0)