Modern Apps git

← Modern-Apps.git

games/arrows: document public API for detekt

Commit
533cae8cc74529ebe3b842435fe088790760be8a
Author
Vayun Mathur <[email protected]>
When
2026-11-17 14:42 UTC (18 days ago)
Parents
f9a2316
Add concise KDoc to every public class, object, interface and
enum (including nested types) that detekt's
UndocumentedPublicClass rule flagged in this module. Docs only:
no behaviour, visibility or config changes.

Verified: ./gradlew :games:arrows:detekt reports 0
UndocumentedPublicClass findings (pre-existing error-severity
findings in other rules, where present, are untouched), and the
module unit tests pass.

Diff

games/arrows/src/main/java/com/vayunmathur/games/arrows/MainActivity.kt
diff --git a/games/arrows/src/main/java/com/vayunmathur/games/arrows/MainActivity.kt b/games/arrows/src/main/java/com/vayunmathur/games/arrows/MainActivity.ktindex c3d95cca65..2cdd8cabcf 100644--- a/games/arrows/src/main/java/com/vayunmathur/games/arrows/MainActivity.kt+++ b/games/arrows/src/main/java/com/vayunmathur/games/arrows/MainActivity.kt@@ -5,6 +5,7 @@ import androidx.lifecycle.viewmodel.compose.viewModel import com.vayunmathur.games.arrows.platform.ArrowsViewModel import com.vayunmathur.library.ui.MaActivity +/** Entry activity for the Arrows app; hosts its navigation with the shared view model. */ class MainActivity : MaActivity() {     @Composable     override fun Content() {
games/arrows/src/main/java/com/vayunmathur/games/arrows/Route.kt
diff --git a/games/arrows/src/main/java/com/vayunmathur/games/arrows/Route.kt b/games/arrows/src/main/java/com/vayunmathur/games/arrows/Route.ktindex 6d75f9a050..97830a1603 100644--- a/games/arrows/src/main/java/com/vayunmathur/games/arrows/Route.kt+++ b/games/arrows/src/main/java/com/vayunmathur/games/arrows/Route.kt@@ -3,15 +3,18 @@ package com.vayunmathur.games.arrows import com.vayunmathur.library.util.NavKey import kotlinx.serialization.Serializable +/** Navigation destinations for the Arrows app. */ @Serializable sealed interface Route : NavKey {     /** The only board there is: which one it shows comes from the stored mode and level. */     @Serializable     data object Game : Route +    /** Destination for the shared game-center screen. */     @Serializable     data object GameCenter : Route +    /** Destination for the Arrows settings screen. */     @Serializable     data object Settings : Route }
games/arrows/src/main/java/com/vayunmathur/games/arrows/platform/AppBackupAgent.kt
diff --git a/games/arrows/src/main/java/com/vayunmathur/games/arrows/platform/AppBackupAgent.kt b/games/arrows/src/main/java/com/vayunmathur/games/arrows/platform/AppBackupAgent.ktindex 32afee1694..a503f12ca8 100644--- a/games/arrows/src/main/java/com/vayunmathur/games/arrows/platform/AppBackupAgent.kt+++ b/games/arrows/src/main/java/com/vayunmathur/games/arrows/platform/AppBackupAgent.kt@@ -2,6 +2,7 @@ package com.vayunmathur.games.arrows.platform  import com.vayunmathur.library.util.BaseBackupAgent +/** Backup agent declaring the Arrows DataStore files restored with the app. */ class AppBackupAgent : BaseBackupAgent() {     /**      * Both files, or a restore silently wipes half the player's history: "settings" holds the level
games/arrows/src/main/java/com/vayunmathur/games/arrows/platform/ArrowsAchievementsManager.kt
diff --git a/games/arrows/src/main/java/com/vayunmathur/games/arrows/platform/ArrowsAchievementsManager.kt b/games/arrows/src/main/java/com/vayunmathur/games/arrows/platform/ArrowsAchievementsManager.ktindex cb1c5897c0..88c678e5e1 100644--- a/games/arrows/src/main/java/com/vayunmathur/games/arrows/platform/ArrowsAchievementsManager.kt+++ b/games/arrows/src/main/java/com/vayunmathur/games/arrows/platform/ArrowsAchievementsManager.kt@@ -9,6 +9,7 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.flow.first import kotlinx.coroutines.launch +/** Reports Arrows achievements and progress to the shared games hub. */ class ArrowsAchievementsManager(     context: Context,     json: String,
games/arrows/src/main/java/com/vayunmathur/games/arrows/platform/ArrowsUiContract.kt
diff --git a/games/arrows/src/main/java/com/vayunmathur/games/arrows/platform/ArrowsUiContract.kt b/games/arrows/src/main/java/com/vayunmathur/games/arrows/platform/ArrowsUiContract.ktindex 464f4c60e2..6f634a3810 100644--- a/games/arrows/src/main/java/com/vayunmathur/games/arrows/platform/ArrowsUiContract.kt+++ b/games/arrows/src/main/java/com/vayunmathur/games/arrows/platform/ArrowsUiContract.kt@@ -31,6 +31,7 @@ interface ArrowsGameActions {     /** Hides the one-time redirector explanation for good. */     fun dismissRedirectorHint() {} +    /** Holds the no-op [ArrowsGameActions] used by previews. */     companion object { val Noop: ArrowsGameActions = object : ArrowsGameActions {} } } @@ -84,14 +85,17 @@ data class ArrowsUiState(     val moves: List<ArrowMove> = emptyList(), ) +/** Actions the Arrows settings screen can request, including route display and reminders. */ interface SettingsActions {     fun setShowRoutes(enabled: Boolean) {}     fun setReminderEnabled(enabled: Boolean) {}     fun setReminderTime(hour: Int, minute: Int) {} +    /** Holds the no-op [SettingsActions] used by previews. */     companion object { val Noop: SettingsActions = object : SettingsActions {} } } +/** State the Arrows settings screen renders, including route display and reminder preferences. */ data class SettingsUiState(     val showRoutes: Boolean = true,     val reminderEnabled: Boolean = false,
games/arrows/src/main/java/com/vayunmathur/games/arrows/platform/ArrowsViewModel.kt
diff --git a/games/arrows/src/main/java/com/vayunmathur/games/arrows/platform/ArrowsViewModel.kt b/games/arrows/src/main/java/com/vayunmathur/games/arrows/platform/ArrowsViewModel.ktindex b8db65ab02..ddc8047537 100644--- a/games/arrows/src/main/java/com/vayunmathur/games/arrows/platform/ArrowsViewModel.kt+++ b/games/arrows/src/main/java/com/vayunmathur/games/arrows/platform/ArrowsViewModel.kt@@ -457,6 +457,7 @@ class ArrowsViewModel(application: Application) : AndroidViewModel(application),         }     } +    /** Constants for [ArrowsViewModel], including daily-challenge keys and seed offsets. */     companion object {         /** Namespace shared by the daily-challenge store and its reminder. */         const val DAILY_KEY_PREFIX = "arrows_daily"