Skip to content

Instantly share code, notes, and snippets.

@n8ebel
Last active August 25, 2020 21:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save n8ebel/5cff6fe3f224b94224b8a70984da4310 to your computer and use it in GitHub Desktop.
Save n8ebel/5cff6fe3f224b94224b8a70984da4310 to your computer and use it in GitHub Desktop.
Collection of gradle-profiler scenarios for benchmarking Android builds
//
// Non-abi change
//
1_non_abi_change {
title = "Non-api change to :location module"
tasks = [":app:assembleEnvQADebug"]
apply-non-abi-change-to = "location/src/main/java/com/premise/android/data/location/AndroidLocationProvider.java"
}
2_non_abi_change {
title = "Non-api change to :location module with file-system watching"
tasks = [":app:assembleEnvQADebug"]
gradle-args = ["--watch-fs"]
apply-non-abi-change-to = "location/src/main/java/com/premise/android/data/location/AndroidLocationProvider.java"
}
//
// Non-abi change multiple file file
//
1_non_abi_change {
title = "Non-api change to multiple modules"
tasks = [":app:assembleEnvQADebug"]
apply-non-abi-change-to = "featureflag/src/main/java/com/premise/android/featureflag/ExperimentFlag.java"
apply-non-abi-change-to = "common/src/main/java/com/premise/android/views/RxListAdapter.kt"
apply-non-abi-change-to = "location/src/main/java/com/premise/android/data/location/AndroidLocationProvider.java"
}
2_non_abi_change {
title = "Non-api change to multiple modules with file-system watching"
tasks = [":app:assembleEnvQADebug"]
gradle-args = ["--watch-fs"]
apply-non-abi-change-to = "featureflag/src/main/java/com/premise/android/featureflag/ExperimentFlag.java"
apply-non-abi-change-to = "common/src/main/java/com/premise/android/views/RxListAdapter.kt"
apply-non-abi-change-to = "location/src/main/java/com/premise/android/data/location/AndroidLocationProvider.java"
}
//
// abi Changes
//
1_abiChange_no_fs_watch {
title = "Incremental"
tasks = [":app:assembleEnvQADebug"]
apply-android-resource-change-to = "monitoring/src/main/res/values/strings.xml"
apply-android-resource-value-change-to = "monitoring/src/main/res/values/strings.xml"
apply-android-resource-change-to = "common/src/main/res/values/strings.xml"
apply-android-resource-value-change-to = "common/src/main/res/values/strings.xml"
apply-abi-change-to = "featureflag/src/main/java/com/premise/android/featureflag/ExperimentFlag.java"
apply-abi-change-to = "common/src/main/java/com/premise/android/views/RxListAdapter.kt"
apply-abi-change-to = "location/src/main/java/com/premise/android/data/location/AndroidLocationProvider.java"
}
2_abiChanges_with_fs_watch {
title = "Multiple incremental changes with file system watching"
tasks = [":app:assembleEnvQADebug"]
gradle-args = ["--watch-fs"]
apply-android-resource-change-to = "monitoring/src/main/res/values/strings.xml"
apply-android-resource-value-change-to = "monitoring/src/main/res/values/strings.xml"
apply-android-resource-change-to = "common/src/main/res/values/strings.xml"
apply-android-resource-value-change-to = "common/src/main/res/values/strings.xml"
apply-abi-change-to = "featureflag/src/main/java/com/premise/android/featureflag/ExperimentFlag.java"
apply-abi-change-to = "common/src/main/java/com/premise/android/views/RxListAdapter.kt"
apply-abi-change-to = "location/src/main/java/com/premise/android/data/location/AndroidLocationProvider.java"
}
//
// Clean build with cache
//
1_clean_build_with_cache {
title = "Clean build w/ cache"
tasks = ["clean", ":app:assembleEnvQADebug"]
gradle-args = ["--build-cache"]
}
// Validates that the cache is working
2_clean_build_with_cache {
title = "Clean build w/ file-system watching"
tasks = ["clean", ":app:assembleEnvQADebug"]
gradle-args = ["--build-cache", "--watch-fs"]
}
//
// NOOP
//
1_noop {
title = "Up-to-date tasks"
tasks = [":app:assembleEnvQADebug"]
}
2_noop {
title = "Up-to-date tasks with file system watching"
tasks = [":app:assembleEnvQADebug"]
gradle-args = ["--watch-fs"]
}
//
// Android resource changes
//
1_add_strings_to_multiple_modules {
title = "Android resources changes to multiple non-:app modules without file-system watching"
tasks = [":app:assembleEnvQADebug"]
gradle-args = ["--watch-fs"]
apply-android-resource-change-to = "monitoring/src/main/res/values/strings.xml"
apply-android-resource-value-change-to = "monitoring/src/main/res/values/strings.xml"
apply-android-resource-change-to = "common/src/main/res/values/strings.xml"
apply-android-resource-value-change-to = "common/src/main/res/values/strings.xml"
}
2_add_strings_to_multiple_modules {
title = "Android resources changes to multiple non-:app modules with file-system watching"
tasks = [":app:assembleEnvQADebug"]
gradle-args = ["--watch-fs"]
apply-android-resource-change-to = "monitoring/src/main/res/values/strings.xml"
apply-android-resource-value-change-to = "monitoring/src/main/res/values/strings.xml"
apply-android-resource-change-to = "common/src/main/res/values/strings.xml"
apply-android-resource-value-change-to = "common/src/main/res/values/strings.xml"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment