【问题标题】:gwtphonegapp workflow: what is the preferred way of creating a phonegap app?gwtphonegapp 工作流程:创建 phonegap 应用程序的首选方式是什么?
【发布时间】:2015-12-18 10:54:47
【问题描述】:

我正在编写一个可以在 andoird、iOS 和 windows phone 上运行的应用程序。我正在使用 gwtphonegapp。

我的问题是:首选的工作流程是什么?现在,我在 Eclipse 中编译 gwt 应用程序,然后手动将文件复制到包含 config.xml 的 phonegap 文件夹中,然后我压缩此文件夹并使用 phonegap 构建构建。

这是唯一的方法吗?或者我可以以某种方式将 Eclipse 中的文件直接编译到 phonegap 项目中吗?

【问题讨论】:

    标签: eclipse cordova gwt mgwt


    【解决方案1】:

    我使用 maven 自动复制文件。

    但是,您绝对必须使用超级开发模式(http://www.gwtproject.org/articles/superdevmode.html),以便您可以立即在手机或模拟器中测试代码更改! (与每次复制、打包和安装新应用相比。)

    如果你使用超级开发模式,Cordova/GWT 开发会非常强大和高效。

    为方便起见,这是我用于将 GWT 代码复制到我的 cordova 应用程序目录中的 maven pom 配置:

    <!-- 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>
    

    【讨论】:

      猜你喜欢
      • 2011-12-05
      • 1970-01-01
      • 2011-08-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-02-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多