From b4e0e899d7aec57b6515cf19766d7a331748b9cd Mon Sep 17 00:00:00 2001 From: Hamza REMMAL Date: Mon, 1 Jul 2024 14:44:50 +0200 Subject: [PATCH] Use sbt-native-packager instead of sbt-pack --- .github/workflows/build-msi.yml | 28 ++++++ dist/LICENSE.rtf | 41 ++++++++ dist/scala.ico | Bin 0 -> 166974 bytes pkgs/msi/README.md | 1 + project/Build.scala | 76 +++++++++------ project/DistributionPlugin.scala | 50 ++++++++++ project/RepublishPlugin.scala | 161 +++++++++++++------------------ project/plugins.sbt | 4 +- 8 files changed, 239 insertions(+), 122 deletions(-) create mode 100644 .github/workflows/build-msi.yml create mode 100644 dist/LICENSE.rtf create mode 100644 dist/scala.ico create mode 100644 pkgs/msi/README.md create mode 100644 project/DistributionPlugin.scala diff --git a/.github/workflows/build-msi.yml b/.github/workflows/build-msi.yml new file mode 100644 index 000000000000..b1a62d464881 --- /dev/null +++ b/.github/workflows/build-msi.yml @@ -0,0 +1,28 @@ + +name: Build the MSI Package + +on: + pull_request: + +jobs: + build: + runs-on: windows-latest + env: + RELEASEBUILD: yes + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '8' + cache: 'sbt' + - name: Build MSI package + run: | + sbt 'dist-win-x86_64/Windows/packageBin' + - name: Upload MSI Artifact + uses: actions/upload-artifact@v4 + with: + name: scala.msi + path: ./dist/win-x86_64/target/windows/scala.msi diff --git a/dist/LICENSE.rtf b/dist/LICENSE.rtf new file mode 100644 index 000000000000..c2c7feee2921 --- /dev/null +++ b/dist/LICENSE.rtf @@ -0,0 +1,41 @@ +{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033 +{\fonttbl{\f0\fswiss\fcharset0 Arial;}} +{\*\generator Riched20 10.0.18362}\viewkind4\uc1 +\pard\sa200\sl276\slmult1\b\f0\fs32 Apache License\par +\b0\fs28 Version 2.0, January 2004\par +\ul http://www.apache.org/licenses/\ulnone\par +\pard\sa200\sl276\slmult1\b\fs24 TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\par +\pard\sa200\sl276\slmult1\b0\fs20 1. Definitions.\par +\pard\sa200\sl276\slmult1 "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.\par + "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.\par + "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50\%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.\par + "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.\par + "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.\par + "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.\par + "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).\par + "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.\par + "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."\par + "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.\par +\pard\sa200\sl276\slmult1\b 2. Grant of Copyright License. \b0 Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.\par +\pard\sa200\sl276\slmult1\b 3. Grant of Patent License. \b0 Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.\par +\pard\sa200\sl276\slmult1\b 4. Redistribution. \b0 You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:\par + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and\par + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and\par + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and\par + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.\par + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.\par +\pard\sa200\sl276\slmult1\b 5. Submission of Contributions. \b0 Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.\par +\pard\sa200\sl276\slmult1\b 6. Trademarks. \b0 This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.\par +\pard\sa200\sl276\slmult1\b 7. Disclaimer of Warranty. \b0 Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.\par +\pard\sa200\sl276\slmult1\b 8. Limitation of Liability. \b0 In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.\par +\pard\sa200\sl276\slmult1\b 9. Accepting Warranty or Additional Liability. \b0 While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.\par +\pard\sa200\sl276\slmult1\qc\b END OF TERMS AND CONDITIONS\par +\pard\sa200\sl276\slmult1\b0\fs20 APPENDIX: How to apply the Apache License to your work.\par +\pard\sa200\sl276\slmult1 To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.\par + Copyright [yyyy] [name of copyright owner]\par + Licensed under the Apache License, Version 2.0 (the "License");\par + you may not use this file except in compliance with the License.\par + You may obtain a copy of the License at\par +\pard\sa200\sl276\slmult1\li720 \ul http://www.apache.org/licenses/LICENSE-2.0\ulnone\par +\pard\sa200\sl276\slmult1 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\par +} diff --git a/dist/scala.ico b/dist/scala.ico new file mode 100644 index 0000000000000000000000000000000000000000..37b4482aac27c3801b550f1183f105a5ea38fa66 GIT binary patch literal 166974 zcmeI534B!5xxjBoAOr|o2!RlG0wIJX5cVCyzDPkUwp!_;uXeY!t+Z94)oN|6+S+He zb$fQP)>2=6F1Xa9vhNAIEQ0JJyX+zN{l9zfVQyw7l8~8@<%_?+=gygs%-s3sJKJ~e zwX7Kad&;u-e+Mh$fjU-8jx#{&tU7MJ99pw@5c2ij9hSAAr)4cn2zg2?^bADp3@j+Z zyPbIV65IvTENc-SE=sbj#dV|hYxM`$@-wi&#yePOIFEB5!7BJC+>d`Z!AR(8SxZ_# zy;^?K^zB#p41{>+`L~EtSZp|nZ+l=3{GVkl{jFs!`#xL?L!gUgEyu~_@fCha`U7gg z87QlFOYqOnQXUJ-Xs4H*z_(qn8eXxi6_3G>ENkWGVHk9?tW_z{z_M0{>txn~^Q>>N z>e-O3otz8N4 z#6RQS8jghmAB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"), - packResourceDir += (republishRepo.value / "etc" -> "etc"), - republishCommandLibs += - ("scala" -> List("scala3-interfaces", "scala3-compiler", "scala3-library", "tasty-core")), - republishCommandLibs += - ("with_compiler" -> List("scala3-staging", "scala3-tasty-inspector", "^!scala3-interfaces", "^!scala3-compiler", "^!scala3-library", "^!tasty-core")), - republishCommandLibs += - ("scaladoc" -> List("scala3-interfaces", "scala3-compiler", "scala3-library", "tasty-core", "scala3-tasty-inspector", "scaladoc")), - Compile / pack := republishPack.value, + Universal / packageName := packageName.value, + // ======== + Universal / stage := (Universal / stage).dependsOn(republish).value, + Universal / packageBin := (Universal / packageBin).dependsOn(republish).value, + Universal / packageZipTarball := (Universal / packageZipTarball).dependsOn(republish).value, + // ======== + Universal / mappings ++= directory(republishRepo.value / "bin"), + Universal / mappings ++= directory(republishRepo.value / "maven2"), + Universal / mappings ++= directory(republishRepo.value / "etc"), + Universal / mappings += (republishRepo.value / "VERSION") -> "VERSION", + // ======== + republishCommandLibs += ("scala" -> List("scala3-interfaces", "scala3-compiler", "scala3-library", "tasty-core")), + republishCommandLibs += ("with_compiler" -> List("scala3-staging", "scala3-tasty-inspector", "^!scala3-interfaces", "^!scala3-compiler", "^!scala3-library", "^!tasty-core")), + republishCommandLibs += ("scaladoc" -> List("scala3-interfaces", "scala3-compiler", "scala3-library", "tasty-core", "scala3-tasty-inspector", "scaladoc")), ) lazy val dist = project.asDist(Bootstrapped) + .settings(packageName := "scala3-" + dottyVersion) .settings( - packArchiveName := "scala3-" + dottyVersion, republishBinDir := baseDirectory.value / "bin", republishCoursier += ("coursier.jar" -> s"https://github.com/coursier/coursier/releases/download/v$coursierJarVersion/coursier.jar"), @@ -2151,9 +2157,9 @@ object Build { ) lazy val `dist-mac-x86_64` = project.in(file("dist/mac-x86_64")).asDist(Bootstrapped) + .settings(packageName := (dist / packageName).value + "-x86_64-apple-darwin") .settings( republishBinDir := (dist / republishBinDir).value, - packArchiveName := (dist / packArchiveName).value + "-x86_64-apple-darwin", republishBinOverrides += (dist / baseDirectory).value / "bin-native-overrides", republishFetchCoursier := (dist / republishFetchCoursier).value, republishLaunchers += @@ -2161,9 +2167,9 @@ object Build { ) lazy val `dist-mac-aarch64` = project.in(file("dist/mac-aarch64")).asDist(Bootstrapped) + .settings(packageName := (dist / packageName).value + "-aarch64-apple-darwin") .settings( republishBinDir := (dist / republishBinDir).value, - packArchiveName := (dist / packArchiveName).value + "-aarch64-apple-darwin", republishBinOverrides += (dist / baseDirectory).value / "bin-native-overrides", republishFetchCoursier := (dist / republishFetchCoursier).value, republishLaunchers += @@ -2171,21 +2177,38 @@ object Build { ) lazy val `dist-win-x86_64` = project.in(file("dist/win-x86_64")).asDist(Bootstrapped) + .enablePlugins(WindowsPlugin) // TO GENERATE THE `.msi` installer + .settings(packageName := (dist / packageName).value + "-x86_64-pc-win32") .settings( republishBinDir := (dist / republishBinDir).value, - packArchiveName := (dist / packArchiveName).value + "-x86_64-pc-win32", republishBinOverrides += (dist / baseDirectory).value / "bin-native-overrides", republishFetchCoursier := (dist / republishFetchCoursier).value, republishExtraProps += ("cli_version" -> scalaCliLauncherVersion), - mappings += (republishRepo.value / "EXTRA_PROPERTIES" -> "EXTRA_PROPERTIES"), republishLaunchers += ("scala-cli.exe" -> s"zip+https://github.com/VirtusLab/scala-cli/releases/download/v$scalaCliLauncherVersionWindows/scala-cli-x86_64-pc-win32.zip!/scala-cli.exe") ) + .settings( + Universal / mappings += (republishRepo.value / "EXTRA_PROPERTIES" -> "EXTRA_PROPERTIES"), + ) + .settings( + Windows / name := "scala", + Windows / mappings := (Universal / mappings).value, + Windows / mappings += (dist.base / "scala.ico") -> "scala.ico", + Windows / packageBin := (Windows / packageBin).dependsOn(republish).value, + Windows / wixFiles := (Windows / wixFiles).dependsOn(republish).value, + maintainer := "Hamza Remmal ", + packageSummary := "Scala", + packageDescription := """Installer for the Scala Programming Language""", + wixProductId := "74ED19C3-74FE-4ABA-AF30-55A06B6322A9", + wixProductUpgradeId := "3E5A1A82-CA67-4353-94FE-5BDD400AF66B", + wixProductLicense := Some(dist.base / "LICENSE.rtf"), + wixProductConfig := + ) lazy val `dist-linux-x86_64` = project.in(file("dist/linux-x86_64")).asDist(Bootstrapped) + .settings(packageName := (dist / packageName).value + "-x86_64-pc-linux") .settings( republishBinDir := (dist / republishBinDir).value, - packArchiveName := (dist / packArchiveName).value + "-x86_64-pc-linux", republishBinOverrides += (dist / baseDirectory).value / "bin-native-overrides", republishFetchCoursier := (dist / republishFetchCoursier).value, republishLaunchers += @@ -2193,9 +2216,9 @@ object Build { ) lazy val `dist-linux-aarch64` = project.in(file("dist/linux-aarch64")).asDist(Bootstrapped) + .settings(packageName := (dist / packageName).value + "-aarch64-pc-linux") .settings( republishBinDir := (dist / republishBinDir).value, - packArchiveName := (dist / packArchiveName).value + "-aarch64-pc-linux", republishBinOverrides += (dist / baseDirectory).value / "bin-native-overrides", republishFetchCoursier := (dist / republishFetchCoursier).value, republishLaunchers += @@ -2333,7 +2356,7 @@ object Build { settings(scala3PresentationCompilerBuildInfo) def asDist(implicit mode: Mode): Project = project. - enablePlugins(PackPlugin, RepublishPlugin). + enablePlugins(UniversalPlugin, RepublishPlugin). withCommonSettings. settings(commonDistSettings). dependsOn( @@ -2429,7 +2452,6 @@ object ScaladocConfigs { } lazy val DefaultGenerationConfig = Def.task { - def distLocation = (dist / Compile / pack).value DefaultGenerationSettings.value } diff --git a/project/DistributionPlugin.scala b/project/DistributionPlugin.scala new file mode 100644 index 000000000000..473ecd8378af --- /dev/null +++ b/project/DistributionPlugin.scala @@ -0,0 +1,50 @@ +import com.typesafe.sbt.packager.Keys.stage +import com.typesafe.sbt.packager.universal.UniversalPlugin +import com.typesafe.sbt.packager.universal.UniversalPlugin.autoImport.Universal +import sbt.* + +/** + * @author Hamza REMMAL (https://github.com/hamzaremmal/) + */ +object DistributionPlugin extends AutoPlugin { + + override def trigger = allRequirements + + override def requires = + super.requires && UniversalPlugin // Require the Universal Plugin to + + object autoImport { + val `universal_project` = settingKey[Project]("???") + val `linux-aarch64_project` = settingKey[Project]("???") + val `linux-x86_64_project` = settingKey[Project]("???") + val `mac-aarch64_project` = settingKey[Project]("???") + val `win-x86_64_project` = settingKey[Project]("???") + + + // ========================== TASKS TO GENERATE THE FOLDER PACKAGE ============================ + val `pack-universal` = + taskKey[File]("Generate the package with the universal binaries (folder)") + val `pack_linux-aarch64` = + taskKey[File]("Generate the package with the linux-aarch64 binaries (folder)") + val `pack_linux-x86_64` = + taskKey[File]("Generate the package with the linux-x86_64 binaries (folder)") + val `pack_mac-aarch64` = + taskKey[File]("Generate the package with the mac-aarch64 binaries (folder)") + val `pack_mac-x86_64` = + taskKey[File]("Generate the package with the mac-x86_64 binaries (folder)") + val `pack_win-x86_64` = + taskKey[File]("Generate the package with the linux-x86_64 binaries (folder)") + } + + import autoImport.* + + override def projectSettings = Def.settings( + `pack-universal` := (`universal_project` / Universal./(stage)).value , + `pack_linux-aarch64` := ???, + `pack_linux-x86_64` := ???, + `pack_mac-aarch64` := ???, + `pack_mac-x86_64` := ???, + `pack_win-x86_64` := ??? + ) + +} diff --git a/project/RepublishPlugin.scala b/project/RepublishPlugin.scala index e4bf40545a6b..f20576948aae 100644 --- a/project/RepublishPlugin.scala +++ b/project/RepublishPlugin.scala @@ -1,22 +1,18 @@ package dotty.tools.sbtplugin -import sbt._ -import xerial.sbt.pack.PackPlugin -import xerial.sbt.pack.PackPlugin.autoImport.{packResourceDir, packDir} -import sbt.Keys._ +import com.typesafe.sbt.packager.universal.UniversalPlugin +import sbt.* +import sbt.Keys.* import sbt.AutoPlugin import sbt.PublishBinPlugin -import sbt.PublishBinPlugin.autoImport._ +import sbt.PublishBinPlugin.autoImport.* import sbt.io.Using -import sbt.util.CacheImplicits._ +import sbt.util.CacheImplicits.* -import scala.collection.mutable import java.nio.file.Files - import java.nio.file.attribute.PosixFilePermission -import java.nio.file.{Files, Path} - -import scala.jdk.CollectionConverters._ +import java.nio.file.Path +import scala.jdk.CollectionConverters.* /** This local plugin provides ways of publishing a project classpath and library dependencies to * .a local repository */ @@ -53,7 +49,7 @@ object RepublishPlugin extends AutoPlugin { } override def trigger = allRequirements - override def requires = super.requires && PublishBinPlugin && PackPlugin + override def requires = super.requires && PublishBinPlugin && UniversalPlugin object autoImport { val republishProjectRefs = taskKey[Seq[ProjectRef]]("fetch the classpath deps from the project.") @@ -338,6 +334,65 @@ object RepublishPlugin extends AutoPlugin { allLaunchers.toSet } + private def generateVersionFile() = Def.task[Unit] { + import scala.util.Try + import java.time.format.DateTimeFormatterBuilder + import java.time.format.SignStyle + import java.time.temporal.ChronoField.* + import java.time.ZoneId + import java.time.Instant + import java.time.ZonedDateTime + import java.time.ZonedDateTime + import java.util.Locale + import java.util.Date + + val base: File = new File(".") // Using the working directory as base for readability + val s = streams.value + val log = s.log + val progVersion = version.value + val distDir = republishRepo.value + + def write(path: String, content: String) { + val p = distDir / path + IO.write(p, content) + } + + val humanReadableTimestampFormatter = new DateTimeFormatterBuilder() + .parseCaseInsensitive() + .appendValue(YEAR, 4, 10, SignStyle.EXCEEDS_PAD) + .appendLiteral('-') + .appendValue(MONTH_OF_YEAR, 2) + .appendLiteral('-') + .appendValue(DAY_OF_MONTH, 2) + .appendLiteral(' ') + .appendValue(HOUR_OF_DAY, 2) + .appendLiteral(':') + .appendValue(MINUTE_OF_HOUR, 2) + .appendLiteral(':') + .appendValue(SECOND_OF_MINUTE, 2) + .appendOffset("+HHMM", "Z") + .toFormatter(Locale.US) + + // Retrieve build time + val systemZone = ZoneId.systemDefault().normalized() + val timestamp = ZonedDateTime.ofInstant(Instant.ofEpochMilli(new Date().getTime), systemZone) + val buildTime = humanReadableTimestampFormatter.format(timestamp) + + // Check the current Git revision + val gitRevision: String = Try { + if ((base / ".git").exists()) { + log.info("[republish] Checking the git revision of the current project") + sys.process.Process("git rev-parse HEAD").!! + } else { + "unknown" + } + }.getOrElse("unknown").trim + + + // Output the version number and Git revision + write("VERSION", s"version:=${progVersion}\nrevision:=${gitRevision}\nbuildTime:=${buildTime}\n") + } + override val projectSettings: Seq[Def.Setting[_]] = Def.settings( republishCoursierDir := republishRepo.value / "coursier", republishLaunchers := Seq.empty, @@ -462,88 +517,8 @@ object RepublishPlugin extends AutoPlugin { val artifacts = republishClasspath.value val launchers = republishFetchLaunchers.value val extraProps = republishWriteExtraProps.value + val versionFile = generateVersionFile().value cacheDir }, - republishPack := { - val cacheDir = republish.value - val s = streams.value - val log = s.log - val distDir = target.value / packDir.value - val progVersion = version.value - - IO.createDirectory(distDir) - for ((path, dir) <- packResourceDir.value) { - val target = distDir / dir - IO.copyDirectory(path, target) - } - - locally { - // everything in this block is copied from sbt-pack plugin - import scala.util.Try - import java.time.format.DateTimeFormatterBuilder - import java.time.format.SignStyle - import java.time.temporal.ChronoField.* - import java.time.ZoneId - import java.time.Instant - import java.time.ZonedDateTime - import java.time.ZonedDateTime - import java.util.Locale - import java.util.Date - val base: File = new File(".") // Using the working directory as base for readability - - // Copy explicitly added dependencies - val mapped: Seq[(File, String)] = mappings.value - log.info("[republish] Copying explicit dependencies:") - val explicitDepsJars = for ((file, path) <- mapped) yield { - log.info(file.getPath) - val dest = distDir / path - IO.copyFile(file, dest, true) - dest - } - - def write(path: String, content: String) { - val p = distDir / path - IO.write(p, content) - } - - val humanReadableTimestampFormatter = new DateTimeFormatterBuilder() - .parseCaseInsensitive() - .appendValue(YEAR, 4, 10, SignStyle.EXCEEDS_PAD) - .appendLiteral('-') - .appendValue(MONTH_OF_YEAR, 2) - .appendLiteral('-') - .appendValue(DAY_OF_MONTH, 2) - .appendLiteral(' ') - .appendValue(HOUR_OF_DAY, 2) - .appendLiteral(':') - .appendValue(MINUTE_OF_HOUR, 2) - .appendLiteral(':') - .appendValue(SECOND_OF_MINUTE, 2) - .appendOffset("+HHMM", "Z") - .toFormatter(Locale.US) - - // Retrieve build time - val systemZone = ZoneId.systemDefault().normalized() - val timestamp = ZonedDateTime.ofInstant(Instant.ofEpochMilli(new Date().getTime), systemZone) - val buildTime = humanReadableTimestampFormatter.format(timestamp) - - // Check the current Git revision - val gitRevision: String = Try { - if ((base / ".git").exists()) { - log.info("[republish] Checking the git revision of the current project") - sys.process.Process("git rev-parse HEAD").!! - } else { - "unknown" - } - }.getOrElse("unknown").trim - - - // Output the version number and Git revision - write("VERSION", s"version:=${progVersion}\nrevision:=${gitRevision}\nbuildTime:=${buildTime}\n") - } - - - distDir - } ) } diff --git a/project/plugins.sbt b/project/plugins.sbt index 59e58007a4a0..96f767726315 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -12,8 +12,6 @@ addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.21") addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1") -addSbtPlugin("org.xerial.sbt" % "sbt-pack" % "0.17") - addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.5") addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") @@ -21,3 +19,5 @@ addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.2") addSbtPlugin("ch.epfl.scala" % "sbt-tasty-mima" % "1.0.0") + +addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.7.6")