Book Image

Mastering Android NDK

Book Image

Mastering Android NDK

Overview of this book

Android NDK is used for multimedia applications that require direct access to system resources. NDK is also the key for portability, which in turn allows a reasonably comfortable development and debugging process using familiar tools such as GCC and Clang toolchains. This is a hands-on guide to extending your game development skills with Android NDK. The book takes you through many clear, step-by-step example applications to help you further explore the features of Android NDK and some popular C++ libraries and boost your productivity by debugging the development process. Through the course of this book, you will learn how to write portable multi-threaded native code, use HTTP networking in C++, play audio files, use OpenGL ES 3, and render high-quality text. Each chapter aims to take you one step closer to building your application. By the end of this book, you will be able to create an engaging, complete gaming application.
Table of Contents (17 chapters)
Mastering Android NDK
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Using TeamCity continuous integration server with Android applications


TeamCity is a powerful continuous integration and deployment server, which can be used to automate your Android application builds. This can be found at https://www.jetbrains.com/teamcity.

Note

TeamCity is free for small projects that require no more than 20 build configurations and 3 build agents and is absolutely free for open source projects. Ask for an open-source license at https://www.jetbrains.com/teamcity/buy.

The server installation procedure is straightforward. Windows, OS X, or Linux machine can be used as the server or a build agent. Here, we will show how to install TeamCity on Windows.

Download the latest version of the installer from https://www.jetbrains.com/teamcity/download and run it using the following command:

>TeamCity-9.0.1.exe

Install all components and run it as Windows Service. For simplicity, we will run both the server and the agent on a single machine, as shown in the following screenshot:

Choose the desired TeamCity server port. We will use the default HTTP port 80. Run the TeamCity Server and Agent services under the SYSTEM account.

Once the server is online, open your browser and connect to it using the address http://localhost. Create a new project and a build configuration.

Note

To work with TeamCity, you should put the source code of your project into a version control system. Git and GitHub will be a good choice.

If your project is already on GitHub, you can create a Git VCS root pointing to the URL of your GitHub repository, like this https://github.com/<your login>/<your project>.git.

Add a new command-line build step and type the content of the script:

ndk-build
ant release

You can also add signing using jarsigner here and use the zipalign tool to create the final production .apk.

Now, go to the General Settings step and add an artifact path to bin/3_NDK-release.apk. The project is ready for continuous integration.