|
8 | 8 | ************************************************************ |
9 | 9 | --> |
10 | 10 |
|
11 | | - <fail message="Please build using Ant 1.9.1 or higher."> |
| 11 | + <fail message="Please build using Ant 1.10.0 or higher."> |
12 | 12 | <condition> |
13 | 13 | <not> |
14 | | - <antversion atleast="1.9.1"/> |
| 14 | + <antversion atleast="1.10.0"/> |
15 | 15 | </not> |
16 | 16 | </condition> |
17 | 17 | </fail> |
|
93 | 93 | <mkdir dir="${idl.out.urd}"/> |
94 | 94 | <mkdir dir="${idl.out.rdb}"/> |
95 | 95 |
|
| 96 | + <first id="regview"> |
| 97 | + <fileset dir="${office.libs.path}" includes="**/regview,**/regview.exe"/> |
| 98 | + </first> |
| 99 | + <property name="sdk.regview" value="${toString:regview}"/> |
| 100 | + |
| 101 | + <first id="idlr"> |
| 102 | + <fileset dir="${sdk.bin.dir}" includes="unoidl-read,unoidl-read.exe"/> |
| 103 | + </first> |
| 104 | + <property name="sdk.idlr" value="${toString:idlr}"/> |
| 105 | + |
96 | 106 | <first id="idlw"> |
97 | | - <fileset dir="${sdk.bin.dir}" includes="unoidl-write,unoidl_write.exe"/> |
| 107 | + <fileset dir="${sdk.bin.dir}" includes="unoidl-write,unoidl-write.exe"/> |
98 | 108 | </first> |
99 | 109 | <property name="sdk.idlw" value="${toString:idlw}"/> |
| 110 | + |
100 | 111 | <condition property="sdk.useidlw"> |
101 | 112 | <available file="${sdk.idlw}" type="file"/> |
102 | 113 | </condition> |
|
118 | 129 | </target> |
119 | 130 |
|
120 | 131 | <target name="init-java" depends="init-env" if="project.isjava"> |
121 | | - <echo message="Project is Java"/> |
| 132 | + <echo message="Project is Java using version: ${ant.java.version}"/> |
122 | 133 |
|
123 | 134 | <!-- Setting lib.dir dependencies default directory is /lib or /libs if exist --> |
124 | 135 | <condition property="lib.dir" value="libs"> |
|
143 | 154 | <property name="src.module" value="${toString:module}"/> |
144 | 155 | <condition property="src.withmodule"> |
145 | 156 | <and> |
146 | | - <javaversion atleast="9"/> |
| 157 | + <javaversion atleast="11"/> |
147 | 158 | <available file="${src.module}" type="file"/> |
148 | 159 | </and> |
149 | 160 | </condition> |
|
163 | 174 | </fileset> |
164 | 175 | </path> |
165 | 176 |
|
| 177 | + <path id="office.module.path"> |
| 178 | + <fileset dir="${office.libs.path}${file.separator}classes"> |
| 179 | + <include name="libreoffice.jar"/> |
| 180 | + </fileset> |
| 181 | + </path> |
| 182 | + |
166 | 183 | <path id="build.lib.path"> |
167 | 184 | <filelist dir="${workspace.path}" files="${uno.java.classpath}"/> |
168 | 185 | </path> |
|
232 | 249 |
|
233 | 250 | <target name="compile-idlwrite" depends="merge-urd" if="sdk.useidlw"> |
234 | 251 | <echo message="Compile tool: ${sdk.idlw}"/> |
| 252 | + <echo message="Office unotype: ${office.unotypes.rdb}"/> |
| 253 | + <echo message="Office offapi: ${office.offapi.rdb}"/> |
| 254 | + <echo message="idl dir: ${idl.dir}"/> |
| 255 | + <echo message="rdb dir: ${idl.rdb.fullpath}"/> |
235 | 256 |
|
236 | 257 | <delete file="${idl.rdb.fullpath}"/> |
237 | 258 | <exec executable="${sdk.idlw}" failonerror="true"> |
|
242 | 263 | </exec> |
243 | 264 | </target> |
244 | 265 |
|
245 | | - <target name="types" depends="compile-idlwrite" if="project.isjava"> |
| 266 | + <target name="show-idlc" depends="compile-idlwrite" if="sdk.useidlc"> |
| 267 | + <echo message="Tool regview: ${sdk.regview}"/> |
| 268 | + <exec executable="${sdk.regview}" failonerror="true"> |
| 269 | + <arg value="${idl.rdb.fullpath}"/> |
| 270 | + </exec> |
| 271 | + </target> |
| 272 | + |
| 273 | + <target name="show-idlw" depends="show-idlc" if="sdk.useidlw"> |
| 274 | + <echo message="Tool unoidl-read: ${sdk.idlr}"/> |
| 275 | + <exec executable="${sdk.idlr}" failonerror="true"> |
| 276 | + <arg value="${office.unotypes.rdb}"/> |
| 277 | + <arg value="${office.offapi.rdb}"/> |
| 278 | + <arg value="${idl.rdb.fullpath}"/> |
| 279 | + </exec> |
| 280 | + </target> |
| 281 | + |
| 282 | + <target name="types" depends="show-idlw" if="project.isjava"> |
246 | 283 | <condition property="args.offapi" value=" -X"${office.offapi.rdb}"" else=""> |
247 | 284 | <length string="${office.offapi.rdb}" when="greater" length="0" trim="true"/> |
248 | 285 | </condition> |
|
278 | 315 | <target name="compile-module" depends="compile-java" if="src.withmodule"> |
279 | 316 | <echo message="Build module path: ${build.classes.dir}"/> |
280 | 317 | <echo message="Source dir: ${src.dir.absolute}"/> |
281 | | - <javac srcdir="${src.dir.absolute}" source="9" target="9" encoding="UTF-8" includeantruntime="false" |
| 318 | + <javac srcdir="${src.dir.absolute}" source="11" target="11" encoding="UTF-8" includeantruntime="false" |
282 | 319 | destdir="${build.classes.dir}" excludes="**/*Test*"> |
283 | 320 | <modulepath> |
284 | 321 | <pathelement location="${build.classes.dir}"/> |
285 | 322 | <path refid="build.class.path"/> |
286 | 323 | <path refid="build.lib.path"/> |
287 | | - <path refid="office.class.path"/> |
| 324 | + <path refid="office.module.path"/> |
288 | 325 | </modulepath> |
289 | 326 | </javac> |
290 | 327 | </target> |
|
0 commit comments