|
118 | 118 | <mkdir dir="build"/> |
119 | 119 |
|
120 | 120 | <!-- Update the strongback.properties file --> |
| 121 | + <property file="${ctre.dir}/ctre.properties" prefix="ctre"/> |
| 122 | + <property file="${navx.dir}/navx.properties" prefix="navx"/> |
121 | 123 | <copy file="strongback.properties" tofile="${build.dir}/strongback.properties"/> |
122 | 124 | <propertyfile file="${build.dir}/strongback.properties"> |
123 | 125 | <entry key="strongback.version" value="${strongback.version}"/> |
124 | 126 | <entry key="build.date" value="${current.date}"/> |
| 127 | + <entry key="wpilib.version" value="${wpilib.version}"/> |
| 128 | + <entry key="ctre.version" value="${ctre.CTRE.FRC.Java}"/> |
| 129 | + <entry key="navx.version" value="${navx.version}"/> |
| 130 | + </propertyfile> |
| 131 | + <propertyfile file="${build.dir}/ctre-lib-info.properties" comment="Generated by Strongback build system"> |
| 132 | + <entry key="version" value="${ctre.CTRE.FRC.Java}"/> |
| 133 | + <entry key="name" value="TalonSRX Java Library"/> |
| 134 | + <entry key="jarNames" value="TalonSRXLibJava.jar"/> |
| 135 | + </propertyfile> |
| 136 | + <propertyfile file="${build.dir}/navx-lib-info.properties" comment="Generated by Strongback build system"> |
| 137 | + <entry key="version" value="${navx.version}"/> |
| 138 | + <entry key="name" value="navX-MXP Java Library"/> |
| 139 | + <entry key="jarNames" value="navx_frc.jar"/> |
125 | 140 | </propertyfile> |
126 | 141 |
|
127 | 142 | <!-- Build the TAR file, which should maintain file permissions --> |
|
139 | 154 | <tarfileset dir="ant/strongback" includes="**" prefix="strongback/java/ant"/> |
140 | 155 | <tarfileset dir="templates" includes="**" prefix="strongback/java/templates"/> |
141 | 156 | <tarfileset dir="build/javadoc" includes="**" prefix="strongback/java/javadoc"/> |
142 | | - <tarfileset dir="build" includes="strongback.properties" prefix="strongback"/> |
| 157 | + <tarfileset dir="build" includes="*.properties" prefix="strongback"/> |
143 | 158 | <tarfileset dir="." includes="COPYRIGHT.txt" prefix="strongback"/> |
144 | 159 | <tarfileset dir="." includes="LICENSE.txt" prefix="strongback"/> |
145 | 160 | <tarfileset dir="." includes="README.md" prefix="strongback"/> |
|
258 | 273 | <mkdir dir="${ctre.dir}"/> |
259 | 274 | <unzip src="downloads/ctre.zip" dest="${ctre.dir}"> |
260 | 275 | </unzip> |
| 276 | + <!-- Load the version info into a properties file --> |
| 277 | + <loadfile property="ctre.version.properties" srcfile="${ctre.dir}/VERSION_NOTES"> |
| 278 | + <filterchain> |
| 279 | + <!-- skip the first line --> |
| 280 | + <headfilter lines="-1" skip="1"/> |
| 281 | + <trim/> |
| 282 | + <replacestring from=": " to="="/> |
| 283 | + <replacestring from=" " to="."/> |
| 284 | + </filterchain> |
| 285 | + </loadfile> |
| 286 | + <!-- Write out a property file in the CTRE directory --> |
| 287 | + <echo file="${ctre.dir}/ctre.properties" append="false"># Downloaded and installed by Strongback build system${line.separator}</echo> |
| 288 | + <echo file="${ctre.dir}/ctre.properties" append="true">${ctre.version.properties}</echo> |
261 | 289 | </target> |
262 | 290 |
|
263 | 291 | <!-- Download and extract the navX-MXP 3rd party library --> |
|
272 | 300 | <echo>Downloading the navX-MXP library and installing into '${navx.dir}'.</echo> |
273 | 301 | <get src="${navx.download.url}" dest="downloads/navx.zip"/> |
274 | 302 | <mkdir dir="${navx.dir}"/> |
275 | | - <unzip src="downloads/navx.zip" dest="${ctre.dir}"> |
| 303 | + <unzip src="downloads/navx.zip" dest="${navx.dir}"> |
276 | 304 | </unzip> |
| 305 | + <!-- Load the version info into a property --> |
| 306 | + <loadfile property="navx.version" srcFile="${navx.dir}/version.txt"> |
| 307 | + <filterchain> |
| 308 | + <striplinebreaks/> |
| 309 | + <trim/> |
| 310 | + </filterchain> |
| 311 | + </loadfile> |
| 312 | + <!-- Write out a property file in the navX directory --> |
| 313 | + <propertyfile file="${navx.dir}/navx.properties" comment="Downloaded and installed by Strongback build system"> |
| 314 | + <entry key="version" value="${navx.version}"/> |
| 315 | + </propertyfile> |
277 | 316 | </target> |
278 | 317 | </project> |
0 commit comments