Skip to content

dkiefner/AndroidFastlaneSample

Repository files navigation

Android fastlane Sample

fastlane is a tool for building and releasing iOS and Android apps (see fastlane Website for more information). To setup fastlane for Android, see the Setup fastlane for Android Guide. I would recommend install fastlane via Ruby. To get an impression what fastlane is capable of, see fastlane Actions.

To run fastlane just select the lane you want to run, like the build_and_run_unit_tests_debug lane, which builds the debug target and run all unit tests:

fastlane build_and_run_unit_tests_debug

Gradle

Running Tasks

Like using the normal gradle or gradle wrapper you can run all tasks. The following example is running the clean first, then the assembleDebug task and at the end the testDebugUnitTest task:

gradle(
  task: 'clean assembleDebug testDebugUnitTest'
)

This combination can be used to build and run gradle tasks for feature branches.

Setting gradle Properties

You can also set gradle properties via fastlane and use them on building. E.g. you can set the versionCode and versionName like this:

properties: {
    'versionCode' => versionCode,
    'versionName' => version
}

Then it will write the following into the gradle.properties file:

versionCode=1
versionName=1.0.0

And then you can use it in you app/build.gradle like this:

versionCode project.property('versionCode') as Integer
versionName project.property('versionName')

Run External Tools

You can run external scripts in a lane.

sh('./kill-emulators.sh')

Setting Project Parameters

tbd

Make Screenshots

tbd

Writing Meta Data

tbd

Upload APKs

Upload to Hockey

tbd

Upload to Google Beta

tbd

Upload to Google Playstore

tbd

About

A sample project to demonstrate fastlane usage for android

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published