PeopleN,
Hot on the heels of the 1.3 release, I present the 1.3.1 release! This
patch release contains a few bug fixes, a revamping of the way PlayN
Game projects are organized with Maven, and instructions on how to
build for iOS (made possible by simplifications to the build process
that I got into this patch release). The release notes are up:
http://code.google.com/p/playn/wiki/ReleaseNotes
I have updated the Getting Started wiki page to reflect the new Maven
instructions. The summary of the changes is as follows:
Old command line:
Java: mvn test -Ptest-java
HTML: mvn package && mvn test -Ptest-html
Flash: never worked because this backend was totally disabled lest it
break normal builds
Android: mvn install && mvn -f android/pom.xml android:deploy
iOS: had no instructions for this because it was complicated
New command line:
Java: mvn test
HTML: mvn -Phtml integration-test
Flash: mvn -Pflash integration-test
Android: mvn -Pandroid install
iOS: mvn -Pios package
The other great thing about these simplifications is that Maven no
longer builds all the sub-projects any time you try to do anything. By
default it only tries to build the core and java sub-projects, which
are what a new PlayN user will want. Only when you specifically try to
test or deploy another backend will it trigger those builds.
This means that the fact that the Maven Android plugin blows up if you
don't have the path to your Android SDK configured in the Maven
settings is no longer an issue until the developer specifically tries
to deploy to Android by running "mvn -Pandroid install". Yay!
The procedure for building and testing on Eclipse is also vastly
simplified. It is no longer necessary to install the GWT plugins at
all. I wish it were no longer necessary to install the Android
plugins, but unfortunately Eclipse freaks out during the import
process if the Android plugin is not installed. I might revisit this
again later and eliminate this requirement by suppressing those
warnings directly.
To test the Java backend via Eclipse, one can either "Run as -> Maven
test", or if one opts to install the Maven Natives Plugin for Eclipse
(linked in the Getting Started instructions), then you can "Run as ->
Java application" and the LWJGL native library stuff will be
automatically set up. The Getting Started instructions mandate the
installation of the Maven Natives Plugin for Eclipse, because again,
Eclipse insists on freaking out during the import process if that
plugin is not installed. I could suppress that freakout directly, but
I think using the Maven Natives Plugin is actually a better approach
in this one case because it allows you to debug via Eclipse and allows
a slightly faster "press button to see app running" time than doing
things via Maven.
It is now trivial to deploy to an Android device or emulator via
Eclipse. Simply right click the foo-android sub-project and choose
"Run as -> Maven install" (assuming you have followed the Getting
Started instructions and configured Eclipse to use Maven 3.0.3 or
newer, tragically the version of Maven that is bundled with Eclipse is
3.0.2).
It is also now trivial to build and test the HTML5 version of your
game. Simply right click the foo-html sub-project, choose "Run as ->
Maven build..." and type "integration-test" into the Goal field and
press return. This will build the GWT version of your game and serve
it up on localhost:8080. No need to remove GWT developer plugin crap
from URLs or to do any other error prone wacky steps.
For people with existing projects that want to switch to this new
setup, this change set shows the changes you will need to make to your
POMs:
http://code.google.com/p/playn-samples/source/detail?r=dbf7ff37d3ba0f87c912143f9f01ee4012b35a80#
As I also mentioned, I have written iOS build instructions. Those are here:
http://code.google.com/p/playn/wiki/iOSBuild
They assume you have the new Maven setup and recent changes made to
the Maven archetype. If you want to add an iOS module to an existing
project, use the Maven archetype to generate a skeleton for your
project (in some scratch directory) using the same
groupId/artifactId/JavaGameName that you used for your existing
project, then replace your old ios directory with the new ios
directory. (You could probably also use this technique to update your
other POMs to bring them in line with the new Maven setup, just don't
change your core/pom.xml since that has your game-specific
dependencies and nothing has changed in that POM IIRC.)
Happy PlayNing (and no comPlayNing),
--
m...@samskivert.com