Skip to content

Commit

Permalink
chore: add pre commit check hook
Browse files Browse the repository at this point in the history
  • Loading branch information
tassiluca committed Jan 5, 2024
1 parent 639938e commit 7ccb900
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
11 changes: 5 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import kotlin.io.path.Path

@Suppress("DSL_SCOPE_VIOLATION")
plugins {
scala
Expand All @@ -10,12 +8,13 @@ plugins {
application
}

val projectRepository = projectDir.resolve("libs")

repositories {
mavenCentral()
}

dependencies {
val localLibraries = Path("libs")
implementation(libs.kotlin.stdlib)
implementation(libs.scala.stdlib)
// Gears is a wip strawman library for async programming not already available on Maven Central...
Expand All @@ -25,9 +24,9 @@ dependencies {
listOf(
"$gears.jar",
"$gears-javadoc.jar",
"$gears-sources.jar"
).map { localLibraries.resolve(it) }
)
"$gears-sources.jar",
).map { projectRepository.resolve(it) },
),
)
testRuntimeOnly(libs.flexmark) // needed to make it works scalatest
testImplementation(libs.scalatest)
Expand Down
3 changes: 3 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ plugins {
}

gitHooks {
preCommit {
tasks("check")
}
commitMsg {
conventionalCommits()
}
Expand Down

0 comments on commit 7ccb900

Please sign in to comment.