Skip to content

Commit

Permalink
Merge pull request #58 from creek-service/latest_conventions
Browse files Browse the repository at this point in the history
Update to latest build conventions
  • Loading branch information
big-andy-coates authored Nov 9, 2022
2 parents 6d11dd7 + 623225c commit 837c31c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ updates:
registries:
- creek-github-packages
schedule:
interval: weekly
interval: monthly
7 changes: 7 additions & 0 deletions buildSrc/src/main/kotlin/creek-common-convention.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ spotless {
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()
toggleOffOn("formatting:off", "formatting:on")
}
}

Expand All @@ -95,6 +96,12 @@ spotbugs {
}
}

if (rootProject.name != project.name) {
tasks.jar {
archiveBaseName.set("${rootProject.name}-${project.name}")
}
}

tasks.register("format") {
group = "creek"
description = "Format the code"
Expand Down
11 changes: 2 additions & 9 deletions buildSrc/src/main/kotlin/creek-publishing-convention.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,6 @@ java {
withJavadocJar()
}

val prependRootName = rootProject.name != project.name

if (prependRootName) {
tasks.jar {
archiveBaseName.set("${rootProject.name}-${project.name}")
}
}

tasks.javadoc {
if (JavaVersion.current().isJava9Compatible) {
(options as StandardJavadocDocletOptions).apply {
Expand All @@ -54,7 +46,7 @@ tasks.javadoc {
// Dummy/empty publishPlugins task, to allow consistent build.yml workflow
tasks.register("publishPlugins") {
doLast {
println("No Gradle plugins to publish")
logger.info("No Gradle plugins to publish")
}
}

Expand All @@ -74,6 +66,7 @@ publishing {
create<MavenPublication>("mavenJava") {
from(components["java"])

val prependRootName = rootProject.name != project.name
if (prependRootName) {
artifactId = "${rootProject.name}-${project.name}"
}
Expand Down

0 comments on commit 837c31c

Please sign in to comment.