airbnb/okreplay

Multiple flavours wrong pull directory

ptrudec opened this issue · 2 comments

I have two flavours of app: main and chain. Main has applicationId = "com.domain.app" and Chain has applicationId = "com.domain.app.chain" . When i try to pull tapes it pulls from /sdcard/okreplay/tapes/com.domain.app.chain.test/ and when i comment Chain flavour in gradle it pulls from /sdcard/okreplay/tapes/com.domain.app.test/ like it should be. Also folder on sd card is named com.domain.app.chain.test no matter if Chain is commented or not in gradle. Does this library has support for multiple flavours?

slott commented

I can recall this worked prior to version 1.5 - so for now I'm having a custom task to pull the tapes...

slott commented

Here is a little bash script that will do the work

#!/bin/bash
TAPE_PATH=/sdcard/okreplay/tapes/<applicationId>

CURRENT_DIR=`pwd`
echo $CURRENT_DIR
# This is where we want the tapes to be dumped
cd "app/src/androidTest/assets/tapes"
for d in `adb shell ls ${TAPE_PATH}`; do
    adb pull ${TAPE_PATH}/${d}
done
cd $CURRENT_DIR