Android Fastlane edit

Fastfile lane to build and install all flavors for given build type to a device

Add this lane to your Fastfile and run fastlane installAll type:{BUILD_TYPE} in command line. Replace BUILD_TYPE with the build type you want to build.

For example: fastlane installAll type:Debug

This command will build all flavors of given type and install it to your device. Currently, it doesn’t work if you have more than one device attached. Make sure you have only one. In the future I’m planning to add option to select target device.

lane :installAll do |options|

    gradle(task: "clean")

    gradle(task: "assemble",
       build_type: options[:type])

    lane_context[SharedValues::GRADLE_ALL_APK_OUTPUT_PATHS].each do | apk |

        puts "Uploading APK to Device: " + apk

        begin
            adb(
                command: "install -r #{apk}"
            )
        rescue => ex
            puts ex
        end
    end
end
Fastlane/
fastlane
Fastfile lane to build and install all flavors for given build type to a device
Fastfile to build and upload multiple flavors to Beta by Crashlytics

Table Of Contents
39 ACRA
64 Menu
112 Loader
119 Xposed
132 Colors
135 Fresco
140 AdMob
147 Button
156 Vk SDK
170 XMPP
176 OpenCV
195 Fastlane
200 FileIO
203 Moshi
217 Paint
231 AIDL
241 JCodec
243 Okio
255 Looper
  ↑ ↓ to navigate     ↵ to select     Esc to close