Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ import org.gradle.api.publish.maven.MavenPomDeveloperSpec
open class PublicationSettings(var project: Project) {
var repoUrl: String? = null
get() = field ?: project.findProperty("repository.url")?.toString()
var repoDefaultBranch: String? = null
get() = field ?: project.findProperty("repository.defaultBranch")?.toString()
var license: String = "MIT License"
var description: String? = null
get() = field ?: project.description
var developers: Action<in MavenPomDeveloperSpec>? = null
Expand Down
5 changes: 3 additions & 2 deletions sonatype/src/main/kotlin/com/bakdata/gradle/SonatypePlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,11 @@ class SonatypePlugin : Plugin<Project> {
system.set("GitHub")
url.set("$repoUrl/issues")
}
val branch = publicationSettings.repoDefaultBranch!!
licenses {
license {
name.set("MIT License")
url.set("$repoUrl/blob/master/LICENSE") //FIXME pass correct branch
name.set(publicationSettings.license)
url.set("$repoUrl/blob/$branch/LICENSE")
}
}
scm {
Expand Down
Loading