build.adoc 1.83 KB
Newer Older
35V LG84's avatar
35V LG84 committed
1 2
= Building Tackler

3

35V LG84's avatar
35V LG84 committed
4 5
Tackler build is done by link:http://www.scala-sbt.org/[sbt].

35V LG84's avatar
35V LG84 committed
6 7 8 9 10
== Source code

Tackler source code is located at
link:https://gitlab.com/e257/accounting/tackler[GitLab / E257 / Accounting / Tackler]

35V LG84's avatar
35V LG84 committed
11 12 13

== Building and testing

14
----
15
LC_ALL=C.UTF-8 sbt clean compile
16
----
35V LG84's avatar
35V LG84 committed
17

18 19
=== Running tests

20 21 22 23
----
LC_ALL=C.UTF-8 sbt test it:test
----

24 25
Some of the integration tests generate lots of output or take several minutes run.

26
Especially `cli/it:test` generates lots of output and `core/it:test` takes few minutes to run.
27

28 29
It might be helpful to run tests selectively, especially in case of errors:

30
Start `LC_ALL=C.UTF-8 sbt` and run on sbt shell:
31

32 33 34
....
> apiJVM/test
> core/test
35
> cli/test
36 37
....

38 39 40

==== Running integration tests

41 42
You could run integration tests all at once (`core/it:test`, `cli/it:test`)
or by step-by-step. `core/it:test` contains some performance tests.
43 44

----
45 46 47 48
> core/it:test
> cli/it:test
# or select wanted Dirsuite
> cli/it:testOnly fi.e257.tackler.cli.Dirsuite...
49 50
----

51

35V LG84's avatar
35V LG84 committed
52 53
== Generating binaries

54 55 56
----
sbt cli/assembly
----
35V LG84's avatar
35V LG84 committed
57 58 59

== Code coverage

60
----
61
LC_ALL=C.UTF-8 sbt clean coverage test it:test && sbt coverageAggregate
62
----
35V LG84's avatar
35V LG84 committed
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77

== IntelliJ

If IntelliJ can not compile e.g. unit tests, make sure that under settings 
for all subprojects (`tackler`, `cli`, `core`) compile order is `java then scala`.

Easiest way to generate parser definition is run `sbt compile`.
You can also install ANTLR plugin, but it must be configured correctly for package-names
and output paths.


== ANTLR

IntelliJ ANTLR plugin has really nice graphical tree display to visualize and test parser rules.

35V LG84's avatar
35V LG84 committed
78 79 80 81


'''
Tackler is distributed on an *"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND*, either express or implied.
82 83
See the link:../../LICENSE[License] for the specific language governing permissions and limitations under
the link:../../LICENSE[License].