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,11 +33,22 @@ | ||
33 | <property name="python_linux" location="/usr/bin/python" /> | 33 | <property name="python_linux" location="/usr/bin/python" /> |
34 | 34 | ||
35 | <property environment="env" /> | 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 | <target name="setup_development"> | 48 | <target name="setup_development"> |
38 | <property name="skipremoval" value="DEV" /> | 49 | <property name="skipremoval" value="DEV" /> |
39 | <property name="md5.outfile" value="${md5.dir}/client_${outmd5set}.md5" /> | 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 | <property name="stage.dir" location="${build.dir}/stage/${ant.project.name}/${version}" /> | 52 | <property name="stage.dir" location="${build.dir}/stage/${ant.project.name}/${version}" /> |
42 | <property name="meta.version" value="${version}" /> | 53 | <property name="meta.version" value="${version}" /> |
43 | </target> | 54 | </target> |
@@ -45,7 +56,7 @@ | @@ -45,7 +56,7 @@ | ||
45 | <target name="setup_production"> | 56 | <target name="setup_production"> |
46 | <property name="skipremoval" value="" /> | 57 | <property name="skipremoval" value="" /> |
47 | <property name="md5.outfile" value="${md5.dir}/client_${outmd5set}_production.md5" /> | 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 | <property name="stage.dir" location="${build.dir}/stage/${ant.project.name}/${version}" /> | 60 | <property name="stage.dir" location="${build.dir}/stage/${ant.project.name}/${version}" /> |
50 | <property name="meta.version" value="${version}" /> | 61 | <property name="meta.version" value="${version}" /> |
51 | </target> | 62 | </target> |
@@ -53,7 +64,7 @@ | @@ -53,7 +64,7 @@ | ||
53 | <target name="setup_jenkins"> | 64 | <target name="setup_jenkins"> |
54 | <property name="skipremoval" value="" /> | 65 | <property name="skipremoval" value="" /> |
55 | <property name="md5.outfile" value="${md5.dir}/client_${outmd5set}_production.md5" /> | 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 | <property name="stage.dir" location="${build.dir}/stage" /> | 68 | <property name="stage.dir" location="${build.dir}/stage" /> |
58 | <property name="brand" value="${mcversion}-SNAPSHOT-r${env.SVN_REVISION}-b${env.BUILD_NUMBER}-${env.BUILD_ID}" /> | 69 | <property name="brand" value="${mcversion}-SNAPSHOT-r${env.SVN_REVISION}-b${env.BUILD_NUMBER}-${env.BUILD_ID}" /> |
59 | <property name="meta.version" value="${version} [${brand}]" /> | 70 | <property name="meta.version" value="${version} [${brand}]" /> |
@@ -61,15 +72,17 @@ | @@ -61,15 +72,17 @@ | ||
61 | </target> | 72 | </target> |
62 | 73 | ||
63 | <!-- Main target --> | 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 | <target name="clean"> | 86 | <target name="clean"> |
74 | <echo level="info" message="Cleaning output directories" /> | 87 | <echo level="info" message="Cleaning output directories" /> |
75 | 88 | ||
@@ -80,11 +93,11 @@ | @@ -80,11 +93,11 @@ | ||
80 | <target name="contributesource" description="Contribute an upstream project source code to the source path"> | 93 | <target name="contributesource" description="Contribute an upstream project source code to the source path"> |
81 | <echo level="info" message="Contributing project ${lib}" /> | 94 | <echo level="info" message="Contributing project ${lib}" /> |
82 | <copy todir="${src.dir}" verbose="false" overwrite="true" failonerror="false"> | 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 | <exclude name="**/debug" /> | 97 | <exclude name="**/debug" /> |
85 | <exclude name="**/debug/*.java" /> | 98 | <exclude name="**/debug/*.java" /> |
86 | </fileset> | 99 | </fileset> |
87 | - <fileset dir="${eclipse.dir}/${lib}/src" /> | 100 | + <fileset dir="${eclipse.dir}/${lib}/src${sub}" /> |
88 | <filterchain> | 101 | <filterchain> |
89 | <linecontains negate="true"> | 102 | <linecontains negate="true"> |
90 | <contains value="@MCPONLY${skipremoval}" /> | 103 | <contains value="@MCPONLY${skipremoval}" /> |
@@ -92,6 +105,13 @@ | @@ -92,6 +105,13 @@ | ||
92 | </filterchain> | 105 | </filterchain> |
93 | </copy> | 106 | </copy> |
94 | </target> | 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 | <target name="contributeresources" description="Contribute resources to the staging path"> | 116 | <target name="contributeresources" description="Contribute resources to the staging path"> |
97 | <echo level="info" message="Contributing project resources for ${lib}" /> | 117 | <echo level="info" message="Contributing project resources for ${lib}" /> |
@@ -153,7 +173,10 @@ | @@ -153,7 +173,10 @@ | ||
153 | 173 | ||
154 | <antcall target="contributesource"> | 174 | <antcall target="contributesource"> |
155 | <param name="lib" value="${project}" /> | 175 | <param name="lib" value="${project}" /> |
176 | + <param name="sub" value="/common" /> | ||
156 | </antcall> | 177 | </antcall> |
178 | + | ||
179 | + <antcall target="contributeclientsource" /> | ||
157 | </target> | 180 | </target> |
158 | 181 | ||
159 | <target name="init" description="Initialize build environment" depends="prepare"> | 182 | <target name="init" description="Initialize build environment" depends="prepare"> |
@@ -240,7 +263,7 @@ | @@ -240,7 +263,7 @@ | ||
240 | <replaceregexp file="${stage.dir}/liteloader.properties" byline="true" match="^brand=.*$" replace="brand=${brand}" /> | 263 | <replaceregexp file="${stage.dir}/liteloader.properties" byline="true" match="^brand=.*$" replace="brand=${brand}" /> |
241 | </target> | 264 | </target> |
242 | 265 | ||
243 | - <target name="zip" description="Build the output zip file"> | 266 | + <target name="jar" description="Build the client jar"> |
244 | <echo level="info" message="Building final output" /> | 267 | <echo level="info" message="Building final output" /> |
245 | 268 | ||
246 | <mkdir dir="${dist.dir}" /> | 269 | <mkdir dir="${dist.dir}" /> |
@@ -260,7 +283,7 @@ | @@ -260,7 +283,7 @@ | ||
260 | </jar> | 283 | </jar> |
261 | </target> | 284 | </target> |
262 | 285 | ||
263 | - <target name="mcpjar" description="Build the MCP-names"> | 286 | + <target name="mcpjar" description="Build the MCP-names jar"> |
264 | <echo level="info" message="Building mcpnamesjars" /> | 287 | <echo level="info" message="Building mcpnamesjars" /> |
265 | 288 | ||
266 | <mkdir dir="${dist.dir}" /> | 289 | <mkdir dir="${dist.dir}" /> |
@@ -295,7 +318,7 @@ | @@ -295,7 +318,7 @@ | ||
295 | <target name="javadoc" description="Create the javadoc jar"> | 318 | <target name="javadoc" description="Create the javadoc jar"> |
296 | <echo level="info" message="Generating javadoc" /> | 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 | <fileset dir="${eclipse.dir}/${project}/java"> | 322 | <fileset dir="${eclipse.dir}/${project}/java"> |
300 | <exclude name="**/debug" /> | 323 | <exclude name="**/debug" /> |
301 | <exclude name="**/debug/*.java" /> | 324 | <exclude name="**/debug/*.java" /> |
@@ -318,7 +341,7 @@ | @@ -318,7 +341,7 @@ | ||
318 | <attribute name="Implementation-Title" value="${ant.project.name}" /> | 341 | <attribute name="Implementation-Title" value="${ant.project.name}" /> |
319 | <attribute name="Implementation-Version" value="${version}" /> | 342 | <attribute name="Implementation-Version" value="${version}" /> |
320 | </manifest> | 343 | </manifest> |
321 | - <fileset dir="${stage.dir}/docs" /> | 344 | + <fileset dir="${stage.dir}/${javadocpath}" /> |
322 | </jar> | 345 | </jar> |
323 | </target> | 346 | </target> |
324 | 347 |