Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "build-logic"]
path = build-logic
url = https://github.com/Gael-Android/build-logic.git
46 changes: 46 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Repository Guidelines

## Project Structure & Module Organization
This is a Kotlin Multiplatform + Compose Multiplatform project.
- `composeApp/`: shared UI/application layer (`commonMain`, `androidMain`, `iosMain`, `commonTest`).
- `androidApp/`: Android entrypoint (`MainActivity`), manifest, and Android resources.
- `iosApp/`: Xcode project and SwiftUI iOS host app.
- `core/`: shared layers (`domain`, `data`, `designsystem`, `presentation`).
- `feature/`: feature modules split by domain (`auth`, `groupchat`, `messaging`) with `domain/data/presentation`.
- `build-logic/`: convention plugins used by all modules (included build).

## Build, Test, and Development Commands
Use the Gradle wrapper from repo root.
- `./gradlew :androidApp:assembleDebug`: build Android debug app.
- `./gradlew :composeApp:assembleDebug`: build shared Compose module for Android target.
- `./gradlew build`: compile all modules and run configured tests.
- `./gradlew test`: run JVM/unit tests.
- `./gradlew :androidApp:connectedDebugAndroidTest`: run instrumentation tests on a connected device/emulator.
- `./gradlew check`: run verification tasks.
For iOS, open `iosApp/iosApp.xcodeproj` in Xcode and run the `iosApp` scheme.

## Coding Style & Naming Conventions
- Language: Kotlin (`.kts` for build scripts), 4-space indentation.
- Follow Kotlin style defaults in IDE; keep trailing commas where existing code uses them.
- Packages use `com.yourssu.pingpong...`; match module responsibility in namespace.
- Module naming follows layered conventions: `:core:<layer>`, `:feature:<name>:<layer>`.
- Prefer convention plugins from `build-logic` over per-module custom Gradle setup.

## Testing Guidelines
- Place tests in source-set-specific folders: `commonTest`, `androidUnitTest`, `androidInstrumentedTest`.
- Use `kotlin.test` for shared tests; JUnit for JVM/Android where needed.
- Test file naming: `<ClassName>Test.kt`; keep test names descriptive and behavior-focused.
- Add or update tests for any non-trivial logic changes in `core` or `feature` modules.

## Commit & Pull Request Guidelines
- Follow the existing commit pattern: `<type>: <summary>` (examples: `feat: ...`, `fix: ...`, `refactor: ...`, `chore: ...`).
- Keep commits focused by module or feature area.
- PRs should include:
- concise description of scope and rationale,
- linked issue/ticket (if available),
- screenshots/video for UI changes (Android/iOS),
- notes on tested targets (`android`, `ios`, `common`).

## Security & Configuration Tips
- Keep secrets out of VCS; use `local.properties` for local keys.
- If using BuildKonfig-backed values, ensure required properties (for example `API_KEY`) exist locally before building.
48 changes: 48 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# CLAUDE.md - Pingpong Android Project

## Build Commands

```bash
# Build Android debug APK
./gradlew :androidApp:assembleDebug

# Install on device/emulator
./gradlew :androidApp:installDebug

# Run all tests
./gradlew test

# Build specific module
./gradlew :module:name:build
```

## Architecture Overview

- **Kotlin Multiplatform (KMP)** project targeting Android and iOS
- **Compose Multiplatform** for shared UI
- **Multi-module structure**: `core/`, `feature/`, `composeApp/`, `androidApp/`
- **Convention plugins** in `build-logic/` submodule (Gael-Android/build-logic)
- **Feature modules** split into `api/` (interfaces) and `impl/` (implementation)
- **AGP 9.0** compatible with KMP library plugin (`com.android.kotlin.multiplatform.library`)

## Module Dependency Flow

```
androidApp → composeApp → feature modules → core modules
```

- `androidApp`: Android application entry point (MainActivity, AndroidManifest, resources)
- `composeApp`: Shared KMP library with Compose UI (Android + iOS)

## Key Conventions

- **Plugin IDs**: `com.yourssu.convention.kmp.library`, `com.yourssu.convention.cmp.library`, `com.yourssu.convention.cmp.application`
- **Package naming**: `com.yourssu.pingpong.{module}`
- **Version catalog**: `gradle/libs.versions.toml`

## Tech Stack

- Kotlin 2.3.0, AGP 9.0.0, Compose Multiplatform 1.10.0
- Gradle 9.1.0
- Android: compileSdk 36, minSdk 24
- Kotlinx Coroutines 1.10.1, Serialization 1.8.0
16 changes: 16 additions & 0 deletions androidApp/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
plugins {
alias(libs.plugins.convention.android.application.compose)
}

android {
namespace = "com.yourssu.pingpong.android"
}

dependencies {
implementation(projects.composeApp)

implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.material3)

implementation(libs.androidx.activity.compose)
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>
</manifest>
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package com.yourssu.pingpong
package com.yourssu.pingpong.android

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.Preview
import com.yourssu.pingpong.App

class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
Expand All @@ -17,9 +16,3 @@ class MainActivity : ComponentActivity() {
}
}
}

@Preview
@Composable
fun AppAndroidPreview() {
App()
}
1 change: 1 addition & 0 deletions build-logic
Submodule build-logic added at 539eeb
3 changes: 0 additions & 3 deletions build-logic/build.gradle.kts

This file was deleted.

32 changes: 0 additions & 32 deletions build-logic/convention/build.gradle.kts

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

23 changes: 0 additions & 23 deletions build-logic/settings.gradle.kts

This file was deleted.

5 changes: 4 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ plugins {
// in each subproject's classloader
alias(libs.plugins.androidApplication) apply false
alias(libs.plugins.androidLibrary) apply false
alias(libs.plugins.android.kmp.library) apply false
alias(libs.plugins.composeMultiplatform) apply false
alias(libs.plugins.composeCompiler) apply false
alias(libs.plugins.kotlinMultiplatform) apply false
}
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.ksp) apply false
}
Loading