blob: c943b48fb8f84e6a07aebd84fb9dd20b8adf3016 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
= Frege Gradle Plugin
This is the official Gradle plugin to compile Frege projects (https://github.com/Frege/frege). See the example project (https://github.com/mperry/frege-gradle-example) for examples on the usage of this plugin.
== Plugin Application
The gradle plugin portal page for Frege documents how to apply the Frege plugin (https://plugins.gradle.org/plugin/org.frege-lang).
For applying the plugin in all Gradle versions use:
```
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.org.frege-lang:frege-gradle-plugin:0.5"
}
}
apply plugin: "org.frege-lang"
```
To apply the plugin using the new incubating, plugin mechanism (since Gradle 2.1), add:
```
plugins {
id "org.frege-lang" version "0.7"
}
apply plugin: "org.frege-lang"
```
== Tasks
This plugin creates the following tasks:
* fregeRepl
* fregeQuickCheck
* fregeDoc
* fregeNativeGen
* compileFrege
* compileTestFrege
The plugin adds dependencies so that using the `build` task is typically all that is required to invoke the `compileFrege` and `compileTestFrege` tasks. These task dependencies include:
* classes -> compileFrege -> compileJava
* testClasses -> compileTestFrege -> compileTestJava
* test -> fregeQuickCheck -> testClasses
== Task Help
=== Configuring QuickCheck
Without any configuration, the `fregeQuickCheck` task (which is triggered as part of the `test` task)
automatically executes all tests from the Frege test source set (default: `src/test/frege`).
It will pick up all functions as tests that return a value of type `Property`. This is usually achieved by
using the factory methods `property` or `once`.
Please see more details under http://www.frege-lang.org/doc/frege/test/QuickCheck.html[QuickCheck API doc].
NOTE: Testing fails if no test is found. If your project does not contain any tests, you have to skip testing via `-x test`.
You can configure the task in many ways. To see all options, you best ask the help:
```
fregeQuickCheck {
help = true
}
```
TODO: Add options and descriptions for more tasks from above.
== Example
See:
* Plugin application: https://plugins.gradle.org/plugin/org.frege-lang
* Plugin usage: https://github.com/mperry/frege-gradle-example
== Continuous Integration
The Travis CI build of this repository is at https://travis-ci.org/Frege/frege-gradle-plugin.
== Snapshots
Snapshot releases are available from the Sonatype repository at https://oss.sonatype.org/content/groups/public/org/frege-lang.
|