-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.xml
106 lines (98 loc) · 4.01 KB
/
build.xml
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!--
openedgeANT demo
Date: Oct 18 2018
Author: Cameron David Wright
-->
<project name="openedgeGradle" default="test"
basedir="." >
<target name="init-vars" >
<property environment="env"/>
<property name="dlc" value="${env.DLC}"/>
<property name="pct" value="${dlc}/pct"/>
<property file="properties/project.properties"/>
<property file="properties/build.properties"/>
<taskdef resource="PCT.properties" classpath="${pct}/PCT.jar" loaderRef="pct" />
<typedef resource="types.properties" classpath="${pct}/PCT.jar" loaderRef="pct" />
</target>
<target name="init" depends="init-vars">
<!--
test to make sure everything that should be installed is installed
We need a Proversion of 11.6 at a minumum
-->
<tstamp/>
<echo>Project Name: ${Project.Name}</echo>
<echo>DLC=${dlc}</echo>
<echo>PCT=${pct}</echo>
<PCTVersion />
<ProgressVersion dlcHome="${dlc}" majorVersion="major" minorVersion="minor" patchLevel="patch" revision="revision" fullVersion="full" />
<echo message="${major} -- ${minor} -- ${revision}" />
<echo message="${full}" />
<buildnumber/>
</target>
<target name="build" depends="init"
description="pre-build the source">
<!-- Pre-build activities that need to happen before the compile of the classes-->
<mkdir dir="${dir.build}"/>
</target>
<target name="compile" depends="build"
description="compile the source">
<!-- Compile the OpenEdge class code from ${src} into ${build} -->
<PCTCompile destDir="${dir.rcode}" dlcHome="${dlc}" forceCompile="true">
<fileset dir="${dir.src}" casesensitive="yes">
<include name="**/*.cls"/>
<include name="**/*.p"/>
<include name="**/*.w"/>
</fileset>
<propath>
<pathelement path="${dir.src}"/>
</propath>
</PCTCompile>
</target>
<target name="dist" depends="compile"
description="generate the distribution artifacts">
<!-- Create the distribution directory -->
<mkdir dir="${dir.dist}"/>
<!-- Lets create the r-code artifact -->
<PCTLibrary destfile="${dir.dist}/${Project.Name}-${Project.Status}-${Project.Version}.pl"
dlcHome="${dlc}">
<fileset dir="${dir.rcode}">
<include name="**/*.r" />
<exclude name="test/**"/>
<exclude name="**/*Test*.r"/>
</fileset>
</PCTLibrary>
<!-- Lets create the source code artifact now-->
<PCTLibrary destfile="${dir.dist}/${Project.Name}-SRC-${Project.Status}-${Project.Version}.pl"
dlcHome="${dlc}">
<fileset dir="${dir.src}">
<include name="**/*.cls" />
<include name="**/*.p" />
<include name="**/*.w" />
<include name="**/*.i" />
</fileset>
<fileset dir="${dir.test}">
<include name="**/*.cls" />
<include name="**/*.p" />
<include name="**/*.w" />
<include name="**/*.i" />
</fileset>
</PCTLibrary>
</target>
<target name="test" depends="dist">
<mkdir dir="${dir.test.results}"/>
<ABLUnit dlcHome="${dlc}" destDir="${dir.test.results}" debugPCT="true" writeLog="true">
<fileset dir="${dir.test}" casesensitive="yes">
<include name="**/*.cls"/>
</fileset>
<propath>
<pathelement path="${dir.test}"/>
<pathelement location="${dir.dist}/${Project.Name}-${Project.Status}-${Project.Version}.pl" />
</propath>
</ABLUnit>
</target>
<target name="clean"
depends="init-vars">
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${dir.build}"/>
</target>
</project>