BlueJ Extender is a state-of-the-art framework for developing BlueJ extensions. By leveraging the powerful Gradle build-automation tool BlueJ Extender gives you the tools you need to quickly develop high-quality BlueJ extensions. Because remember: the only way to go fast is to go well.
- Easy to use project template that shows how to use acceptance-tests, unit-tests and BlueJ's label mechanism.
- Automatically detects and reports Swing EDT violations in your extension.
- Out-of-the-box support for Cucumber tests that interact with your extension through the BlueJ GUI like a normal user would (can be disabled completely if need be).
- Integrates with Travis continuous integration which allows you to easily test your extension on multiple BlueJ versions and multiple JDKs. This includes running the Cucumber tests in a headless environment. All this is done with very few lines of code in a simple configuration file (can be disabled completely if need be).
- One-line command for compiling your extension into a BlueJ-compatible extension JAR.
- Transparently explodes third-party libraries into the extension JAR during build and testing.
- Easily launch any BlueJ version with your extension installed for manual testing and automatically cleans up afterwards.
- Automatically downloads and extracts any BlueJ version to a local directory.
- Integrates with SwingExplorer which provides useful utilities for developing and debugging Swing applications. One-line command for launching any BlueJ version with your extension and SwingExplorer.
- Supports all major operating systems: Linux, Windows and OS X.
- Supports all Gradle aware IDEs and tools. See Gradle Tooling for more information.
Clone the project (or use the GitHub download features):
git clone https://github.com/olerass/bluej-extender <project name>
Then run setup and follow the instructions:
Linux/OS X
cd <project name>
chmod +x gradlew
./gradlew setup -q
Windows
cd <project name>
gradlew setup -q
BlueJ Extender provides a number of Gradle tasks for performing the most common operations. All BlueJ related tasks accept a -PbluejVer=<ver>
argument specifying the BlueJ version to use for the task. For example, gradle cucumber -PbluejVer=3.1.0
runs all acceptance-tests on a locally downloaded copy of BlueJ 3.1.0. Without the argument the latest version of BlueJ is used unless overriden by the setDefaultBlueJVer task.
####Primary tasks:
runWithBlueJ [-PbluejVer=<ver>] [-Pswxpl]
Runs the specified (or latest) local version of BlueJ with the extension installed and removes it afterwards. Use the-Pswxpl
switch to run with SwingExplorer.cucumber [-PbluejVer=<ver>]
Runs all acceptance-tests using the specified (or latest) local version of BlueJ.check [-PbluejVer=<ver>]
Runs all tests including acceptance-tests using the specified (or latest) local version of BlueJ.jar
Assembles a BlueJ compatible extension JAR in the bluej-extension subproject build folder.setBlueJBuildVer [-PbluejVer=<ver>]
Sets the BlueJ version to build the extension against to the specified (or latest) version of BlueJsetDefaultBlueJVer [-PbluejVer=<ver>]
Sets the default BlueJ version to use for all tasks to the specified (or latest) version.
####Other tasks:
getBlueJ [-PbluejVer=<ver>]
Downloads the specified (or latest) version of BlueJ into the local BlueJ directory bluej-dist.installIntoBlueJ [-PbluejVer=<ver>]
Builds and installs the extension into the specified (or latest) local version of BlueJ.uninstallFromBlueJ [-PbluejVer=<ver>]
Removes the extension, if present, from the specified (or latest) local version of BlueJ.
Bluej-Extender comes with a .travis.yml
file preconfigured to run all tests (including acceptance-tests) on the three latest versions of BlueJ. You can take advantage of this by forking or creating your BlueJ-Extender based extension project on GitHub and then setup Travis integration.
The following projects are built upon BlueJ Extender:
- ASEPSiS-BlueJ
Prototype extension that (some day) integrates hand-ins and feedback directly into the core experience of BlueJ. This is the project from which BlueJ Extender originates. It includes many examples of best-practices when designing BlueJ extensions, including how to write effective Cucumber acceptance-tests, how to do proper unit testing, how to extend BlueJ outside the extension API, and how to design a testable GUI using modern tools and techniques.