This workspace contains the necessary files to build the Infinity for Reddit Android app locally using Docker.
-
Create a API application here with the following settings:
- Name:
{YourRedditUsername}s-app
- Type:
installed app
- Redirect URI:
http://127.0.0.1
- Name:
-
Clone this repository and copy the
.env.example
file to.env
.git clone cd Infinity-For-Reddit-Builder cp .env.example .env
-
Replace
your_api_token
andyour_reddit_username
in the.env
file with the API token and your Reddit username respectively. -
Build and run the Docker container using Docker Compose.
docker-compose up
-
After the build is complete, copy the built APK to your host machine.
docker cp infinity-build:/Infinity.apk .
-
Install the APK on your Android device.
Note: The first build will take some time because gradle will download all the dependencies. The subsequent builds will be faster.
To rebuild the APK the next time simply run the following command to build the APK and then copy it to your host machine.
Warning: This only works if you still have the container, if not, you will have to rebuild the container again
docker start infinity-build
...
docker cp infinity-build:/Infinity.apk .
The Dockerfile uses the Azul Zulu OpenJDK 11 image as the base image, installs the required dependencies, and sets up the Android SDK.
The entrypoint.sh
script fetches the source code, injects your Reddit API token and Reddit username into the source code, and also uses @TanukiAI's keystore to sign the APK.
- u/HostileEnemy for making the Infinity for Reddit app.
- u/AllMFHH for the colab notebook which I used to build this Dockerfile.
- Original post by u/AllMFHH about the colab notebook: Reddit Post
- TanukiAI for the keystore used to sign the APK.
- Azul Systems for the Azul Zulu OpenJDK 11 image.