Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Build Process Enhancement: Exclude redundant source files from `dists` directory

Open
#3,258 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
android, python

Research direction

Start by locating the assemble_distribution method in SDLGradleBootstrap and the other bootstrap implementations. Trace how the temporary build directory is copied into dists/<dist_name>, then verify that the distribution retains compiled libraries while excluding the redundant jni/ sources and obj/ files. Confirm the change with the project’s available build or distribution checks.

Written by the indexing model from the issue text.

Description

Priority: High RELEASE BLOCKER

Problem Description

The current assemble_distribution method in the SDLGradleBootstrap (and other bootstraps) copies the entire temporary build directory into the final dists/<dist_name> directory.

This process works reliably, but it results in a dists directory that contains a large number of redundant files. Specifically, it includes the complete C/C++ source code for all the BootstrapNDKRecipe dependencies (like SDL2, SDL2_image, etc.) in the jni/ subfolder, as well as intermediate object files in obj/.

This is unnecessary because these source files have already been compiled by ndk-build into the final .so libraries located in the libs/ directory. The subsequent Gradle build step only uses these pre-compiled libraries and does not re-compile the C/C++ source.

This behavior has a few negative consequences:

  1. Increased Disk Usage: It significantly inflates the size of the distribution, which can be problematic in CI/CD environments or on systems with limited disk space.
  2. Slower Build Times: The file I/O for copying of unnecessary source code adds a small but noticeable delay to the build process.
  3. Confusing Project Structure: The presence of the jni/ sources in the final Gradle project can be misleading, suggesting that Gradle might be compiling them, which it is not. A cleaner project structure would be easier to debug and understand.

Note: This issue does not affect the final size of the APK, as the Android packaging tools correctly exclude the source code. This is purely an enhancement for the intermediate build process.

Dominant language
Python
Stars
8.9k
Forks
2k
Avg merge
12h 20m
Merged PRs (30d)
9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from kivy/python-for-android

All issues in kivy/python-for-android

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.