docs/dev-env.md
SquareAndroid code style settings from https://github.com/square/java-code-styles../gradlew build../gradlew leakcanary-android-sample:connectedCheck../gradlew 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, run the following command, changing the path to the path of your local repository:
./gradlew uploadArchives -PSNAPSHOT_REPOSITORY_URL=file:///Users/py/.m2/repository
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