Skip to content

Instantly share code, notes, and snippets.

@Robyer
Robyer / maven-publish-helper-usage.gradle
Last active June 15, 2023 04:22
Gradle script for publishing Android library with sources and javadoc to Maven repository using maven-publish plugin.
// You can use maven-publish-helper.gradle script without changes and even share it between multiple
// modules. Just place the maven-publish-helper.gradle file in the root directory of your project,
// then apply it at the bottom of your module's build.gradle file like this:
// ...content of module's build.gradle file...
apply from: '../maven-publish-helper.gradle'
publishing {
publications {
@JakeWharton
JakeWharton / .bash_profile
Created August 7, 2014 05:49
Merge all your branches into a hacking branch.
function hackhackhack() {
# Merge all your local branches into a hacking branch.
PREFIX="$(whoami)/"
git co master
git branch -D "${PREFIX}hackhackhack"
git pull --prune
git co -b "${PREFIX}hackhackhack"
for branch in $(git branch | \grep "$PREFIX"); do
git merge --no-edit $branch
done
@dmarcato
dmarcato / strip_play_services.gradle
Last active December 21, 2022 10:10
Gradle task to strip unused packages on Google Play Services library
def toCamelCase(String string) {
String result = ""
string.findAll("[^\\W]+") { String word ->
result += word.capitalize()
}
return result
}
afterEvaluate { project ->
Configuration runtimeConfiguration = project.configurations.getByName('compile')
@mkchandler
mkchandler / Setting up SourceGear DiffMerge for Git.md
Last active January 13, 2022 10:44
Setup guide for making Git recognize and use SourceGear DiffMerge.
  1. Download SourceGear DiffMerge: http://sourcegear.com/diffmerge/index.html

  2. Add the following to your global .gitconfig file:

     [diff]
         tool = DiffMerge
     [difftool "DiffMerge"]
         cmd = 'C:/Program Files/SourceGear/Common/DiffMerge/sgdm.exe' "$LOCAL" "$REMOTE"
     [merge]
    

tool = DiffMerge