Skip to content

Instantly share code, notes, and snippets.

View marukami's full-sized avatar

Mitchell Tilbrook marukami

  • Sydney, Australia
View GitHub Profile
./gradlew testFlavorXDebugUnitTestCoverage
@marukami
marukami / build.gradle
Last active August 2, 2018 00:17
Include JaCoCo in module
apply plugin: 'com.android.application'
// or apply plugin: 'com.android.library'
enableJacoco(project)
@marukami
marukami / build.gradle
Last active November 12, 2018 01:51
JaCoCo Example Root Gradle
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'org.jacoco:org.jacoco.core:0.8.2'
}
}
@marukami
marukami / jacoco.gradle
Last active November 12, 2018 03:04
Mix Source JaCoCo task file
// Forked from https://github.com/artem-zinnatullin/qualitymatters/blob/6e9f45912e79895f63274e5fd64ac2c7fc489f19/build.gradle
// I just added some multi-module bits and the kotlin debug path for mixed source `src/java`
ext.enableJacoco = { Project project ->
// Requires Jacoco plugin in build classpath.
apply plugin: 'jacoco'
project.android.testOptions {
unitTests {
@Module
object AppModule {
private const val HTTP_RESPONSE_CACHE = (10 * 1024 * 1024).toLong()
@AppScope @Provides @JvmStatic
fun httpClient(cache: Cache): OkHttpClient {
if (Looper.getMainLooper() == Looper.myLooper())
throw IllegalStateException("Initializing OkHttpClient on main thread.")
return OkHttpClient.Builder()
@marukami
marukami / anzcoder-gear.md
Last active March 20, 2018 05:20
ANZCoders Meet-up Recording Kit & Notes

This is a working draft for the equitment used for https://www.youtube.com/anzcoders where I record and upload most of the Sydney tech meetups. I've also made some notes about some of the gear listed here. A more formal document will be published at some point.

Standard Recording Setup

ext.support_version
dependencies {
implementation ‘com.android.support.constraint:constraint-layout:1.1.0-beta4’
implementation “com.android.support:customtabs:$support_version”
implementation “com.android.support:design:$support_version”
implementation “com.android.support:palette-v7:$support_version”
implementation “com.android.support:recyclerview-v7:$support_version”
implementation “com.android.support:support-dynamic-animation:$support_version”
}
@marukami
marukami / presentation.md
Created October 17, 2017 10:25
Android Quality Matters - Part 1: Build Foundations

Shared Dependencies Versions

// dependencies.gradle
ext.versions = [
    code               : 1,
    name               : '1.0',

    minSdk             : 16,
    targetSdk          : 26,
@marukami
marukami / android-accessibility.md
Created October 9, 2017 22:28
Android Accessibility
@marukami
marukami / dagger2-articles.md
Last active September 17, 2017 00:52
Articles About Dagger2 Android