Codename One Developer Guide part 2

Page 1

Advanced Topics/Under The Hood

14.10. Physics - The Motion Class The motion class represents a physics operation that starts at a fixed time bound to the system current time millis value. The use case is entirely for UI animations and so many of its behaviors are simplified for this purpose. The motion class can be replaced in some of the builting classes to provide a slightly different feel to some of the transition effects.

14.11. Continuous Integration Codename One was essentially built for continuous integration since the build servers are effectively a building block for such an architecture. However, there are several problems with that the first of which is the limitation of server builds. If all users would start sending builds with every commit the servers would instantly become unusable due to the heavy load. To circumvent this CI support is limited only on the Enterprise level which allows Codename One to stock more servers and cope with the rise in demand related to the feature. To integrate with any CI solution just use our standard Ant targets such as build-forandroid-device, build-for-iphone-device etc. Normally, this would be a problem since the build is sent but since it isn’t blocking you wouldn’t get the build result and wouldn’t be able to determine if the build passed or failed. To enable this just edit the build XML and add the attribute automated="true" to the codeNameOne tag in the appropriate targets. This will deliver a result.zip file under the dist folder containing the binaries of a successful build. It will also block until the build is completed. This should be pretty easy to integrate with any CI system together with our automated testing solutions . E.g. we can do a synchronous build like this: <target name="build-for-javascript-sync" depends="clean,copy-javascriptoverride,copy-libs,jar,clean-override"> <codeNameOne jarFile="${dist.jar}" displayName="${codename1.displayName}" packageName = "${codename1.packageName}" mainClassName = "${codename1.mainName}" version="${codename1.version}" icon="${codename1.icon}" vendor="${codename1.vendor}" subtitle="${codename1.secondaryTitle}" automated="true"

449


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.