1 <?xml version="1.0" encoding="UTF-8"?> 2 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 3 <modelVersion>4.0.0</modelVersion> 4 <parent> 5 <groupId>com.badlogicgames.gdx</groupId> 6 <artifactId>gdx-parent</artifactId> 7 <version>1.9.3</version> 8 <relativePath>../../../../</relativePath> 9 </parent> 10 11 <artifactId>gdx-bullet-platform</artifactId> 12 <packaging>jar</packaging> 13 <name>libGDX Bullet Native Libraries</name> 14 15 <properties> 16 <base.url>http://libgdx.badlogicgames.com/nightlies/dist/extensions/gdx-bullet/</base.url> 17 </properties> 18 19 <build> 20 <sourceDirectory>src</sourceDirectory> 21 22 <plugins> 23 <!-- first download an unpack the native libraries --> 24 <plugin> 25 <groupId>com.googlecode.maven-download-plugin</groupId> 26 <artifactId>maven-download-plugin</artifactId> 27 <version>1.1.0</version> 28 <executions> 29 <execution> 30 <id>desktop</id> 31 <phase>process-resources</phase> 32 <goals><goal>wget</goal></goals> 33 <configuration> 34 <cacheDirectory>${project.build.directory}/download-cache</cacheDirectory> 35 <url>${base.url}/gdx-bullet-natives.jar</url> 36 <unpack>true</unpack> 37 <outputDirectory>${project.build.directory}/desktop</outputDirectory> 38 </configuration> 39 </execution> 40 41 <execution> 42 <id>x86-gdx</id> 43 <phase>process-resources</phase> 44 <goals><goal>wget</goal></goals> 45 <configuration> 46 <cacheDirectory>${project.build.directory}/download-cache/x86</cacheDirectory> 47 <url>${base.url}/x86/libgdx-bullet.so</url> 48 <outputDirectory>${project.build.directory}/x86</outputDirectory> 49 </configuration> 50 </execution> 51 52 <execution> 53 <id>x86_64-gdx</id> 54 <phase>process-resources</phase> 55 <goals><goal>wget</goal></goals> 56 <configuration> 57 <cacheDirectory>${project.build.directory}/download-cache/x86_64</cacheDirectory> 58 <url>${base.url}/x86_64/libgdx-bullet.so</url> 59 <outputDirectory>${project.build.directory}/x86_64</outputDirectory> 60 </configuration> 61 </execution> 62 63 <execution> 64 <id>armeabi-gdx</id> 65 <phase>process-resources</phase> 66 <goals><goal>wget</goal></goals> 67 <configuration> 68 <cacheDirectory>${project.build.directory}/download-cache/armeabi</cacheDirectory> 69 <url>${base.url}/armeabi/libgdx-bullet.so</url> 70 <outputDirectory>${project.build.directory}/armeabi</outputDirectory> 71 </configuration> 72 </execution> 73 74 <execution> 75 <id>armeabi-v7a-gdx</id> 76 <phase>process-resources</phase> 77 <goals><goal>wget</goal></goals> 78 <configuration> 79 <cacheDirectory>${project.build.directory}/download-cache/armeabi-v7a</cacheDirectory> 80 <url>${base.url}/armeabi-v7a/libgdx-bullet.so</url> 81 <outputDirectory>${project.build.directory}/armeabi-v7a</outputDirectory> 82 </configuration> 83 </execution> 84 85 <execution> 86 <id>arm64-v8a-gdx</id> 87 <phase>process-resources</phase> 88 <goals><goal>wget</goal></goals> 89 <configuration> 90 <cacheDirectory>${project.build.directory}/download-cache/arm64-v8a</cacheDirectory> 91 <url>${base.url}/arm64-v8a/libgdx-bullet.so</url> 92 <outputDirectory>${project.build.directory}/arm64-v8a</outputDirectory> 93 </configuration> 94 </execution> 95 96 <execution> 97 <id>ios-gdx</id> 98 <phase>process-resources</phase> 99 <goals><goal>wget</goal></goals> 100 <configuration> 101 <cacheDirectory>${project.build.directory}/download-cache/ios</cacheDirectory> 102 <url>${base.url}/ios/libgdx-bullet.a</url> 103 <outputDirectory>${project.build.directory}/ios</outputDirectory> 104 </configuration> 105 </execution> 106 <execution> 107 <id>tvos-gdx</id> 108 <phase>process-resources</phase> 109 <goals><goal>wget</goal></goals> 110 <configuration> 111 <cacheDirectory>${project.build.directory}/download-cache/ios</cacheDirectory> 112 <url>${base.url}/ios/libgdx-bullet.a.tvos</url> 113 <outputDirectory>${project.build.directory}/ios</outputDirectory> 114 </configuration> 115 </execution> 116 </executions> 117 </plugin> 118 119 <!-- if we have pre-built versions, replace the downloaded versions with those --> 120 <plugin> 121 <artifactId>maven-resources-plugin</artifactId> 122 <version>2.6</version> 123 <executions> 124 <execution> 125 <id>copy-local-desktop</id> 126 <phase>prepare-package</phase> 127 <goals> 128 <goal>copy-resources</goal> 129 </goals> 130 <configuration> 131 <resources> 132 <resource><directory>${basedir}/../../libs/linux32</directory></resource> 133 <resource><directory>${basedir}/../../libs/linux64</directory></resource> 134 <resource><directory>${basedir}/../../libs/macosx32</directory></resource> 135 <resource><directory>${basedir}/../../libs/macosx64</directory></resource> 136 <resource><directory>${basedir}/../../libs/windows32</directory></resource> 137 <resource><directory>${basedir}/../../libs/windows64</directory></resource> 138 </resources> 139 <outputDirectory>${basedir}/target/desktop</outputDirectory> 140 <overwrite>true</overwrite> 141 </configuration> 142 </execution> 143 <execution> 144 <id>copy-local-x86</id> 145 <phase>prepare-package</phase> 146 <goals> 147 <goal>copy-resources</goal> 148 </goals> 149 <configuration> 150 <resources> 151 <resource><directory>${basedir}/../../libs/x86</directory></resource> 152 </resources> 153 <outputDirectory>${basedir}/target/x86</outputDirectory> 154 <overwrite>true</overwrite> 155 </configuration> 156 </execution> 157 <execution> 158 <id>copy-local-x86_64</id> 159 <phase>prepare-package</phase> 160 <goals> 161 <goal>copy-resources</goal> 162 </goals> 163 <configuration> 164 <resources> 165 <resource><directory>${basedir}/../../libs/x86_64</directory></resource> 166 </resources> 167 <outputDirectory>${basedir}/target/x86_64</outputDirectory> 168 <overwrite>true</overwrite> 169 </configuration> 170 </execution> 171 <execution> 172 <id>copy-local-armeabi</id> 173 <phase>prepare-package</phase> 174 <goals> 175 <goal>copy-resources</goal> 176 </goals> 177 <configuration> 178 <resources> 179 <resource><directory>${basedir}/../../libs/armeabi</directory></resource> 180 </resources> 181 <outputDirectory>${basedir}/target/armeabi</outputDirectory> 182 <overwrite>true</overwrite> 183 </configuration> 184 </execution> 185 <execution> 186 <id>copy-local-armeabi-v7a</id> 187 <phase>prepare-package</phase> 188 <goals> 189 <goal>copy-resources</goal> 190 </goals> 191 <configuration> 192 <resources> 193 <resource><directory>${basedir}/../../libs/armeabi-v7a</directory></resource> 194 </resources> 195 <outputDirectory>${basedir}/target/armeabi-v7a</outputDirectory> 196 <overwrite>true</overwrite> 197 </configuration> 198 </execution> 199 <execution> 200 <id>copy-local-arm64-v8a</id> 201 <phase>prepare-package</phase> 202 <goals> 203 <goal>copy-resources</goal> 204 </goals> 205 <configuration> 206 <resources> 207 <resource><directory>${basedir}/../../libs/arm64-v8a</directory></resource> 208 </resources> 209 <outputDirectory>${basedir}/target/arm64-v8a</outputDirectory> 210 <overwrite>true</overwrite> 211 </configuration> 212 </execution> 213 <execution> 214 <id>copy-local-ios</id> 215 <phase>prepare-package</phase> 216 <goals> 217 <goal>copy-resources</goal> 218 </goals> 219 <configuration> 220 <resources> 221 <resource><directory>${basedir}/../../libs/ios32</directory></resource> 222 </resources> 223 <outputDirectory>${basedir}/target/ios</outputDirectory> 224 <overwrite>true</overwrite> 225 </configuration> 226 </execution> 227 </executions> 228 </plugin> 229 230 <!-- finally package everything up into jar files --> 231 <plugin> 232 <artifactId>maven-assembly-plugin</artifactId> 233 <version>2.4</version> 234 <configuration> 235 <descriptors> 236 <descriptor>desktop.xml</descriptor> 237 <descriptor>x86.xml</descriptor> 238 <descriptor>x86_64.xml</descriptor> 239 <descriptor>armeabi.xml</descriptor> 240 <descriptor>armeabi-v7a.xml</descriptor> 241 <descriptor>arm64-v8a.xml</descriptor> 242 <descriptor>ios.xml</descriptor> 243 </descriptors> 244 </configuration> 245 <executions> 246 <execution> 247 <id>make-assembly</id> 248 <phase>package</phase> 249 <goals> 250 <goal>single</goal> 251 </goals> 252 </execution> 253 </executions> 254 </plugin> 255 </plugins> 256 </build> 257 </project>