Skip to content

Commit 0f0b434

Browse files
authored
Merge branch 'main' into alejandrohdezma-patch-1
2 parents cfe72e6 + 418a124 commit 0f0b434

File tree

44 files changed

+299
-199
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+299
-199
lines changed

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Scala Steward: Reformat with scalafmt 3.8.5
2+
a4e980b0ca9ce4224e84650dff1bf9d44fba3815

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/workflows/ci.yml

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,41 @@ on:
77
- cron: '0 7 * * 6'
88
jobs:
99
build:
10+
strategy:
11+
matrix:
12+
include:
13+
- java: 8
14+
distribution: temurin
15+
sbt: 1
16+
- java: 17
17+
distribution: temurin
18+
sbt: 2
1019
runs-on: ubuntu-latest
1120
env:
1221
# define Java options for both official sbt and sbt-extras
1322
JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
1423
JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
1524
steps:
1625
- name: Checkout
17-
uses: actions/checkout@v2
26+
uses: actions/checkout@v5
27+
with:
28+
fetch-depth: 0
1829
- name: Setup Scala
19-
uses: olafurpg/setup-scala@v10
30+
uses: actions/setup-java@v5
2031
with:
21-
java-version: "adopt@1.8"
22-
- name: Coursier cache
23-
uses: coursier/cache-action@v5
24-
- name: Build and test
32+
distribution: "${{ matrix.distribution }}"
33+
java-version: "${{ matrix.java }}"
34+
cache: sbt
35+
- uses: sbt/setup-sbt@v1
36+
- name: Build and test (sbt 1.x)
37+
if: ${{ matrix.sbt == 1 }}
38+
shell: bash
39+
run: |
40+
gpg --import test-key.gpg
41+
sbt -v ++2.12.x clean scalafmtSbtCheck scalafmtCheckAll test scripted
42+
- name: Build and test (sbt 2.x)
43+
if: ${{ matrix.sbt == 2 }}
44+
shell: bash
2545
run: |
2646
gpg --import test-key.gpg
27-
sbt -v clean ^test ^scripted
28-
rm -rf "$HOME/.ivy2/local" || true
29-
find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true
30-
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true
31-
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true
32-
find $HOME/.sbt
47+
sbt -v ++3.x clean scalafmtCheckAll test scripted

.github/workflows/publish.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,22 @@ jobs:
1414
JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
1515
steps:
1616
- name: Checkout
17-
uses: actions/checkout@v2
18-
- name: Coursier cache
19-
uses: coursier/cache-action@v5
20-
- name: Test
21-
run: |
22-
sbt +test +packagedArtifacts
17+
uses: actions/checkout@v5
18+
with:
19+
fetch-depth: 0
20+
- name: Setup JDK
21+
uses: actions/setup-java@v5
22+
with:
23+
distribution: temurin
24+
java-version: 17
25+
cache: sbt
26+
- uses: sbt/setup-sbt@v1
2327
- name: Release
2428
env:
2529
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
2630
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
2731
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
2832
PGP_SECRET: ${{ secrets.PGP_SECRET }}
2933
CI_CLEAN: clean
30-
CI_RELEASE: +publishSigned
3134
run: |
3235
sbt ci-release

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
*~
22
target/
33
.idea/
4+
.bsp/
45
/bin/
56
/.settings/
67
/.cache
78
/.classpath
89
/.project
10+
metals.sbt

.java-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

.scala-steward.conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
updates.pin = [
22
# JGit 6 requires Java 11, see #213
3-
{ groupId = "org.eclipse.jgit", artifactId = "org.eclipse.jgit", version = "5." }
3+
{ groupId = "org.eclipse.jgit", artifactId = "org.eclipse.jgit", version = "5." },
4+
{ groupId = "org.scala-lang", artifactId = "scala-library", version = "2.12." }
45
]

.scalafmt.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version = "3.10.7"
2+
maxColumn = 150
3+
align.tokens = []
4+
docstrings.wrap = keep
5+
docstrings.oneline = keep
6+
docstrings.style = keep
7+
docstrings.forceBlankLineBefore = false
8+
runner.dialect = Scala212Source3
9+
rewrite.scala3.convertToNewSyntax = true
10+
rewrite.scala3.newSyntax.control = false

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ You can begin to use git to control your project versions.
7272
The git plugin will now autogenerate your version using the following rules, in order:
7373

7474
1. Looks at version-property setting (default to `project.version`), and checks the `sys.props` to see if this has a value. If so, use it.
75-
2. Otherwise, looks at the project tags. The first to match the `gitTagToVersionNumberSetting` is used to assign the version. The default is to look for tags that begin with `v` and a number, and use the number as the version. If there are multiple version tags, it will pick the highest.
75+
2. Otherwise, looks at the project tags. The first to match the `gitTagToVersionNumber` setting is used to assign the version. The default is to look for tags that begin with `v` and a number, and use the number as the version. If there are multiple version tags, it will pick the highest.
7676
3. If no tags are found either, look at the head commit. We attach this to the `git.baseVersion` setting: "<base-version>.<git commit sha>"
7777
4. If no head commit is present either (which means this is a brand-new repository with no commits yet), we append the current timestamp to the base version: "<base-version>.<timestamp>".
7878

build.sbt

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
organization := "com.github.sbt"
2-
sonatypeProfileName := "com.github.sbt"
32
name := "sbt-git"
43
licenses := Seq(("BSD-2-Clause", url("https://opensource.org/licenses/BSD-2-Clause")))
54
description := "An sbt plugin that offers git features directly inside sbt"
@@ -8,15 +7,36 @@ startYear := Some(2011)
87
homepage := scmInfo.value map (_.browseUrl)
98
scmInfo := Some(ScmInfo(url("https://github.com/sbt/sbt-git"), "scm:git:git@github.com:sbt/sbt-git.git"))
109

11-
crossSbtVersions := List("1.3.13")
10+
lazy val scala212 = "2.12.21"
11+
lazy val scala3 = "3.8.1"
12+
13+
crossScalaVersions := Seq(scala212, scala3)
1214

1315
enablePlugins(GitVersioning, SbtPlugin)
1416
git.baseVersion := "1.0"
1517

1618
libraryDependencies ++= Seq(
17-
"org.eclipse.jgit" % "org.eclipse.jgit" % "5.13.1.202206130422-r",
18-
"com.michaelpollmeier" % "versionsort" % "1.0.11",
19-
"org.scalameta" %% "munit" % "0.7.29" % Test
19+
"org.eclipse.jgit" % "org.eclipse.jgit" % "5.13.5.202508271544-r",
20+
"com.michaelpollmeier" % "versionsort" % "1.0.17",
21+
"org.scalameta" %% "munit" % "1.2.2" % Test
2022
)
2123

24+
(pluginCrossBuild / sbtVersion) := {
25+
scalaBinaryVersion.value match {
26+
case "2.12" => "1.5.8"
27+
case _ => "2.0.0-RC9"
28+
}
29+
}
30+
31+
scalacOptions ++= {
32+
scalaBinaryVersion.value match {
33+
case "2.12" =>
34+
Seq(
35+
"-release:8"
36+
)
37+
case "3" =>
38+
Nil
39+
}
40+
}
41+
2242
scriptedLaunchOpts += s"-Dproject.version=${version.value}"

0 commit comments

Comments
 (0)