SquareAndroid code style settings from https://github.com/square/java-code-styles../gradlew build../gradlew :samples:leakcanary-android-sample:connectedCheck../gradlew :leakcanary:leakcanary-android-core:connectedCheck../gradlew check or particular modules with ./gradlew :module-name:check. Detekt will fail the build if any ruleset violations are found. You should fix all issues before pushing the branch to remote./moduleDir/build/reports/.When testing heap analysis functionality, create synthetic heap dumps programmatically instead of committing binary .hprof files:
val heapDump = dump { "com.example.MyClass" watchedInstance { field["fieldName"] = BooleanHolder(true) } }
testImplementation(projects.shark.sharkHprofTest).LeakStatusTest or AndroidObjectInspectorsTest for examples.To deploy LeakCanary to your local maven repository (~/.m2/repository):
./gradlew publishToMavenLocal
Then add the SNAPSHOT dependency and mavenLocal() repository to your project:
dependencies { debugImplementation 'com.squareup.leakcanary:leakcanary-android:{{ leak_canary.next_release }}-SNAPSHOT' } repositories { mavenLocal() }
Installing or updating the docs dependencies:
pip install --requirement docs/requirements.txt
Deploying locally
mkdocs serve