Cassowary-java is a pure Java implementation of the Cassowary constraint-solving algorithm.
Cassowary is the algorithm that forms the core of the OS X and iOS visual layout mechanism.
The easiest way to use Cassowary in you Java project is using Gradle.
Just add the JCentre Maven repository url to your project's build.gradle
:
repositories { jcenter() }
Then add the Cassowary dependency:
dependencies { compile "org.pybee:cassowary:0.0.1" }
Gradle can also be used to manage the build and release of Cassowary-java. To build the Cassowary release jar file, run:
./gradlew build
This will also run the test suite. Assuming everything works, you can publish to a Maven repository. Make sure you have a gradle.properties file in the root directory of the project; it should contain the following:
bintray_user=<your bintray username> bintray_api_key=<your bintray API key>
If this file is correct, you can publish using:
./gradlew bintrayUpload
Cassowary-java is part of the BeeWare suite. You can talk to the community through:
- @pybeeware on Twitter
- The BeeWare Users Mailing list, for questions about how to use the BeeWare suite.
- The BeeWare Developers Mailing list, for discussing the development of new features in the BeeWare suite, and ideas for new tools for the suite.
The Cassowary community also has a mailing list; it provides more general assistance regarding the Cassowary algorithm itself.
If you experience problems with this backend, log them on GitHub. If you want to contribute code, please fork the code and submit a pull request.
The Cassowary implementation is a fork of the original Java library published by Greg J. Badros.
The Cassowary code has been updated to be compliant with Java 1.4+, removes and simplifies certain features, and applies a consistent coding style guide.