Skip to content

Commit 0c9c14f

Browse files
authored
Merge pull request #76 from eed3si9n/wip/bump
Update CI settings and package
2 parents 938fa22 + 0140a4a commit 0c9c14f

File tree

42 files changed

+345
-289
lines changed

Some content is hidden

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

42 files changed

+345
-289
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,21 @@ jobs:
2323
strategy:
2424
matrix:
2525
os: [ubuntu-latest]
26-
scala: [2.12.14]
27-
java: [adopt@1.8]
26+
scala: [2.12.17]
27+
java: [temurin@8]
2828
runs-on: ${{ matrix.os }}
2929
steps:
3030
- name: Checkout current branch (full)
3131
uses: actions/checkout@v2
3232
with:
3333
fetch-depth: 0
3434

35-
- name: Setup Java and Scala
36-
uses: olafurpg/setup-scala@v13
35+
- name: Setup Java (temurin@8)
36+
if: matrix.java == 'temurin@8'
37+
uses: actions/setup-java@v2
3738
with:
38-
java-version: ${{ matrix.java }}
39+
distribution: temurin
40+
java-version: 8
3941

4042
- name: Cache sbt
4143
uses: actions/cache@v2
@@ -70,19 +72,21 @@ jobs:
7072
strategy:
7173
matrix:
7274
os: [ubuntu-latest]
73-
scala: [2.12.14]
74-
java: [adopt@1.8]
75+
scala: [2.12.17]
76+
java: [temurin@8]
7577
runs-on: ${{ matrix.os }}
7678
steps:
7779
- name: Checkout current branch (full)
7880
uses: actions/checkout@v2
7981
with:
8082
fetch-depth: 0
8183

82-
- name: Setup Java and Scala
83-
uses: olafurpg/setup-scala@v13
84+
- name: Setup Java (temurin@8)
85+
if: matrix.java == 'temurin@8'
86+
uses: actions/setup-java@v2
8487
with:
85-
java-version: ${{ matrix.java }}
88+
distribution: temurin
89+
java-version: 8
8690

8791
- name: Cache sbt
8892
uses: actions/cache@v2
@@ -96,12 +100,12 @@ jobs:
96100
~/Library/Caches/Coursier/v1
97101
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
98102

99-
- name: Download target directories (2.12.14)
103+
- name: Download target directories (2.12.17)
100104
uses: actions/download-artifact@v2
101105
with:
102-
name: target-${{ matrix.os }}-2.12.14-${{ matrix.java }}
106+
name: target-${{ matrix.os }}-2.12.17-${{ matrix.java }}
103107

104-
- name: Inflate target directories (2.12.14)
108+
- name: Inflate target directories (2.12.17)
105109
run: |
106110
tar xf targets.tar
107111
rm targets.tar

.scalafmt.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version = 2.0.0
2+
maxColumn = 120
3+
project.git = true
4+
5+
# http://docs.scala-lang.org/style/scaladoc.html recommends the JavaDoc style.
6+
# scala/scala is written that way too https://github.com/scala/scala/blob/v2.12.2/src/library/scala/Predef.scala
7+
docstrings = JavaDoc
8+
9+
# This also seems more idiomatic to include whitespace in import x.{ yyy }
10+
spaces.inImportCurlyBraces = true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Each of the files should have the following contents.
4545

4646
`project/plugins.sbt`:
4747

48-
addSbtPlugin("com.typesafe.sbt" % "sbt-pom-reader" % "x.y.z")
48+
addSbtPlugin("com.github.sbt" % "sbt-pom-reader" % "x.y.z")
4949

5050

5151
## Configuring projects

build.sbt

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
1-
ThisBuild / organization := "com.typesafe.sbt"
1+
val mvnVersion = "3.8.2"
2+
val mvnResolverVersion = "1.7.2"
3+
val scala212 = "2.12.17"
4+
// val scala210 = "2.10.7"
5+
6+
ThisBuild / organization := "com.github.sbt"
27
ThisBuild / licenses := Seq("Apache-2.0" -> url("http://opensource.org/licenses/Apache-2.0"))
38
ThisBuild / developers := List(Developer("", "", "", url("https://github.com/sbt/sbt-pom-reader/graphs/contributors")))
49
ThisBuild / homepage := Some(url("https://github.com/sbt/sbt-pom-reader"))
10+
ThisBuild / dynverSonatypeSnapshots := true
11+
ThisBuild / version := {
12+
val orig = (ThisBuild / version).value
13+
if (orig.endsWith("-SNAPSHOT")) "2.2.0-SNAPSHOT"
14+
else orig
15+
}
16+
ThisBuild / scalaVersion := scala212
17+
ThisBuild / crossScalaVersions := Seq(scala212)
518

19+
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("8"))
620
ThisBuild / githubWorkflowBuild := Seq(WorkflowStep.Sbt(List("test", "scripted")))
721
ThisBuild / githubWorkflowTargetTags ++= Seq("v*")
822
ThisBuild / githubWorkflowPublish := Seq(
@@ -17,14 +31,10 @@ ThisBuild / githubWorkflowPublish := Seq(
1731
)
1832
)
1933

20-
val mvnVersion = "3.8.2"
21-
val mvnResolverVersion = "1.7.2"
22-
2334
lazy val root = (project in file("."))
2435
.enablePlugins(SbtPlugin)
2536
.settings(nocomma {
2637
name := "sbt-pom-reader"
27-
pluginCrossBuild / sbtVersion := "1.2.8"
2838

2939
libraryDependencies ++= Seq(
3040
"org.apache.maven" % "maven-embedder" % mvnVersion
@@ -46,4 +56,10 @@ lazy val root = (project in file("."))
4656
scriptedLaunchOpts := scriptedLaunchOpts.value ++ Seq("-Dproject.version=" + version.value)
4757
scriptedLaunchOpts ++= Seq("-Dplugin.version=" + version.value)
4858
scriptedBufferLog := true
59+
(pluginCrossBuild / sbtVersion) := {
60+
scalaBinaryVersion.value match {
61+
case "2.10" => "0.13.18"
62+
case "2.12" => "1.2.8"
63+
}
64+
}
4965
})

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.5.5
1+
sbt.version=1.9.0-RC2

project/plugins.sbt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
addSbtPlugin("com.eed3si9n" % "sbt-nocomma" % "0.1.0")
2-
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.9")
3-
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.13.0")
1+
addSbtPlugin("com.eed3si9n" % "sbt-nocomma" % "0.1.1")
2+
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
3+
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.14.2")
4+
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3")

src/main/scala/com/typesafe/sbt/pom/MavenPomResolver.scala

Lines changed: 0 additions & 84 deletions
This file was deleted.

src/main/scala/com/typesafe/sbt/pom/SbtPomKeys.scala

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)