Welcome to the KivyMD App Builder Template! This repository provides a ready-to-use structure for building and deploying KivyMD applications, with integrated GitHub Actions for automation.
- Pre-configured environment: Start building your app right away.
- GitHub Actions workflows:
- Automate building APKs for Android.
- Streamline testing and deployment processes.
- Modular and extensible: Easily adapt the template to suit your needs.
- MIT Licensed: Use it freely for personal or commercial projects.
Before using this template, ensure you have:
- Python 3.12.8 (with functional
pip
) - A Github account
-
Create a new repository from this template:
- Click on the "Use this template" button at the top of this repository.
- Fill in your repository details and click "Create repository from template."
-
Clone your new repository:
git clone https://github.com/your-username/your-repo-name.git cd your-repo-name
-
Install dependencies:
pip install -r requirements.txt
-
Start developing:
- Edit the provided
main.py
to customize your app. - Add your KivyMD components and logic.
- Edit the provided
-
Check the
buildozer.spec
file:- Open the
buildozer.spec
file in the root directory. - Update the required fields such as
package.name
,package.domain
, andsource.dir
to match your app's details.- Try not to modify the NDK version or you might have to adjust the workflow manually. The workflow works fine with things like that as they are in the template. Any changes you make will need to be made to ensure that the workflow works correctly.
- Open the
-
Push changes to GitHub:
git add . git commit -m "Initial commit" git push
This template includes a pre-configured workflow to build APKs for Android:
- Navigate to the
.github/workflows/
directory. - Review the
build.yml
file to customize the build process. - Push your changes to trigger the workflow.
If the workflow requires pushing changes to the repository:
-
Set repository workflow permissions:
- Go to your repository on GitHub.
- Navigate to Settings > Actions > General.
- Scroll to the Workflow permissions section at the bottom.
- Select Read and write permissions and save changes.
-
(Optional) Create a Personal Access Token (PAT) if additional authentication is needed:
- Go to your GitHub Developer Settings.
- Generate a new token with the necessary scope (
repo
for private repositories,public_repo
for public ones). - Copy the token securely (it will only be displayed once).
-
Add the PAT to your repository secrets:
- Navigate to your repository on GitHub.
- Go to Settings > Secrets and variables > Actions > New repository secret.
- Name it
GITHUB_TOKEN
and paste your PAT.
-
Update the workflow to use the secret:
env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
├── .github/
│ └── workflows/
│ └── build.yml # GitHub Actions workflow for APK builds
├── assets/ # Static assets for your app like images or fonts
| └── icon.png # Your APP icon (192x192px)
| └── presplash.png # Your APP presplash (1080x2400px recommended)
├── buildozer.spec # Buildozer's details for your app
├── LICENSE # License file (MIT)
├── main.py # Main application file
├── README.md # This readme
└── requirements.txt # Python dependencies
Contributions are welcome! Feel free to open an issue or submit a pull request to improve this template.
This project is licensed under the MIT License. See the LICENSE file for details.