From 584ab83d374c4cd182fb52b62cd1069146332afe Mon Sep 17 00:00:00 2001 From: Eric K Richardson Date: Fri, 8 Oct 2021 10:22:39 -0700 Subject: [PATCH] Update items for new release (#193) * 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 --- .github/workflows/ci.yml | 4 ++-- .github/workflows/release.yml | 2 +- .jvmopts | 0 README.md | 5 +++-- build.sbt | 28 ++-------------------------- 5 files changed, 8 insertions(+), 31 deletions(-) delete mode 100644 .jvmopts diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c3c914c..825a55ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f0647ee9..75e075b0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 }} diff --git a/.jvmopts b/.jvmopts deleted file mode 100644 index e69de29b..00000000 diff --git a/README.md b/README.md index e03c6de6..dc709c29 100644 --- a/README.md +++ b/README.md @@ -97,12 +97,12 @@ 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` @@ -110,6 +110,7 @@ At a high level, the process is as follows: ## Versions +Release [1.4.5](https://github.com/ekrich/sconfig/releases/tag/v1.4.5) - (2021-10-08)
Release [1.4.4](https://github.com/ekrich/sconfig/releases/tag/v1.4.4) - (2021-05-13)
Release [1.4.3](https://github.com/ekrich/sconfig/releases/tag/v1.4.3) - (2021-05-12)
Release [1.4.2](https://github.com/ekrich/sconfig/releases/tag/v1.4.2) - (2021-04-01)
diff --git a/build.sbt b/build.sbt index 4bfb8e48..2c014c6d 100644 --- a/build.sbt +++ b/build.sbt @@ -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", @@ -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 => @@ -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()