File tree Expand file tree Collapse file tree 6 files changed +21
-22
lines changed
dynamodb-mapper-schema-codegen
dynamodb-mapper-schema-generator-plugin Expand file tree Collapse file tree 6 files changed +21
-22
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ kotlin.native.ignoreDisabledTargets=true
66org.gradle.jvmargs =-Xmx6g -XX:MaxMetaspaceSize=2G
77
88# sdk
9- sdkVersion =1.3.29
9+ sdkVersion =1.3.29-SNAPSHOT
1010
1111# dokka config (values specified at build-time as needed)
1212smithyKotlinDocBaseUrl =https://sdk.amazonaws.com/kotlin/api/smithy-kotlin/api/$smithyKotlinRuntimeVersion/
Original file line number Diff line number Diff line change @@ -33,12 +33,16 @@ val optinAnnotations = listOf(
3333 " kotlin.RequiresOptIn" ,
3434)
3535
36+ @OptIn(InternalApi ::class )
37+ fun getHllPreviewVersion () = if (sdkVersion.contains(" -SNAPSHOT" )) { // i.e. 1.3.29-beta-SNAPSHOT
38+ sdkVersion
39+ .removeSuffix(" -SNAPSHOT" )
40+ .ensureSuffix(" -beta-SNAPSHOT" )
41+ } else sdkVersion.ensureSuffix(" -beta" ) // i.e. 1.3.29-beta
42+
3643subprojects {
3744 group = " aws.sdk.kotlin"
38-
39- @OptIn(InternalApi ::class )
40- version = sdkVersion.ensureSuffix(" -preview" ) // i.e 1.3.29-preview
41-
45+ version = getHllPreviewVersion()
4246 configurePublishing(" aws-sdk-kotlin" )
4347}
4448
Original file line number Diff line number Diff line change @@ -30,10 +30,6 @@ kotlin {
3030 }
3131}
3232
33- val sdkVersion: String by project
34- group = " aws.sdk.kotlin"
35- version = sdkVersion
36-
3733val sourcesJar by tasks.creating(Jar ::class ) {
3834 group = " publishing"
3935 description = " Assembles Kotlin sources jar"
Original file line number Diff line number Diff line change @@ -49,10 +49,6 @@ tasks.test {
4949 }
5050}
5151
52- val sdkVersion: String by project
53- group = " aws.sdk.kotlin"
54- version = sdkVersion
55-
5652val sourcesJar by tasks.creating(Jar ::class ) {
5753 group = " publishing"
5854 description = " Assembles Kotlin sources jar"
Original file line number Diff line number Diff line change 1+ import aws.smithy.kotlin.runtime.InternalApi
2+ import aws.smithy.kotlin.runtime.text.ensureSuffix
13import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
24
35/*
@@ -45,10 +47,6 @@ gradlePlugin {
4547 }
4648}
4749
48- val sdkVersion: String by project
49- group = " aws.sdk.kotlin"
50- version = sdkVersion
51-
5250publishing {
5351 publications {
5452 create<MavenPublication >(" dynamodb-mapper-schema-generator-plugin" ) {
@@ -87,6 +85,15 @@ tasks.test {
8785}
8886
8987// FIXME Commonize the following functions into the aws-kotlin-repo-tools build-support
88+ val sdkVersion: String by project
89+
90+ @OptIn(InternalApi ::class )
91+ fun getHllPreviewVersion () = if (sdkVersion.contains(" -SNAPSHOT" )) { // i.e. 1.3.29-beta-SNAPSHOT
92+ sdkVersion
93+ .removeSuffix(" -SNAPSHOT" )
94+ .ensureSuffix(" -beta-SNAPSHOT" )
95+ } else sdkVersion.ensureSuffix(" -beta" ) // i.e. 1.3.29-beta
96+
9097/* *
9198 * Create a file containing the sdkVersion to use as a resource
9299 * This saves us from having to manually change version numbers in multiple places
@@ -99,7 +106,7 @@ val generateSdkVersionFile by tasks.registering {
99106 outputs.file(versionFile)
100107 sourceSets.main.get().output.dir(resourcesDir)
101108 doLast {
102- versionFile.writeText(sdkVersion )
109+ versionFile.writeText(getHllPreviewVersion() )
103110 }
104111}
105112
Original file line number Diff line number Diff line change @@ -37,10 +37,6 @@ dependencies {
3737 testImplementation(libs.kotlin.test.junit5)
3838}
3939
40- val sdkVersion: String by project
41- group = " aws.sdk.kotlin"
42- version = sdkVersion
43-
4440val sourcesJar by tasks.creating(Jar ::class ) {
4541 group = " publishing"
4642 description = " Assembles Kotlin sources jar"
You can’t perform that action at this time.
0 commit comments