summaryrefslogtreecommitdiff
path: root/README.html
blob: 2bc5506adc97416b6f3a0be597ca7d3bff79e164 (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
<h1>Building a Haskell Project powered by Stack/Gradle/Jenkins</h1>
<h2> Intro </h2>
<p>
	This is a minimalistic <strong>Haskell</strong> project consisting of a small library located in <em>./src/</em> as well as the main app in <em>./app/</em>. 
	The project is powerd by <strong>Gradle</strong> build automation and the <strong>Stack</strong> dependency management. It works as a living example and proof of concept for a build inside our <strong>Jenkins</strong> instance.
	You can have a look at the build process defined in <em>./build.gradle.kts</em>, which calls all the necessary <strong>Stack</strong> commands.
</p>

<h2>Prequisites</h2>
<p>
	To build this project yourself, you might need to install a few dependancies. On Debian-based distros run:

	<pre>
	sudo apt-get update
	sudo apt-get install make gcc libgmp3-dev default-jre git
	</pre>

	This will not hurt, if the packages are installed already.
</p>

<h2>Clone</h2>
<p>
	This repo is served proudly via the git-daemon. You can simply clone it via: 
	<pre>
	git clone git://andromeda.softwarefools.com/miguel/gradle_jenkins_test_02
	</pre>
</p>

<h2>Build and Run</h2>
<p>
	Finally enter the project directory and invoke gradle with:
	<pre>
	cd gradle_jenkins_test_02
	./gradlew stack-exec
	</pre>

	It will take some time until all dependancies are resolved but finally you should see the
	output of the assembled and executed binary.
</p>
<h2>References</h2>
<p>
	Read more about the individual projects behind this setup:
	<ul>
		<li><a href="https://www.haskell.org/" >Haskell</a> - An advanced, purely functional programming language.</li> 
		<li><a href="https://www.haskellstack.org/">Stack</a> - A cross-platform dependency-management system for Haskell.</li>
		<li><a href="https://gradle.org/">Gradle</a> - Build automation system scriptable via Kotlin/Groovy.</li>
		<li><a href="https://jenkins.io/">Jenkins</a> - Continuous Integration automation server.</li>
	</ul>
	<em>'The whole is more then the sum of its parts..' - Aristotle</em>
</p>

<hr />