Skip to content

Commit 475d0b1

Browse files
committed
Fixing the build.
1 parent 95a1f57 commit 475d0b1

3 files changed

Lines changed: 42 additions & 52 deletions

File tree

.github/workflows/build-and-test.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
- series/**
1212
- feature/**
1313

14+
permissions:
15+
contents: read
16+
checks: write
17+
1418
jobs:
1519
build:
1620
runs-on: ubuntu-latest
@@ -30,18 +34,18 @@ jobs:
3034
- name: Install sbt
3135
uses: sbt/setup-sbt@v1.5.9
3236
- name: ⚙️ Run build
33-
run: sbt ++${{ matrix.scala }} build
37+
run: sbt "++${{ matrix.scala }}; build"
3438
- name: Publish Test Report
3539
uses: mikepenz/action-junit-report@v6
3640
if: always()
3741
with:
38-
report_paths: "**/target/test-reports/*.xml"
42+
report_paths: &testReportPath "**/target/**/test-reports/*.xml"
3943
require_tests: true
4044
check_name: "${{ matrix.java }}-${{ matrix.scala }}-${{ matrix.project }}"
4145
- name: Create Test Summary
4246
uses: test-summary/action@v2
4347
with:
44-
paths: "**/target/test-reports/*.xml"
48+
paths: *testReportPath
4549
if: always()
4650
- name: Code Coverage
4751
uses: codecov/codecov-action@v7

build.sbt

Lines changed: 34 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,39 @@
1-
import org.jetbrains.sbt.kotlin.Keys._
1+
import org.jetbrains.sbt.kotlin.Keys.*
22

3-
inThisBuild(
4-
Seq(
5-
organization := "com.github.simy4.coregex",
6-
organizationName := "Alex Simkin",
7-
homepage := Some(url("https://github.com/SimY4/coregex")),
8-
licenses += ("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0.txt")),
9-
scmInfo := Some(
10-
ScmInfo(
11-
url("https://github.com/SimY4/coregex"),
12-
"scm:git@github.com:SimY4/coregex.git"
13-
)
14-
),
15-
developers := List(
16-
Developer(
17-
id = "SimY4",
18-
name = "Alex Simkin",
19-
email = null,
20-
url = url("https://github.com/SimY4")
21-
)
22-
),
23-
releaseNotesURL := Some(url("https://github.com/SimY4/coregex/releases")),
24-
versionScheme := Some("early-semver"),
25-
startYear := Some(2021),
26-
headerEndYear := Some(2026)
3+
organization := "com.github.simy4.coregex"
4+
organizationName := "Alex Simkin"
5+
homepage := Some(uri("https://github.com/SimY4/coregex"))
6+
licenses += ("Apache-2.0", uri("https://www.apache.org/licenses/LICENSE-2.0.txt"))
7+
scmInfo := Some(
8+
ScmInfo(
9+
uri("https://github.com/SimY4/coregex"),
10+
"scm:git@github.com:SimY4/coregex.git"
11+
)
12+
)
13+
developers := List(
14+
Developer(
15+
id = "SimY4",
16+
name = "Alex Simkin",
17+
email = null,
18+
url = uri("https://github.com/SimY4")
2719
)
2820
)
21+
releaseNotesURL := Some(uri("https://github.com/SimY4/coregex/releases"))
22+
versionScheme := Some("early-semver")
23+
startYear := Some(2021)
24+
headerEndYear := Some(2026)
2925

3026
lazy val scala212 = "2.12.21"
3127
lazy val scala213 = "2.13.18"
3228
lazy val scala3 = "3.3.8"
3329
lazy val supportedScalaVersions = List(scala212, scala213, scala3)
3430

31+
scalaVersion := scala213
32+
3533
def javaLibSettings(release: Int) = Seq(
36-
crossPaths := false,
37-
autoScalaLibrary := false,
38-
ThisBuild / javafmtFormatterCompatibleJavaVersion := 17,
34+
crossPaths := false,
35+
autoScalaLibrary := false,
36+
javafmtFormatterCompatibleJavaVersion := 17,
3937
Compile / compile / javacOptions ++= Seq("-Xlint:all,-options", "-Werror", "--release", release.toString),
4038
Compile / doc / javacOptions ++= Seq("-Xdoclint:all,-missing", "--release", release.toString, "-html5")
4139
)
@@ -54,28 +52,16 @@ lazy val jacocoSettings = Test / jacocoReportSettings := JacocoReportSettings(
5452
"utf-8"
5553
)
5654

57-
ThisBuild / scalaVersion := scala213
58-
5955
releaseTagComment := s"[sbt release] - releasing ${(ThisBuild / version).value}"
6056
releaseCommitMessage := s"[sbt release] - setting version to ${(ThisBuild / version).value}"
6157
releaseNextCommitMessage := s"[skip ci][sbt release] - new version commit: ${(ThisBuild / version).value}"
6258

63-
lazy val root = (project in file("."))
59+
lazy val root = (project in file(".")).autoAggregate
6460
.settings(
65-
name := "coregex-parent",
66-
publish / skip := true
67-
)
68-
.aggregate(
69-
core,
70-
functionaljavaQuickcheck,
71-
hedgehog,
72-
jetCheck,
73-
jqwik,
74-
junitQuickcheck,
75-
kotest,
76-
scalacheck,
77-
vavrTest,
78-
zioTest
61+
name := "coregex-parent",
62+
publish / skip := true,
63+
Test / skip := true,
64+
crossScalaVersions := Nil
7965
)
8066

8167
lazy val core = (project in file("core"))
@@ -97,8 +83,8 @@ lazy val functionaljavaQuickcheck = (project in file("functionaljava-quickcheck"
9783
moduleName := "coregex-functionaljava-quickcheck",
9884
description := "Functionaljava quickcheck bindings for coregex library.",
9985
libraryDependencies ++= Seq(
100-
"org.functionaljava" % "functionaljava-quickcheck" % "5.0" % Provided exclude ("junit", "junit"),
101-
"com.github.sbt" % "junit-interface" % "0.13.3" % Test
86+
("org.functionaljava" % "functionaljava-quickcheck" % "5.0" % Provided).exclude("junit", "junit"),
87+
"com.github.sbt" % "junit-interface" % "0.13.3" % Test
10288
),
10389
testOptions += Tests.Argument(TestFrameworks.JUnit, "-q", "-v"),
10490
javaLibSettings(8),
@@ -163,7 +149,7 @@ lazy val junitQuickcheck = (project in file("junit-quickcheck"))
163149
moduleName := "coregex-junit-quickcheck",
164150
description := "JUnit Quickcheck bindings for coregex library.",
165151
libraryDependencies ++= Seq(
166-
"com.pholser" % "junit-quickcheck-core" % "1.0" % Provided exclude ("junit", "junit"),
152+
("com.pholser" % "junit-quickcheck-core" % "1.0" % Provided).exclude("junit", "junit"),
167153
"com.pholser" % "junit-quickcheck-generators" % "1.0" % Test,
168154
"org.slf4j" % "slf4j-simple" % "1.7.25" % Test,
169155
"com.github.sbt" % "junit-interface" % "0.13.3" % Test

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version = 2.0.4
1+
sbt.version = 2.0.8

0 commit comments

Comments
 (0)