Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This repository contains shared tooling for AWS Kotlin repositories:

* `awslabs/aws-sdk-kotlin`
* `awslabs/smithy-kotlin`
* `smithy-lang/smithy-kotlin`
* `awslabs/aws-crt-kotlin`

It contains shared custom Gradle plugins and build logic used to build and release those repositories.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,13 @@ fun Project.configurePublishing(repoName: String) {
publications.all {
if (this !is MavenPublication) return@all

val githubOrganization = if (repoName.equals("smithy-kotlin", ignoreCase = true)) "smithy-lang" else "awslabs"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correctness: This seems like the wrong location for the logic. Can't we just parameterize githubOrganization the same way we already do repoName?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

project.afterEvaluate {
pom {
name.set(project.name)
description.set(project.description)
url.set("https://github.com/awslabs/$repoName")
url.set("https://github.com/$githubOrganization/$repoName")
licenses {
license {
name.set("The Apache License, Version 2.0")
Expand All @@ -95,9 +97,9 @@ fun Project.configurePublishing(repoName: String) {
}
}
scm {
connection.set("scm:git:git://github.com/awslabs/$repoName.git")
developerConnection.set("scm:git:ssh://github.com/awslabs/$repoName.git")
url.set("https://github.com/awslabs/$repoName")
connection.set("scm:git:git://github.com/$githubOrganization/$repoName.git")
developerConnection.set("scm:git:ssh://github.com/$githubOrganization/$repoName.git")
url.set("https://github.com/$githubOrganization/$repoName")
}

artifact(javadocJar)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import java.util.*

/**
* Container for `smithy-kotlin` plugin settings
* See https://github.com/awslabs/smithy-kotlin/blob/main/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/KotlinSettings.kt
* See https://github.com/smithy-lang/smithy-kotlin/blob/main/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/KotlinSettings.kt
*/
open class SmithyKotlinApiSettings : ToNode {
var visibility: String? = null
Expand Down
Loading