Skip to content

Instantly share code, notes, and snippets.

@brianwernick
brianwernick / sameOrGreaterStability.kts
Last active February 9, 2024 23:38
BenManes Versions sameOrGreaterStability
/**
* Version 1.0.1
*
* handles the functionality to compare 2 versions of a dependency
* to help determine if we should update to a new version based on our current
* dependency stability.
*
* Use:
* ```
* tasks.withType<DependencyUpdatesTask> {
@brianwernick
brianwernick / testResultSummary.gradle
Created May 16, 2023 17:07
Gradle (Groovy) terminal test results summary after run
import org.gradle.internal.logging.text.StyledTextOutputFactory
import static org.gradle.internal.logging.text.StyledTextOutput.Style
/**
* Handles watching the test output for each gradle module, storing the results until the
* test suite has completed, then prints out the results in a condensed manner.
*
* To include this functionality in the project, you just need to apply this script in
* the root `build.gradle` file. e.g. `apply from: './gradle/testResultSummary.gradle'`
*/
@brianwernick
brianwernick / publish-android-internal-test.yml
Created March 4, 2023 20:59
Example of using GitHub Actions to publish Internal Test Android applications
name: Publish to Internal Test Track
on:
push:
branches: [ master ]
jobs:
publish:
runs-on: ubuntu-latest
steps:
@brianwernick
brianwernick / composeQuickScrollEx.kt
Created June 18, 2022 18:49
A simple example of a dragable quick scroll for Jetpack Compose lazy columns (lists)
import androidx.compose.foundation.background
import androidx.compose.foundation.gestures.Orientation
import androidx.compose.foundation.gestures.draggable
import androidx.compose.foundation.gestures.rememberDraggableState
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.LazyListState
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.foundation.shape.RoundedCornerShape