Commit 6424d5467e7691e76d04e6e26aafed109576ca5a
1 parent
5d704143
"core" build profile for building common jar
Showing
1 changed file
with
37 additions
and
14 deletions
ant/build_liteloader.xml
... | ... | @@ -33,11 +33,22 @@ |
33 | 33 | <property name="python_linux" location="/usr/bin/python" /> |
34 | 34 | |
35 | 35 | <property environment="env" /> |
36 | + | |
37 | + <target name="setup_client"> | |
38 | + <property name="client" value="true" /> | |
39 | + <property name="suffix" value="" /> | |
40 | + <property name="javadocpath" value="docs" /> | |
41 | + </target> | |
42 | + | |
43 | + <target name="setup_core"> | |
44 | + <property name="suffix" value="-core" /> | |
45 | + <property name="javadocpath" value="coredocs" /> | |
46 | + </target> | |
36 | 47 | |
37 | 48 | <target name="setup_development"> |
38 | 49 | <property name="skipremoval" value="DEV" /> |
39 | 50 | <property name="md5.outfile" value="${md5.dir}/client_${outmd5set}.md5" /> |
40 | - <property name="artefact.name" value="${ant.project.name}-${mcversion}" /> | |
51 | + <property name="artefact.name" value="${ant.project.name}${suffix}-${mcversion}" /> | |
41 | 52 | <property name="stage.dir" location="${build.dir}/stage/${ant.project.name}/${version}" /> |
42 | 53 | <property name="meta.version" value="${version}" /> |
43 | 54 | </target> |
... | ... | @@ -45,7 +56,7 @@ |
45 | 56 | <target name="setup_production"> |
46 | 57 | <property name="skipremoval" value="" /> |
47 | 58 | <property name="md5.outfile" value="${md5.dir}/client_${outmd5set}_production.md5" /> |
48 | - <property name="artefact.name" value="${ant.project.name}-${mcversion}" /> | |
59 | + <property name="artefact.name" value="${ant.project.name}${suffix}-${mcversion}" /> | |
49 | 60 | <property name="stage.dir" location="${build.dir}/stage/${ant.project.name}/${version}" /> |
50 | 61 | <property name="meta.version" value="${version}" /> |
51 | 62 | </target> |
... | ... | @@ -53,7 +64,7 @@ |
53 | 64 | <target name="setup_jenkins"> |
54 | 65 | <property name="skipremoval" value="" /> |
55 | 66 | <property name="md5.outfile" value="${md5.dir}/client_${outmd5set}_production.md5" /> |
56 | - <property name="artefact.name" value="${ant.project.name}-${mcversion}-SNAPSHOT" /> | |
67 | + <property name="artefact.name" value="${ant.project.name}${suffix}-${mcversion}-SNAPSHOT" /> | |
57 | 68 | <property name="stage.dir" location="${build.dir}/stage" /> |
58 | 69 | <property name="brand" value="${mcversion}-SNAPSHOT-r${env.SVN_REVISION}-b${env.BUILD_NUMBER}-${env.BUILD_ID}" /> |
59 | 70 | <property name="meta.version" value="${version} [${brand}]" /> |
... | ... | @@ -61,15 +72,17 @@ |
61 | 72 | </target> |
62 | 73 | |
63 | 74 | <!-- Main target --> |
64 | - <target name="development" depends="setup_development, build" description="Entry point for MCP and upstream builds" /> | |
75 | + <target name="development" depends="setup_client, setup_development, build" description="Entry point for MCP and upstream builds" /> | |
65 | 76 | |
66 | - <target name="production" depends="setup_production, build, javadoc, mcpjar" description="Entry point for production builds" /> | |
77 | + <target name="production" depends="setup_client, setup_production, build, javadoc, mcpjar" description="Entry point for production builds" /> | |
67 | 78 | |
68 | - <target name="jenkins" depends="setup_jenkins, build, javadoc, mcpjar" description="Entry point for CI builds" /> | |
79 | + <target name="jenkins" depends="setup_client, setup_jenkins, build, javadoc, mcpjar" description="Entry point for CI builds" /> | |
69 | 80 | |
70 | - <target name="build" description="Perform all tasks for a build" depends="init, recompile, reobfuscate, savemd5, stage, zip" > | |
71 | - </target> | |
81 | + <target name="core" depends="setup_core, setup_jenkins, build, javadoc, mcpjar" description="Entry point for CI builds" /> | |
72 | 82 | |
83 | + <target name="build" description="Perform all tasks for a client build" depends="init, recompile, reobfuscate, savemd5, stage, jar" > | |
84 | + </target> | |
85 | + | |
73 | 86 | <target name="clean"> |
74 | 87 | <echo level="info" message="Cleaning output directories" /> |
75 | 88 | |
... | ... | @@ -80,11 +93,11 @@ |
80 | 93 | <target name="contributesource" description="Contribute an upstream project source code to the source path"> |
81 | 94 | <echo level="info" message="Contributing project ${lib}" /> |
82 | 95 | <copy todir="${src.dir}" verbose="false" overwrite="true" failonerror="false"> |
83 | - <fileset dir="${eclipse.dir}/${lib}/java"> | |
96 | + <fileset dir="${eclipse.dir}/${lib}/java${sub}"> | |
84 | 97 | <exclude name="**/debug" /> |
85 | 98 | <exclude name="**/debug/*.java" /> |
86 | 99 | </fileset> |
87 | - <fileset dir="${eclipse.dir}/${lib}/src" /> | |
100 | + <fileset dir="${eclipse.dir}/${lib}/src${sub}" /> | |
88 | 101 | <filterchain> |
89 | 102 | <linecontains negate="true"> |
90 | 103 | <contains value="@MCPONLY${skipremoval}" /> |
... | ... | @@ -92,6 +105,13 @@ |
92 | 105 | </filterchain> |
93 | 106 | </copy> |
94 | 107 | </target> |
108 | + | |
109 | + <target name="contributeclientsource" description="Contribute client source if building a client jar" if="clientjar"> | |
110 | + <antcall target="contributesource"> | |
111 | + <param name="lib" value="${project}" /> | |
112 | + <param name="sub" value="/client" /> | |
113 | + </antcall> | |
114 | + </target> | |
95 | 115 | |
96 | 116 | <target name="contributeresources" description="Contribute resources to the staging path"> |
97 | 117 | <echo level="info" message="Contributing project resources for ${lib}" /> |
... | ... | @@ -153,7 +173,10 @@ |
153 | 173 | |
154 | 174 | <antcall target="contributesource"> |
155 | 175 | <param name="lib" value="${project}" /> |
176 | + <param name="sub" value="/common" /> | |
156 | 177 | </antcall> |
178 | + | |
179 | + <antcall target="contributeclientsource" /> | |
157 | 180 | </target> |
158 | 181 | |
159 | 182 | <target name="init" description="Initialize build environment" depends="prepare"> |
... | ... | @@ -240,7 +263,7 @@ |
240 | 263 | <replaceregexp file="${stage.dir}/liteloader.properties" byline="true" match="^brand=.*$" replace="brand=${brand}" /> |
241 | 264 | </target> |
242 | 265 | |
243 | - <target name="zip" description="Build the output zip file"> | |
266 | + <target name="jar" description="Build the client jar"> | |
244 | 267 | <echo level="info" message="Building final output" /> |
245 | 268 | |
246 | 269 | <mkdir dir="${dist.dir}" /> |
... | ... | @@ -260,7 +283,7 @@ |
260 | 283 | </jar> |
261 | 284 | </target> |
262 | 285 | |
263 | - <target name="mcpjar" description="Build the MCP-names"> | |
286 | + <target name="mcpjar" description="Build the MCP-names jar"> | |
264 | 287 | <echo level="info" message="Building mcpnamesjars" /> |
265 | 288 | |
266 | 289 | <mkdir dir="${dist.dir}" /> |
... | ... | @@ -295,7 +318,7 @@ |
295 | 318 | <target name="javadoc" description="Create the javadoc jar"> |
296 | 319 | <echo level="info" message="Generating javadoc" /> |
297 | 320 | |
298 | - <javadoc destdir="${stage.dir}/docs" useexternalfile="true"> | |
321 | + <javadoc destdir="${stage.dir}/${javadocpath}" useexternalfile="true"> | |
299 | 322 | <fileset dir="${eclipse.dir}/${project}/java"> |
300 | 323 | <exclude name="**/debug" /> |
301 | 324 | <exclude name="**/debug/*.java" /> |
... | ... | @@ -318,7 +341,7 @@ |
318 | 341 | <attribute name="Implementation-Title" value="${ant.project.name}" /> |
319 | 342 | <attribute name="Implementation-Version" value="${version}" /> |
320 | 343 | </manifest> |
321 | - <fileset dir="${stage.dir}/docs" /> | |
344 | + <fileset dir="${stage.dir}/${javadocpath}" /> | |
322 | 345 | </jar> |
323 | 346 | </target> |
324 | 347 | ... | ... |