Skip to content

Commit

Permalink
Improve build scripts (#1215)
Browse files Browse the repository at this point in the history
  • Loading branch information
nakamura-to authored Oct 27, 2024
2 parents ca0afaa + 935a3c3 commit ade2749
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 36 deletions.
49 changes: 19 additions & 30 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,22 @@ allprojects {

spotless {
lineEndings = com.diffplug.spotless.LineEnding.UNIX
java {
googleJavaFormat(catalog.google.java.format.get().version)
}
kotlin {
ktlint(catalog.ktlint.get().version)
}
kotlinGradle {
ktlint(catalog.ktlint.get().version)
}
format("misc") {
target("**/*.gitignore", "docs/**/*.rst", "**/*.md")
targetExclude("**/bin/**", "**/build/**")
indentWithSpaces()
trimTrailingWhitespace()
endWithNewline()
}
}

tasks {
Expand All @@ -92,17 +108,6 @@ subprojects {
testImplementation(catalog.junit.jupiter.api)
testRuntimeOnly(catalog.junit.jupiter.engine)
}

spotless {
java {
googleJavaFormat(catalog.google.java.format.get().version)
}
kotlin {
ktlint(catalog.ktlint.get().version)
trimTrailingWhitespace()
endWithNewline()
}
}
}

configure(modularProjects) {
Expand Down Expand Up @@ -140,8 +145,8 @@ configure(modularProjects) {
}
scm {
val githubUrl: String by project
connection.set("scm:git:${githubUrl}")
developerConnection.set("scm:git:${githubUrl}")
connection.set("scm:git:$githubUrl")
developerConnection.set("scm:git:$githubUrl")
url.set(projectUrl)
}
}
Expand Down Expand Up @@ -208,8 +213,7 @@ configure(modularProjects) {

configure(integrationTestProjects) {
apply(plugin = "java")
apply(plugin = "com.diffplug.spotless")
apply(plugin = "org.domaframework.doma.compile")
apply(plugin = catalog.plugins.doma.compile.get().pluginId)

dependencies {
testImplementation(platform(catalog.testcontainers.bom))
Expand Down Expand Up @@ -296,21 +300,6 @@ rootProject.apply {
packageGroup.set("org.seasar")
}

spotless {
format("misc") {
target("**/*.gradle.kts", "**/*.gitignore")
targetExclude("**/bin/**", "**/build/**")
indentWithSpaces()
trimTrailingWhitespace()
endWithNewline()
}
format("documentation") {
target("docs/**/*.rst", "**/*.md")
trimTrailingWhitespace()
endWithNewline()
}
}

tasks {
val replaceVersion by registering {
doLast {
Expand Down
6 changes: 0 additions & 6 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ pluginManagement {
}
}

dependencyResolutionManagement {
versionCatalogs {
create("libs")
}
}

rootProject.name = "doma"

include("doma-core")
Expand Down

0 comments on commit ade2749

Please sign in to comment.