/cassowary-java

A pure Java implementation of the Cassowary constraint algorithm, and an Android ViewGroup layout manager that uses it.

Primary LanguageJavaOtherNOASSERTION

cassowary-java

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.

Quickstart

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"
}

Building cassowary-java

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

Community

Cassowary-java is part of the BeeWare suite. You can talk to the community through:

The Cassowary community also has a mailing list; it provides more general assistance regarding the Cassowary algorithm itself.

Contributing

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.

Acknowledgements

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.