0

I am programming an app that should work on andoird, iOS and windows phone. I am using gwtphonegapp.

My question is: What is the preferred workflow for this? Right now, I compile the gwt app in eclipse and then manually copy the files into a phonegap folder that contains the config.xml, then I zip this folder and build is using phonegap build.

Is this the only way to do this? Or can I somehow compile the files from Eclipse directly into a phonegap project?

user3629892
  • 2,960
  • 9
  • 33
  • 64

1 Answers1

0

I use maven to copy the files automatically.

However, you absolutely have to make use of the Super Dev Mode (http://www.gwtproject.org/articles/superdevmode.html), so that you can test code changes immediately in the phone or emulator! (As compared copying, packaging and installing a new app every time.)

If you make use of Super Dev Mode, Cordova/GWT development can be very powerful and efficient.

For convenience this is the maven pom config I use for copying GWT code into my cordova app dir:

<!-- copy to cordova app www -->
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.5</version>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <!-- here the phase you need -->
                        <phase>package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.basedir}/${app.dir.name}/www</outputDirectory>
                            <resources>
                                <!-- !!! note: filtering corrupts binary files (e.g. mp3) - exclude them if filters needed -->
                                <resource>
                                    <directory>${project.basedir}/src/main/app</directory>
                                    <filtering>true</filtering>
                                    <includes>
                                        <include>*/**</include>
                                    </includes>
                                </resource>

                                <resource>
                                    <directory>${project.build.directory}/${project.build.finalName}</directory>
                                    <filtering>false</filtering>
                                    <includes>
                                        <include>${app.gwt.module}/**</include>
                                    </includes>
                                </resource>

                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
robert
  • 978
  • 7
  • 17