This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .zshrc | |
autoload -Uz vcs_info | |
autoload -Uz colors # black red green yellow blue magenta cyan white | |
colors | |
export LSCOLORS=gxfxxxxxcxxxxxxxxxgxgx | |
export LS_COLORS='di=01;36:ln=01;35:ex=01;32' | |
zstyle ':completion:*' list-colors 'di=36' 'ln=35' 'ex=32' | |
# PROMPT変数内で変数参照 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
echo "Start Android licenses acceptance." | |
# If you update these sdkmanager calls, remove Travis CI cache before run new build. | |
if [ ! -e ${ANDROID_HOME}/licenses/android-sdk-license ]; then | |
# accept licenses | |
echo y | $ANDROID_HOME/tools/bin/sdkmanager 'tools' > /dev/null | |
echo y | $ANDROID_HOME/tools/bin/sdkmanager 'platform-tools' > /dev/null | |
echo y | $ANDROID_HOME/tools/bin/sdkmanager 'platforms;android-25' > /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task callShellCommand << { | |
exec { | |
executable "sh" | |
args "-c", "ls -la" | |
} | |
} | |
task callShellFile << { | |
exec { | |
executable "sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task mytask { | |
doFirst { | |
println "doFirst" | |
} | |
} | |
mytask.doLast { | |
println "doLast" | |
} | |
mytask << { | |
println "doLast by <<" // this is same as mytask.doLast {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task printpath << { | |
println "current project path: $projectDir" | |
def parentDirPath = parent.projectDir | |
println "parent project path: $parentDirPath" | |
def rootDirPath = rootProject.projectDir | |
println "root project path: $rootDirPath" | |
println "root project path: $rootDir" // this will be same as above. | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task mycopy << { | |
println "$projectDir" | |
File filea = file 'filea.txt' | |
println filea.name | |
copy { | |
from "./" | |
into "./" | |
filter { line -> | |
line.replaceAll '<FIX_ME>', 'FIXED!!' |