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
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ jobs:
- name: Bump version
id: version
uses: paulhatch/semantic-version@v5.4.0
with:
major_pattern: "(MAJOR)"
minor_pattern: "(MINOR)"

- name: Create GitHub tag and release
uses: softprops/action-gh-release@v2.5.0
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![build](https://github.com/will-molloy/java-template/actions/workflows/build.yml/badge.svg?branch=main&event=push)](https://github.com/will-molloy/java-template/actions/workflows/build.yml)
[![codecov](https://codecov.io/gh/will-molloy/java-template/branch/main/graph/badge.svg)](https://codecov.io/gh/will-molloy/java-template)

template repo for Java (or Kotlin/Scala) Gradle projects
template repo for Java/Kotlin Gradle projects

## Features

Expand All @@ -13,7 +13,6 @@ template repo for Java (or Kotlin/Scala) Gradle projects
- Automatic code formatting via [Spotless](https://github.com/diffplug/spotless)
- Java: [`google-java-format`](https://github.com/google/google-java-format)
- Kotlin: [`ktfmt`](https://github.com/facebook/ktfmt)
- Scala: [`scalafmt`](https://github.com/scalameta/scalafmt)
- Code style analysis via [Checkstyle](https://github.com/checkstyle/checkstyle)
- Static analysis via [SpotBugs](https://spotbugs.github.io/)
- Unit and integration test support via [JUnit 5](https://junit.org/junit5/) and [TestSets plugin](https://github.com/unbroken-dome/gradle-testsets-plugin)
Expand Down
8 changes: 1 addition & 7 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,9 @@ allprojects {
trimTrailingWhitespace()
endWithNewline()
}
// https://github.com/diffplug/spotless/tree/main/plugin-gradle#scala
scala {
scalafmt().configFile("$rootDir/scalafmt.conf")
trimTrailingWhitespace()
endWithNewline()
}
}

// TODO Kotlin/Scala alternative?
// TODO Kotlin alternative?
apply(plugin = "checkstyle")
configure<CheckstyleExtension> {
toolVersion = rootProject.libs.versions.checkstyle.get()
Expand Down
2 changes: 1 addition & 1 deletion example-kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ kotlin {
jvmToolchain(25)
}

// TODO disabling on Kotlin/Scala atm... too many false positives
// TODO disabling on Kotlin atm... too many false positives
spotbugs {
ignoreFailures.set(true)
}
12 changes: 0 additions & 12 deletions example-scala/build.gradle.kts

This file was deleted.

10 changes: 0 additions & 10 deletions example-scala/src/main/scala/com/willmolloy/HelloScala.scala

This file was deleted.

13 changes: 0 additions & 13 deletions example-scala/src/test/scala/com/willmolloy/HelloScalaTest.scala

This file was deleted.

3 changes: 0 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ junit = "6.0.2"
truth = "1.4.5"
mockito = "5.21.0"
# langs
scala = "3.7.4"
kotlin = "2.3.0"
# plugins
spotless = "8.1.0"
Expand All @@ -27,8 +26,6 @@ junit = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit" }
truth = { module = "com.google.truth:truth", version.ref = "truth" }
mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito" }
mockito-junit = { module = "org.mockito:mockito-junit-jupiter", version.ref = "mockito" }
# scala
scala-library = { module = "org.scala-lang:scala3-library_3", version.ref = "scala" }

[plugins]
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
Expand Down
4 changes: 0 additions & 4 deletions scalafmt.conf

This file was deleted.

1 change: 0 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
rootProject.name = "java-template"
include("example-java")
include("example-kotlin")
include("example-scala")
Loading