Skip to content

Latest commit

 

History

History
26 lines (15 loc) · 1.12 KB

README.adoc

File metadata and controls

26 lines (15 loc) · 1.12 KB

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>.