This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
ViewBindingPropertyDelegate — Android library that simplifies ViewBinding lifecycle management using Kotlin property delegates. Manages binding lifecycle, clears references to prevent memory leaks, and creates bindings lazily.
./gradlew check # full check: build + unit tests + detekt + ktlint
./gradlew assembleRelease # build AARs for all library modules
./gradlew ktlintFormat # auto-fix Kotlin formatting
./gradlew koverHtmlReport # generate code coverage report
# per-module commands
./gradlew :vbpd-core:check # check single module
./gradlew :vbpd:assembleRelease # build single module AARThree library modules with a linear dependency chain:
vbpd-core ←(api)— vbpd ←(api)— vbpd-reflection
Defines ViewBindingProperty<R, T> interface (extends ReadOnlyProperty + clear()), plus LazyViewBindingProperty and EagerViewBindingProperty base classes. No Android component dependencies — only androidx.viewbinding + androidx.annotation.
Lifecycle-aware delegates for Activity, Fragment, ViewGroup, ViewHolder. Registers lifecycle callbacks to auto-clear bindings (Activity → onDestroy, Fragment → view destruction). AndroidX dependencies (fragment, activity, recyclerview) are compile-only — consumers provide their own versions.
Key files: ActivityViewBindings.kt, FragmentViewBindings.kt, ViewGroupBindings.kt, ViewHolderBindings.kt, internal/VbpdUtils.kt.
Adds reified-type overloads that discover bind()/inflate() methods via reflection. ViewBindingCache caches reflection lookups. CreateMethod enum selects BIND vs INFLATE strategy. Consumer ProGuard rules keep ViewBinding bind() and inflate() methods.
master— stable releases. Never push directly.develop— active development. All feature branches merge here.- Feature branches:
feature/<name>,fix/<name>,chore/<name>,docs/<name> - PRs target
develop, except hotfixes →master(then merge intodevelop). - Release: merge
develop→master, update version ingradle/libs.versions.toml, tagvX.Y.Z, push. CI publishes to Maven Central.
- Version:
gradle/libs.versions.toml→vbpdkey - Kotlin explicit API mode enabled — all public declarations need explicit visibility modifiers
- JVM target: Java 11
- Convention plugins in
gradle/conventions-plugins/vbpd-library-base/apply Detekt, ktlint, Kover, and Vanniktech Maven Publish to all library modules - Publishing: Vanniktech Maven Publish → Sonatype Central Portal. CI uses
ORG_GRADLE_PROJECT_*env vars; local dev useslocal.propertieswith signing + Maven Central credentials - Package:
dev.androidbroadcast.vbpd(namespace per module)
- android.yml: Runs
./gradlew checkon push/PR tomaster - build.yml: Builds release AARs on push to
develop, uploads as artifacts - Dependabot: Weekly checks for Gradle deps and GitHub Actions