Skip to main content
This guide will help you set up your development environment to start contributing to Kafka.

Prerequisites

Before you begin, ensure you have the following installed:
  • Android Studio - Latest stable version (Arctic Fox or newer)
  • JDK 17 - Required for building the project
  • Git - For version control
  • Minimum 6GB RAM - For optimal Gradle performance
Kafka requires the Sarahang audio player library, which must be cloned separately as it’s not yet available through Maven.

Environment Setup

1

Install JDK 17

The project is configured to use Java 17. You can download it from:
sdk install java 17.0.2-open
sdk use java 17.0.2-open
Verify your installation:
java -version
2

Install Android Studio

Download and install Android Studio from the official website.During setup, make sure to install:
  • Android SDK Platform 36 (compile SDK)
  • Android SDK Build-Tools
  • Android Emulator (optional, for testing)
3

Configure Gradle

The project uses Gradle with specific optimizations. These settings are already configured in gradle.properties:
org.gradle.jvmargs=-Xmx6020m -Dfile.encoding=UTF-8
org.gradle.caching=true
org.gradle.parallel=true
org.gradle.configureondemand=true
No additional configuration is needed unless you want to adjust memory settings.

Project Setup

1

Clone the Kafka Repository

Clone the Kafka repository to your local machine:
git clone https://github.com/vipulyaara/Kafka.git
cd Kafka
2

Clone Sarahang Dependency

Critical: Sarahang must be cloned in the same parent directory as Kafka, not inside the Kafka directory.
Navigate to the parent directory and clone Sarahang:
cd ..
git clone https://github.com/vipulyaara/Sarahang.git
Your directory structure should look like:
parent-folder/
├── Kafka/
└── Sarahang/
The project references Sarahang modules in settings.gradle:
include ':core-playback'
include ':ui-playback'
project(':core-playback').projectDir = new File(settingsDir, '../Sarahang/core-playback')
project(':ui-playback').projectDir = new File(settingsDir, '../Sarahang/ui-playback')
3

Configure local.properties

Create a local.properties file in the Kafka root directory:
cd Kafka
touch local.properties
Add the following properties:
# SDK location (usually auto-generated by Android Studio)
sdk.dir=/path/to/your/Android/Sdk

# Required API tokens (use arbitrary values for development)
google_server_client_id=your_google_client_id
pipeless_auth_token=your_pipeless_token
The google_server_client_id and pipeless_auth_token are required but you can use arbitrary values for local development. These tokens only provide additional functionalities like Google sign-in and analytics.
4

Open in Android Studio

  1. Launch Android Studio
  2. Click Open or Open an Existing Project
  3. Navigate to the Kafka directory and select it
  4. Wait for Gradle sync to complete
The first Gradle sync may take several minutes as it downloads all dependencies. Ensure you have a stable internet connection.

Verify Setup

Once the Gradle sync completes successfully, verify your setup:
# Make gradlew executable
chmod +x gradlew

# Run a test build
./gradlew assembleDebug
If the build completes without errors, your development environment is ready!

Project Structure

Kafka is organized as a multi-module Android project:
  • app - Main application module
  • base/ - Base domain and annotations (KMP)
  • core/ - Core functionality modules (analytics, networking, playback, etc.)
  • data/ - Data layer (repository, database, models, preferences)
  • domain - Domain layer with use cases
  • ui/ - UI modules (auth, homepage, reader, search, etc.)
  • navigation - Navigation logic

Next Steps

Building the Project

Learn how to build and run Kafka

Testing

Understand the testing approach

Contributing

Start contributing to Kafka

Architecture

Explore the architecture

Troubleshooting

Gradle Sync Failed

If Gradle sync fails:
  1. Verify JDK 17 is set as the project JDK in Android Studio
  2. Check that Sarahang is cloned in the correct location
  3. Clear Gradle cache: ./gradlew clean --no-daemon
  4. Invalidate caches in Android Studio: File > Invalidate Caches / Restart

Sarahang Modules Not Found

Ensure:
  1. Sarahang is in the parent directory of Kafka
  2. Both core-playback and ui-playback directories exist in Sarahang
  3. The paths in settings.gradle are correct

Out of Memory Errors

Increase Gradle memory in gradle.properties:
org.gradle.jvmargs=-Xmx8192m -Dfile.encoding=UTF-8

Build docs developers (and LLMs) love