You can create Ant build scripts for MobileFirst
Platform Foundation projects
that contain applications and adapters. By using these build scripts,
you can automate your mobile application builds.
Build script tasks
You can create build
scripts that use the following types of Ant tasks:
| Type of Ant task |
Description |
| Built in tasks from Apache Ant |
Includes tasks such as:- <echo>
- <report>
- <mkdir>
- <exec>
- <replaceregexp>
|
| Tasks from IBM® MobileFirst Platform Foundation |
These tasks complete the following actions:- Build MobileFirst
Platform Foundation applications
and adapters, such as <app-builder> and <adapter-builder>. MobileFirst
Platform Foundation provides
a set of Ant tasks that help you to build adapters and MobileFirst
Platform Foundation applications
for your MobileFirst
Platform Foundation Server.
- Build MobileFirst
Platform Foundation web
archive projects. MobileFirst
Platform Foundation provides
the <war-builder> Ant task for building the MobileFirst
Platform Foundation project
WAR file.
|
| Tasks from the Rational® Team Concert™ Build System Toolkit |
The following tasks provide information to the
build results:- <startBuildActivity>
- <linkPublisher>
- <artifactPublisher>
|
Sample build script task flow
You can create
build scripts for
MobileFirst
Platform Foundation projects
that contain different numbers of applications or adapters. The following
sample task flow describes the overall design of a build script for
a
MobileFirst
Platform Foundation project
that has a single
MobileFirst
Platform Foundation application
and a single adapter.
- Use Ant <property> elements to set the properties.
- Use a hybrid target to build MobileFirst
Platform Foundation applications,
adapters, and MobileFirst
Platform Foundation web
archive projects. The hybrid target contains the following actions:
- URLs that point to the MobileFirst
Platform Foundation Server
Console and the Application Center are published to either the Ant
build log or the Rational Team Concert™ build results.
- The MobileFirst
Platform Foundation <app-builder> Ant
task builds the MobileFirst
Platform Foundation application.
- The resulting .wlapp file is stored in the
build output.
- The MobileFirst
Platform Foundation <adapter-builder> Ant
task builds the adapter.
- The resulting .adapter file is stored in
the build output.
- The MobileFirst
Platform Foundation <war-builder> Ant
task builds the MobileFirst
Platform Foundation web
archive project.
- The resulting WAR file is stored in the build output.
- Optional. If you use Rational Team Concert, you
can publish the .wlapp, .adapter,
and WAR files to the Rational
Team Concert build results.
- When you build an Android application, include the following actions
to build the native Android APK file:
- Run the android command-line tool from the
Android SDK to generate the Android build.xml file.
- Run the generated Android build.xml file
to build the APK file.
- Optional. Publish the Android APK file to the location where you
store your build output. For example, if you use Rational Team Concert, publish
the APK file to the Rational
Team Concert build results.
- When you build an iOS application, include the following actions
to build the native iOS IPA file:
- Run the xcodebuild command-line tool from the
Xcode SDK to build the iOS application.
- Run the xcrun command-line tools from the Xcode
SDK to package the iOS application into an IPA file.
- Optional. Publish the iOS IPA file to the location where you store
your build output. For example, if you use Rational Team Concert, publish
the IPA file to the Rational
Team Concert build results.
- Add your MobileFirst
Platform Foundation application, adapter, MobileFirst
Platform Foundation web archive project (WAR file), and native application (Android APK file or iOS IPA
file) to IBM UrbanCode™ Deploy as a new version.
Tip: You can have multiple MobileFirst
Platform Foundation applications and adapters. If you have more than one MobileFirst
Platform Foundation application or adapter, repeat calls to tasks to build the mobile artifacts, add
new property values, and then add the new artifacts to IBM UrbanCode Deploy.