Commit Graph

71 Commits

Author SHA1 Message Date
eugene yokota 029c45bb81
[1.x] fix: handle --script-version sbt 2.x project dirs (#8715) (#8737)
When in an sbt 2.x project directory, the script used to delegate to sbtn
before checking --script-version, so 'sbt --script-version' ran sbtn and
failed. Now we print the script version and exit before the native client
branch.

Co-authored-by: PandaMan <joewartson757@gmail.com>
2026-02-14 03:50:50 -05:00
eugene yokota e82acdfe56
[1.x] require coreutils for RPM (#8712) (#8713)
**Problem**
Apparently sbt can fail when it doesn't have rm,
which can happen "when building relocatable RPM's and building an OS image in a chroot."

**Solution**
It was suggested that we require coreutils.
2026-02-07 19:20:46 -05:00
Pluto 59f4bd743e [2.x] fix: restore CLI precedence over .sbtopts
According to the issue, `.sbtopts` entries are appended after
CLI args in sbt 1.12.x, so `.sbtopts` JVM memory settings (e.g., `-Xmx2g`) override CLI `--mem`,
causing invalid JVM settings.
2026-02-07 01:58:36 -05:00
circlecrystalin 02cd20e928 [2.x] fix: Fixes the handling of special characters in dot files (#8558)
- Replace 'eval echo $line' with 'printf "%s\n" "$line"' in loadConfigFile()
- Prevents shell expansion of special characters like |, *, &, etc.
- Fixes issue where properties with pipes, wildcards, and ampersands
  caused 'command not found' or 'unexpected' errors
- Add test to verify special characters are handled correctly on all platforms
2026-02-07 01:58:05 -05:00
Eugene Yokota 1a50aa32f2 sbt 1.12.2 2026-02-04 00:23:22 -05:00
eugene yokota 92a4af4f97
[1.x] Bump to sbtn 1.12.1 (#8684) 2026-02-03 21:39:44 -05:00
eugene yokota d29e096a37
[1.x] fix: Handle paths with parentheses in sbt.bat on Windows (#8656) (#8682)
Windows CMD interprets parentheses as special syntax for command grouping.
When the project directory path contains parentheses (e.g., in username),
the batch script fails with ') was unexpected at this time.' error.

This fix stores the current directory in a variable using delayed expansion
(!CURRENT_DIR!) instead of using %CD% directly, which properly handles
paths containing parentheses and other special characters.

Fixes #8644
2026-02-03 00:30:29 -05:00
E.G b4e3845867 fix: Handle -X JVM options on command line (fixes #5742) (#8566)
Previously, passing JVM options like -Xmx1G directly on the command
line would result in an error:

  sbt -v -Xmx1G
  [error] Expected ';'
  [error] -Xmx1G
  [error]       ^

This was because -X options were being passed to sbt as commands
instead of being recognized as JVM arguments.

Changes:
- Added handling for -X options in sbt.bat to pass them to the JVM
- Updated help text to document this feature
- Added integration tests for the new functionality
2026-01-17 17:46:55 -05:00
MkDev11 c50f5b7fd1 [2.x] fix: Fix sbt new argument parsing on Windows (#8509)
Only recombine split -- arguments after new/init command.

Fixes #7507
2026-01-17 17:46:33 -05:00
MkDev11 e756c6dc88 [2.x] fix: Skip native client for sbt new/init commands (#8512)
Fixes #7497
2026-01-17 17:46:09 -05:00
SID 1fd24af87e
[1.x] bport: Fix sbtopts files priority in sbt launch script (#8520)
- Change from prepend to append for machine/dist sbtopts
- Change project .sbtopts from prepend to append so it appears last
- Project-level .sbtopts now correctly overrides machine-wide configs
- Add integration tests to verify sbtopts priority order
- Extend testOutput to support dist and machine sbtopts testing
- Copy staging directory to temp location to avoid modifying staging dir
2026-01-13 14:43:22 -05:00
eugene yokota 622add0e61 [2.x] ci: Integrate launcher package (#8485)
**Problem/Solution**
This is a follow up to launcher package migrating to sbt 1.x.
This joins the launcher package into the main build.
2026-01-11 22:30:50 -05:00
Eugene Yokota 5bdb08ea23 ci: Use slash syntax in build.sbt 2026-01-11 21:43:49 -05:00
MkDev11 08469d8b8c [2.x] fix: Upgrade launcher-package to sbt 1.10.7 and replace dispatch-http (#8465)
Fixes #7826

Changes:
- Upgrade sbt version from 0.13.18 to 1.10.7 in launcher-package/project/build.properties
- Remove dead dispatch-http 0.8.10 dependency from plugins.sbt
- Update sbt-native-packager from 1.7.6 to 1.10.4 (com.github.sbt)
- Update sbt-pgp from 2.1.2 to 2.3.1
- Replace all dispatch.classic._ HTTP calls with Java URL.openStream()

The dispatch-http library is dead and doesn't support sbt 1.x. This change
uses standard Java networking APIs for HTTP downloads, eliminating the
dependency on outdated libraries.

All HTTP download operations now use:
- java.net.URL.openConnection()
- InputStream with buffered reading
- Proper resource cleanup with try-finally blocks

- Removes the sbt-export-repo plugin dependency
- Defines exportRepo and exportRepoDirectory settings locally
- Removes ExportRepoPlugin from dist project
- Fixes exportRepo task to not reference itself

* fix: Update PackageSignerPlugin.scala for sbt 1.x compatibility
- Use withExtension instead of copy(extension = ...) for Artifact
- Update Classpaths.publishConfig to use sbt 1.x signature with all required parameters
- Use new slash syntax for scoped keys (pgpSigner / skip instead of skip in pgpSigner)

* fix: Use computed status instead of status key in PackageSignerPlugin

* fix: Use withRevision instead of copy for ModuleID in build.sbt

- Add scala.sys.process._ import for shell command execution (! method)
- Fix resolvers setting to use new slash syntax and proper Option handling
- Fix publish/publishLocal to use {} instead of () to avoid deprecation warning
- Fix Classpaths.publishTask to use variant without delivery key (deprecated since 1.1.1)
- Add scala.sys.process._ import for shell command execution
- Fix publish/publishLocal to use {} instead of ()
- Remove problematic resolvers setting that caused task/setting dependency issues
- Use IvyActions.publish directly instead of deprecated Classpaths.publishTask
- Fix ModuleID.copy to use withRevision
- Fix Artifact.copy to use withExtension
- Use computed status value instead of status key

Build now compiles successfully with sbt 1.10.7.
2026-01-11 21:39:44 -05:00
eugene yokota 03d57c5803
Merge pull request #8413 from sideeffffect/1.11.x-JDK_JAVA_OPTIONS
[1.x] Handle JDK_JAVA_OPTIONS
2025-12-17 18:09:27 -05:00
Ondra Pelech d48895df85 Handle JDK_JAVA_OPTIONS 2025-12-12 15:44:25 +01:00
xuwei-k 70960744e7 Scala 2.12.21 2025-12-09 17:28:03 +09:00
Eugene Yokota bd460ae536 Test using JDK 25 2025-09-28 05:53:40 -04:00
Eugene Yokota 51aa789346 Suppress JDK 25 warnings 2025-09-28 04:17:50 -04:00
Eugene Yokota 9186f23839 sbt 1.11.6 2025-09-06 18:42:39 -04:00
Eugene Yokota 94d20176d9 sbtn 1.11.5 2025-08-24 05:50:16 -04:00
Eugene Yokota af967705e9 Make integrationTest sequential 2025-08-24 04:28:57 -04:00
Eugene Yokota 70070fcf06 Comment out version number tests 2025-08-24 02:04:34 -04:00
Eugene Yokota 49e46c2451 Retry on IO error 2025-08-24 02:04:34 -04:00
Eugene Yokota 2de01a8a05 [1.x] --jvm-client
This adds --jvm-client to the runner script.
2025-08-24 00:32:37 -04:00
Eugene Yokota b2afa2114f ci: Split server-test 2025-08-24 00:17:58 -04:00
Eugene Yokota af714b8318 fix: Avoid printing to stdout
**Problem**
The runner script prints out "copying runtime jar" etc to stdout.

**Solution**
This removes the log, and moves other logs to stderr.
2025-03-25 01:34:53 -04:00
Eugene Yokota 89ff2440ef fix: Avoid creating target on sbt -V
**Problem**
sbt -V tries to show both the sbt version and the runner version,
and ends up creating target directory even on a non-sbt directory.

**Solution**
If the current directory doesn't have a build, just display the runner version.
2025-03-16 02:08:33 -04:00
Eugene Yokota 290431bfc5 Zinc 1.10.8 + sbtn 1.10.8 2025-03-03 12:22:09 -05:00
Eugene Yokota 7409de3c40 fix: sbt init
**Problem**
`sbt init` no longer works because of --allow-empty check.

**Solution**
Skip allow empty check for sbt init.
2025-03-02 21:02:55 -05:00
Eugene Yokota cd58481811 --allow-empty fixes
**Problem**
1. Currently users are automatically opted into -create-sbt,
   somewhat implicitly.
2. When somehow they are not, the check mechanism currently blocks for input.

**Solution**
1. Support a new location for sbtopts file under XSG_CONFIG_HOME/sbt
2. Rename -create-sbt to --allow-empty, and don't opt everyone in
3. Exit 1 instead of blocking for input
2024-12-22 02:21:38 -05:00
friendseeker 96902ede84 Bump minimum Java version to 8 2024-11-18 22:44:09 -08:00
Eugene Yokota 8ab2a23f11 sbtn 1.10.5 2024-11-03 03:33:25 -05:00
Eugene Yokota 634a5840ae sbt 1.10.4 2024-10-28 06:09:14 -04:00
Friendseeker f6d7f33261 Bump sbt to 1.10.3 2024-10-21 17:06:31 -07:00
Eugene Yokota d9bc88ab8b Default to sbtn for sbt 2.x
This changes the runner script logic to default to sbtn when sbt version is 2.x.
2024-10-18 01:14:28 -04:00
Seth Tisue f06b7622be Scala 2.12.20 (was .19) 2024-10-10 12:53:31 -07:00
Eugene Yokota ae1f829f9f Include universal macOS sbtn 2024-05-05 22:34:58 -04:00
Eugene Yokota a6bdf9dc2e Fix CI
It seems like the latest macOS image no longer supports JDK 8.
2024-05-05 01:02:19 -04:00
Seth Tisue 735214afd0 Scala 2.12.19 (was 2.12.18), scala-xml 2.2.0 (was 2.1.0) 2024-03-16 11:39:55 +01:00
Domantas Petrauskas bf8e92be74
Fix VM argument passing by .sbtopts file and JAVA_TOOL_OPTIONS environmental variable (#7393)
Fixes #7387

* Fix VM argument passing by .sbtopts file and JAVA_TOOL_OPTIONS environmental variable, improve launcher script integration test setup
* Fix sbt process not exiting in launcher test for --sbt-version
* Fix JAVA_TOOL_OPTIONS in launcher for linux/mac
2023-10-06 12:31:27 -04:00
João Costa bc93eceff7
Fix java opts load order on windows 2023-09-06 16:34:02 +02:00
Julien Richard-Foy 4111a8fd2a Add the aarch64 binaries for macOS to the sbtn mappings 2023-07-10 16:18:12 +02:00
Julien Richard-Foy 72bfb3f45a Transfer copyright to Scala Center 2023-06-20 16:39:07 +02:00
Matthias Kurz 7256fb2725
sbtn 1.9.0 2023-06-06 17:12:41 +02:00
Matthias Kurz 4b769d06c3
Upgrade to latest Scala 2.12.x in launcher-package 2023-06-04 01:08:17 +02:00
Eugene Yokota b0b7705739 Fixes Debian 11 compat
Fixes https://github.com/sbt/sbt/issues/7118

Problem
-------
sbtn 1.8.1 was built using ubuntu-latest, which meant picking up newer
glibc.

Solution
--------
This downgraded the ubuntu machine to build sbtn.
2023-01-04 17:19:29 -05:00
Matthias Kurz ac638a764d
Use latest sbtn 2023-01-03 16:02:18 +01:00
Matthias Kurz 5fa46859d2
Make use of sbtn aarch64 binary where possible 2023-01-03 12:41:49 +01:00
Eugene Yokota 79ea2bdaf2 sbtn 1.7.0 2022-07-10 15:43:25 -04:00