Skip to content

Instantly share code, notes, and snippets.

@hernandazevedo
hernandazevedo / .zshrc
Last active October 9, 2023 14:11
.zshrc
# Install from https://github.com/felipec/git-completion/
# git-completion
autoload -U compinit && compinit
zmodload -i zsh/complist
GIT_PS1_SHOWCOLORHINTS=1
GIT_COMPLETION_CHECKOUT_NO_GUESS=1
GIT_COMPLETION_SHOW_ALL=1
fpath=(~/.local/share/git-completion/zsh $fpath)
internal fun Modifier.coloredShadow(
color: Color = Color.Black,
borderRadius: Dp = 0.dp,
blurRadius: Dp = 0.dp,
offsetY: Dp = 0.dp,
offsetX: Dp = 0.dp,
spread: Float = 0f,
modifier: Modifier = Modifier,
) = this.then(
modifier.drawBehind {
@hernandazevedo
hernandazevedo / Fastfile
Last active May 31, 2021 13:09
.github/workflows
### Place this file under directory fastlane/Fastfile
### PR Android
###
desc "Pull Request verification"
lane :pull_request_verification do
gradle(project_dir: ".", task: "clean lintDebug test")
end
@hernandazevedo
hernandazevedo / publishMavenBintray.gradle
Created April 19, 2021 13:46 — forked from gsavvid/publishMavenBintray.gradle
Gradle script for publishing Android Kotlin libraries to a Bintray repository using maven-publish plugin. With dependencies (also handling transitive: false and custom exclude rules), including sources and javadoc.
/**
* Publish Android Kotlin Library Helper
*
* This Gradle script is based on https://gist.github.com/Robyer/a6578e60127418b380ca133a1291f017.
* The difference is that:
* 1. It uses Dokka for generating Kotlin Javadoc.
* 2. It uses Jfrog's plugin for publishing to Bintray. If you don't want to publish to Bintray, simply remove all the Bintray-related code.
*
* NOTE: You need to add Dokka and Bintray to your classpath for the two plugins to work.
* Update the buildscript in your project's build.gradle with the following:
@hernandazevedo
hernandazevedo / screenshots.gradle
Last active April 21, 2022 15:52
Snapshots tests for android for a remote device such as Firebase Test Lab (Bitrise)
apply plugin: 'shot'
/*
Put this on any module you want to test with snapshots:
apply from: "../screenshots.gradle"
Put this on your root build.gradle
buildscript {
repositories {
google()
jcenter()
/**
* Publish Local Helper
*
* @Author Robert Pösel
* @Version 1.4* @Date 24.4.2019
* https://gist.github.com/Robyer/a6578e60127418b380ca133a1291f017
*/
apply plugin: 'maven-publish'
@hernandazevedo
hernandazevedo / bitrise.yml
Last active October 8, 2020 17:22
Bitrise configuration + Jacoco for Junit + Instrumentation tests + Vitual Device Testing
---
format_version: 1.4.0
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
workflows:
ci:
steps:
- activate-ssh-key@4.0.3:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@4.0.14: {}
@hernandazevedo
hernandazevedo / detekt.gradle
Created July 4, 2019 17:52
static-analysis
apply from: "$project.rootDir/static-analysis/config.gradle"
configurations {
detekt
}
task detekt(type: JavaExec) {
main = "io.gitlab.arturbosch.detekt.cli.Main"
classpath = configurations.detekt
def input = "$projectDir"
git init
git remote add origin $REPO_URL
//or change the url with
git remote set-url origin $REPO_URL
git add .
git commit -m "Initial commit"
git push -f origin master
export ANDROID_SDK=/Users/hernand/Library/Android/sdk
export ANDROID_NDK=/Users/hernand/Library/Android/sdk/ndk-bundle
export PATH="$PATH:$ANDROID_SDK/tools:$ANDROID_SDK/platform-tools:$ANDROID_NDK"
# Autocomplete
#if [ -f /usr/local/git/contrib/completion/git-completion.bash ]; then
# . /usr/local/git/contrib/completion/git-completion.bash
#fi
[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh"