README.adoc

September 29, 2015 ยท View on GitHub

= Frege Gradle Example Project

This is an example project to demonstrate use of the Frege Gradle plugin, https://github.com/Frege/frege-gradle-plugin to compile Frege projects (https://github.com/Frege/frege). See the official plugin portal for more information (https://plugins.gradle.org/plugin/org.frege-lang).

The project contains 3 Gradle modules:

  • pure-frege - example from chapter 1 of the Real World Frege project, https://github.com/Dierk/Real_World_Frege, using Boolean.fr.
  • frege-java - Frege calling Java code from within same module, passing a third party library object as a parameter (in this case Functional Java's Unit type).
  • java-frege - Java code calling the Frege code from the frege-java submodule.

Compile and run the example with:

./gradlew -i test fregeDoc :pure-frege:fregeNativeGen run

This command:

  • compiles the source
  • runs the tests (including quickcheck tests)
  • runs the documentation tool
  • generates native Java code generation from Frege code
  • runs the main class from each of the 3 modules

Of course, each of the gradle targets above can be run individually with ./gradlew <target>.