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