Skip to content
This repository has been archived by the owner on Dec 12, 2020. It is now read-only.

Adding Docker to standardize build process #508

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

beavel
Copy link

@beavel beavel commented Jul 1, 2018

I was having difficulty building the app after I made what I believed to be the upgrades to Dropbox code for v2 API. Since I haven't done Android development before and to isolate issues, I decided to put together a Dockerfile and clarify the build environment as I had miscellaneous tools installed and wasn't sure what was causing issues. I added back the necessary jars to build the original APK and worked through issues until I build the original APK from source and install it without issue. The following commands were used to build successfully:

docker build -t android-build .
docker run -it --rm --entrypoint="/bin/bash" android-build

# At the console prompt in the container
./gradlew assembleDebug

# From another free console, I copied out the apk
docker container ls
docker cp <container_name_from_previous_step>:/usr/src/app/app/build/outputs/apk/free/debug/ D:\tmp\todo.txt # change the output directory 'D:\tmp\todo.txt' to your preference.

I have a dropbox-v2 branch based off of this, which currently does not build, but I believe it is a matter of figuring out how to update the ActionBarSherlock activities with AppCompat as the new Dropbox SDK required enabling multiDexEnabled, which in turn required update Sdk versions to a minimum of 21. I also disabled Proguard as I wasn't able to get it to build with it enabled. Long story short, there may be other approaches to solving the issues listed above, but I figured the Docker image baselines the build environment and eliminates the individual system differences between developers.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant