Skip to content

Commit

Permalink
Update items for new release (#193)
Browse files Browse the repository at this point in the history
* Update setup-scala

* Try Java 1.8 in CI vs 8

* Remove build code now that scala-2, scala-3 shared src is supported

* Fix readme except for the release date

* Update build for Scala 2.12.15

* Put hopeful release date

* Update release date
  • Loading branch information
ekrich authored Oct 8, 2021
1 parent 85f8f0f commit 584ab83
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
java: [ '8', '11', '17' ]
java: [ '1.8', '11', '17' ]
name: Test using Java ${{ matrix.java }}
steps:
- uses: actions/checkout@v2
- name: Setup Scala and Java
uses: olafurpg/setup-scala@v12
uses: olafurpg/setup-scala@v13
with:
java-version: ${{ matrix.java }}
- run: sbt +test
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: olafurpg/setup-scala@v12
- uses: olafurpg/setup-scala@v13
- run: sbt ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
Expand Down
Empty file removed .jvmopts
Empty file.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,20 @@ At a high level, the process is as follows:
(The old dependency needs to stay on the classpath until after the rule runs, because the
code must compile before it will run.)

3. Run the scalafix sbt task shown below to apply the rule using the version of `sconfig`
3. Run the scalafix sbt task shown below to apply the rule using the version of `sconfig`
selected. Replace the `x.y.z` below with the version (must be greater than version `1.4.5`
when scalafix was added):

```
scalafixAll dependency:ReplaceTypesafeConfig@org.ekrich:sconfig-scalafix:1.4.5
scalafixAll dependency:ReplaceTypesafeConfig@org.ekrich:sconfig-scalafix:x.y.x
```

4. Remove the old config dependency from the project's `libraryDependencies`
5. Commit the changes

## Versions

Release [1.4.5](https://github.com/ekrich/sconfig/releases/tag/v1.4.5) - (2021-10-08)<br/>
Release [1.4.4](https://github.com/ekrich/sconfig/releases/tag/v1.4.4) - (2021-05-13)<br/>
Release [1.4.3](https://github.com/ekrich/sconfig/releases/tag/v1.4.3) - (2021-05-12)<br/>
Release [1.4.2](https://github.com/ekrich/sconfig/releases/tag/v1.4.2) - (2021-04-01)<br/>
Expand Down
28 changes: 2 additions & 26 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,13 @@ def versionFmt(out: sbtdynver.GitDescribeOutput): String = {
else nextVersion + "-SNAPSHOT"
}

val scalacOpts = List(
"-unchecked",
"-deprecation",
"-feature",
val dotcOpts = List("-unchecked", "-deprecation", "-feature")
val scalacOpts = dotcOpts ++ List(
//"-Ywarn-unused:imports", // no 2.11 - maybe time for sbt-tpolecat
"-Xsource:3"
//"-Xlint:nonlocal-return" // no 2.11/2.12
)

val dotcOpts = List("-unchecked", "-deprecation", "-feature")

Compile / console / scalacOptions --= Seq(
"-Xlint:nonlocal-return", // for 2.12 console
"-Ywarn-unused:imports",
Expand Down Expand Up @@ -117,7 +113,6 @@ lazy val sconfig = crossProject(JVMPlatform, NativePlatform, JSPlatform)
scalacOptions ++= {
if (isScala3.value) dotcOpts else scalacOpts
},
sharedScala2or3Source,
libraryDependencies ++= {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, n)) if n <= 12 =>
Expand Down Expand Up @@ -221,25 +216,6 @@ lazy val `scalafix-tests` = (project in file("scalafix/tests"))
.dependsOn(`scalafix-rules`)
.enablePlugins(ScalafixTestkitPlugin)

lazy val sharedScala2or3Source: Seq[Setting[_]] = Def.settings(
Compile / unmanagedSourceDirectories ++= {
val projectDir = baseDirectory.value.getParentFile()
sourceDir(projectDir, scalaVersion.value)
}
)

// For Scala 2/3 enums
def sourceDir(projectDir: File, scalaVersion: String): Seq[File] = {
def versionDir(versionDir: String): File =
projectDir / "shared" / "src" / "main" / versionDir

CrossVersion.partialVersion(scalaVersion) match {
case Some((3, _)) => Seq(versionDir("scala-3"))
case Some((2, _)) => Seq(versionDir("scala-2"))
case _ => Seq() // unknown version
}
}

lazy val sharedJvmNativeSource: Seq[Setting[_]] = Def.settings(
Compile / unmanagedSourceDirectories += {
val projectDir = baseDirectory.value.getParentFile()
Expand Down

0 comments on commit 584ab83

Please sign in to comment.