We welcome contributions to SWT Evolve! This is a modern implementation of the Standard Widget Toolkit (SWT). Please follow these guidelines to ensure a smooth and effective contribution process.
Before contributing, make sure you have the following installed:
- Java JDK 17+ - for building and running Java components
- Flutter SDK - Install Flutter (Select OS and Desktop)
- Dart SDK - comes with Flutter
- Git - for version control
- Gradle - for building
- Eclipse IDE or IntelliJ IDEA
- Install Visual Studio Build Tools:
winget install Microsoft.VisualStudio.2022.BuildTools --silent --override "--wait --quiet --add ProductLang En-us --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended"
-
Clone the repository:
git clone git@github.com:equodev/swt-evolve.git cd swt-evolve -
Import project in your favorite IDE:
-
Install Flutter dependencies:
cd flutter-lib flutter pub get -
Generate Dart JSON serialization code inside the flutter-lib project:
dart run build_runner build
-
Build native SWT implementation:
./gradlew :swt_native:assemble
The project consists of a few interconnected modules:
- flutter-lib/: Flutter application implementing SWT widgets and communication layer
- swt_native/: Platform-specific SWT implementations (Java) with native bindings
- examples/: Examples and snippets for testing and demonstration
-
Fork the repository and create a new branch for your feature or bug fix:
git checkout -b feature/your-feature-name
-
Make your changes following the project conventions and architecture patterns
-
Add tests in
swt_native -
Run code quality checks:
# Format Dart code cd flutter-lib flutter analyze
-
Submit a pull request with:
- Clear description of your changes
- Screenshots or examples if UI-related
- Test results demonstrating compatibility
- Any relevant documentation updates
# Flutter builds
cd flutter-lib
flutter build macos # macOS native
# or
flutter build windows # macOS native
# or
flutter build linux # Linux native (coming soon)
# Build all platform JARs
./gradlew buildAllPlatforms
# Or build platform-specific JARs, like:
./gradlew <platform>Jar
# where <platform> could be windows-x86_64, windows-aarch64, macos-x86_64, or macos-aarch64. Support for Linux is coming soon!- Always look at existing components to understand patterns before implementing new ones
- Use the existing communication layer between Java and Flutter
- Add examples in the
examplesfolder when contributing new widgets - Add tests in
swt_native
flutter-lib/lib/src/swt/: SWT API classes (.dart and .g.dart files)flutter-lib/lib/src/impl/: Flutter widget implementationsflutter-lib/lib/src/comm/: Communication layer between Java and Flutterswt_native/src/main/java/: Core Java SWT implementationswt_native/src/{os}/java/: Platform-specific native implementations
If you find a bug or have a feature request:
- Check existing issues first
- Open a new issue on GitHub with:
- Clear description of the problem
- Steps to reproduce
- Expected vs actual behavior
- Relevant logs, screenshots, or code snippets
- Platform and version information
Before submitting a PR, ensure:
- All existing tests pass
- New functionality is covered by tests
- Code follows established patterns
- Examples are provided for new widgets
- Documentation is updated if needed
- Code is properly formatted
Thank you for contributing to SWT Evolve!