Skip to content

Conversation

gnodet
Copy link
Member

@gnodet gnodet commented May 12, 2025

Overview

This PR improves the build scripts and demo integration in JLine by:

  • Merging the build and build.config files into a single build script
  • Creating a Windows equivalent build.bat script
  • Adding automatic detection and inclusion of the --enable-native-access=ALL-UNNAMED flag for JDK 16+
  • Moving the BasicDynamic demo from console-ui to the demo directory
  • Integrating the ConsoleUI demo into the build demo command
  • Removing old shell scripts in the demo/ and console-ui/ directories
  • Standardizing demo execution through the build script

Changes

Build Script Improvements

  • Consolidated all command functions into a single build script
  • Removed the need for the separate build.config file
  • Updated the usage information to include all available commands
  • Created a Windows equivalent batch script (build.bat)

Demo Integration

  • Added consoleui demo type to the build demo command
  • Moved BasicDynamic.java from console-ui to demo/src/main/java/org/jline/demo/consoleui/
  • Removed the console-ui scripts (jline-console-ui.sh and jline-console-ui.bat)
  • Removed the old demo scripts (jline-common.sh, jline-gogo.sh, etc.)

JDK Support

  • Added automatic detection of JDK version to conditionally add --enable-native-access=ALL-UNNAMED flag when running on JDK 16+
  • Maintained compatibility with older JDK versions

Testing

All demos have been tested and work correctly:

  • ./build demo gogo
  • ./build demo repl
  • ./build demo password
  • ./build demo consoleui

The Windows batch script has been implemented with the same functionality as the Unix script.

Benefits

  • Simplified build and demo execution
  • Improved cross-platform support
  • Reduced duplication and maintenance overhead
  • Better organization of demo code
  • Automatic JDK feature detection

- Merge build and build.config files into a single build script
- Create Windows equivalent build.bat script
- Add --enable-native-access=ALL-UNNAMED flag for JDK 16+
- Move BasicDynamic demo from console-ui to demo directory
- Integrate ConsoleUI demo into build demo command
- Remove old shell scripts in demo/ and console-ui/ directories
- Standardize demo execution through build script
@gnodet gnodet changed the title Improve build scripts and demo integration chore: improve build scripts and demo integration May 13, 2025
@gnodet gnodet merged commit db37cee into master May 13, 2025
9 checks passed
@gnodet gnodet deleted the feat/improve-build-scripts branch May 13, 2025 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant