Skip to content

Commit 179b88d

Browse files
committed
Remove commented code. Ktlint
1 parent 3fccb45 commit 179b88d

File tree

4 files changed

+61
-53
lines changed

4 files changed

+61
-53
lines changed

buildSrc/src/main/kotlin/SonatypeCentralPortalPublishTask.kt

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
16
import kotlinx.serialization.*
27
import kotlinx.serialization.json.*
38
import okhttp3.*
9+
import okhttp3.HttpUrl.Companion.toHttpUrl
410
import okhttp3.MediaType.Companion.toMediaType
511
import okhttp3.RequestBody.Companion.asRequestBody
6-
import okhttp3.HttpUrl.Companion.toHttpUrl
712
import okhttp3.RequestBody.Companion.toRequestBody
8-
import java.io.File
9-
import java.time.Duration
10-
import java.util.Base64
1113
import org.gradle.api.DefaultTask
1214
import org.gradle.api.file.RegularFileProperty
1315
import org.gradle.api.provider.*
1416
import org.gradle.api.tasks.*
17+
import java.io.File
18+
import java.time.Duration
19+
import java.util.Base64
1520
import kotlin.time.Clock
1621
import kotlin.time.ExperimentalTime
1722

@@ -46,7 +51,10 @@ abstract class SonatypePortalPublishTask : DefaultTask() {
4651
@get:Optional
4752
abstract val pollInterval: Property<kotlin.time.Duration>
4853

49-
private val json = Json { ignoreUnknownKeys = true; prettyPrint = true }
54+
private val json = Json {
55+
ignoreUnknownKeys = true
56+
prettyPrint = true
57+
}
5058
private val client = OkHttpClient.Builder()
5159
.connectTimeout(Duration.ofSeconds(30))
5260
.readTimeout(Duration.ofSeconds(60))
@@ -60,7 +68,7 @@ abstract class SonatypePortalPublishTask : DefaultTask() {
6068
val deploymentName: String? = null,
6169
val deploymentState: String,
6270
val purls: List<String>? = null,
63-
val errors: Map<String, List<String>>? = null
71+
val errors: Map<String, List<String>>? = null,
6472
)
6573

6674
@TaskAction
@@ -115,7 +123,7 @@ abstract class SonatypePortalPublishTask : DefaultTask() {
115123
.addFormDataPart(
116124
"bundle",
117125
bundle.name,
118-
bundle.asRequestBody("application/octet-stream".toMediaType())
126+
bundle.asRequestBody("application/octet-stream".toMediaType()),
119127
)
120128
.build()
121129

@@ -190,4 +198,4 @@ abstract class SonatypePortalPublishTask : DefaultTask() {
190198
val body = resp.body?.string().orEmpty()
191199
return RuntimeException("HTTP error during $context: ${resp.code}.\nResponse: ${body.take(800)}")
192200
}
193-
}
201+
}

hll/dynamodb-mapper/dynamodb-mapper-codegen/build.gradle.kts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,18 @@ kotlin {
2929
}
3030
}
3131

32-
//val sourcesJar by tasks.creating(Jar::class) {
33-
// group = "publishing"
34-
// description = "Assembles Kotlin sources jar"
35-
// archiveClassifier.set("sources")
36-
// from(sourceSets.getByName("main").allSource)
37-
//}
38-
//
39-
//publishing {
40-
// publications {
41-
// create<MavenPublication>("dynamodb-mapper-codegen") {
42-
// from(components["java"])
43-
// artifact(sourcesJar)
44-
// }
45-
// }
46-
//}
32+
val sourcesJar by tasks.creating(Jar::class) {
33+
group = "publishing"
34+
description = "Assembles Kotlin sources jar"
35+
archiveClassifier.set("sources")
36+
from(sourceSets.getByName("main").allSource)
37+
}
38+
39+
publishing {
40+
publications {
41+
create<MavenPublication>("dynamodb-mapper-codegen") {
42+
from(components["java"])
43+
artifact(sourcesJar)
44+
}
45+
}
46+
}

hll/dynamodb-mapper/dynamodb-mapper-schema-codegen/build.gradle.kts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,18 @@ tasks.test {
5353
}
5454
}
5555

56-
//val sourcesJar by tasks.creating(Jar::class) {
57-
// group = "publishing"
58-
// description = "Assembles Kotlin sources jar"
59-
// archiveClassifier.set("sources")
60-
// from(sourceSets.getByName("main").allSource)
61-
//}
62-
//
63-
//publishing {
64-
// publications {
65-
// create<MavenPublication>("dynamodb-mapper-schema-codegen") {
66-
// from(components["java"])
67-
// artifact(sourcesJar)
68-
// }
69-
// }
70-
//}
56+
val sourcesJar by tasks.creating(Jar::class) {
57+
group = "publishing"
58+
description = "Assembles Kotlin sources jar"
59+
archiveClassifier.set("sources")
60+
from(sourceSets.getByName("main").allSource)
61+
}
62+
63+
publishing {
64+
publications {
65+
create<MavenPublication>("dynamodb-mapper-schema-codegen") {
66+
from(components["java"])
67+
artifact(sourcesJar)
68+
}
69+
}
70+
}

hll/hll-codegen/build.gradle.kts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,18 @@ dependencies {
3232
testImplementation(kotlin("test"))
3333
}
3434

35-
//val sourcesJar by tasks.creating(Jar::class) {
36-
// group = "publishing"
37-
// description = "Assembles Kotlin sources jar"
38-
// archiveClassifier.set("sources")
39-
// from(sourceSets.getByName("main").allSource)
40-
//}
41-
42-
//publishing {
43-
// publications {
44-
// create<MavenPublication>("hll-codegen") {
45-
// from(components["java"])
46-
// artifact(sourcesJar)
47-
// }
48-
// }
49-
//}
35+
val sourcesJar by tasks.creating(Jar::class) {
36+
group = "publishing"
37+
description = "Assembles Kotlin sources jar"
38+
archiveClassifier.set("sources")
39+
from(sourceSets.getByName("main").allSource)
40+
}
41+
42+
publishing {
43+
publications {
44+
create<MavenPublication>("hll-codegen") {
45+
from(components["java"])
46+
artifact(sourcesJar)
47+
}
48+
}
49+
}

0 commit comments

Comments
 (0)