From 6ede41e1934ee00a93d9ee427a15301532b2ee24 Mon Sep 17 00:00:00 2001 From: Jack Danger Canty Date: Fri, 5 Feb 2016 11:33:07 -0800 Subject: [PATCH 01/29] using double brackets for safety --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index b7617b1..aacb8e9 100755 --- a/install.sh +++ b/install.sh @@ -12,7 +12,7 @@ for i in $HOME/Library/Preferences/IntelliJIdea* \ $HOME/.IdeaIC*/config \ $HOME/.AndroidStudio*/config do - if [ -d $i ]; then + if [[ -d $i ]]; then # Install codestyles mkdir -p $i/codestyles From ae3cd94bbab2068530bb030f36806d7955ae0134 Mon Sep 17 00:00:00 2001 From: Tai Le Tien Date: Fri, 4 Mar 2016 02:00:47 +0700 Subject: [PATCH 02/29] Support for Windows. --- README.md | 2 +- install.bat | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 install.bat diff --git a/README.md b/README.md index dcc3aac..9ad7c0e 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ IntelliJ IDEA code style settings for Square's Java and Android projects. Installation ------------ - * Run the `install.sh` script. + * On Unix, run the `install.sh` script. Windows users should use `install.bat` instead. * Restart IntelliJ if it's running. * Open IntelliJ Project Settings -> Code Styles, change the code style for the project to the one you want. diff --git a/install.bat b/install.bat new file mode 100644 index 0000000..a2b416c --- /dev/null +++ b/install.bat @@ -0,0 +1,22 @@ +REM Installs Square's IntelliJ configs into your user configs. +@echo off +echo Installing Square IntelliJ configs... + +setlocal enableDelayedExpansion + +for /D %%i in (%userprofile%\.AndroidStudio*) do call :copy_config %%i +for /D %%i in (%userprofile%\.IdeaIC*) do call :copy_config %%i +for /D %%i in (%userprofile%\.IntelliJIdea*) do call :copy_config %%i + +echo. +echo Restart IntelliJ and/or AndroidStudio, go to preferences, and apply 'Square' or 'SquareAndroid'. +exit /b + +REM sub function for copy config files +:copy_config +set config_dir=%~1\config +echo Installing to !config_dir! +xcopy /s configs !config_dir! +echo Done. +echo. +exit /b From de33186e6f975e2682896bfd5201d06692b3a7b5 Mon Sep 17 00:00:00 2001 From: Inez Korczynski Date: Wed, 27 Jul 2016 10:00:28 -0700 Subject: [PATCH 03/29] Automatically configure Auto Import Exclude from Import and Completion list --- configs/options/editor.codeinsight.xml | 17 +++++++++++++++++ install.sh | 4 ++++ 2 files changed, 21 insertions(+) create mode 100644 configs/options/editor.codeinsight.xml diff --git a/configs/options/editor.codeinsight.xml b/configs/options/editor.codeinsight.xml new file mode 100644 index 0000000..8733999 --- /dev/null +++ b/configs/options/editor.codeinsight.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/install.sh b/install.sh index aacb8e9..a03a9a1 100755 --- a/install.sh +++ b/install.sh @@ -21,6 +21,10 @@ do # Install inspections mkdir -p $i/inspection cp -frv "$CONFIGS/inspection"/* $i/inspection + + # Install options ("Exclude from Import and Completion") + mkdir -p $i/options + cp -frv "$CONFIGS/options"/* $i/options fi done From 790e7d32e0b6a6533562ca42e68d8a805b23008c Mon Sep 17 00:00:00 2001 From: Savelii Zagurskii Date: Fri, 11 Nov 2016 16:13:49 +0300 Subject: [PATCH 04/29] Added support for usernames with spaces. If a Windows user has a space character in the username, 1. `userprofile` breaks into 2 variables and must be saved with `" "`. 2. `call :copy_config` is supplied with an argument but if there is a space in the argument value, it breaks into 2 arguments. 3. command `xcopy /s configs C:\Users\John Doe` is also supplied with 2 arguments because of the space character. --- install.bat | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install.bat b/install.bat index a2b416c..e1ffa85 100644 --- a/install.bat +++ b/install.bat @@ -4,9 +4,9 @@ echo Installing Square IntelliJ configs... setlocal enableDelayedExpansion -for /D %%i in (%userprofile%\.AndroidStudio*) do call :copy_config %%i -for /D %%i in (%userprofile%\.IdeaIC*) do call :copy_config %%i -for /D %%i in (%userprofile%\.IntelliJIdea*) do call :copy_config %%i +for /D %%i in ("%userprofile%"\.AndroidStudio*) do call :copy_config "%%i" +for /D %%i in ("%userprofile%"\.IdeaIC*) do call :copy_config "%%i" +for /D %%i in ("%userprofile%"\.IntelliJIdea*) do call :copy_config "%%i" echo. echo Restart IntelliJ and/or AndroidStudio, go to preferences, and apply 'Square' or 'SquareAndroid'. @@ -15,8 +15,8 @@ exit /b REM sub function for copy config files :copy_config set config_dir=%~1\config -echo Installing to !config_dir! -xcopy /s configs !config_dir! +echo Installing to "!config_dir!" +xcopy /s configs "!config_dir!" echo Done. echo. exit /b From 36abb69fd0d47a517b164f7c54831828094f397a Mon Sep 17 00:00:00 2001 From: Tai Le Date: Thu, 1 Jun 2017 16:13:44 +0800 Subject: [PATCH 05/29] Change kotlin indent size to same with Java (2 spaces) --- configs/codestyles/Square.xml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/configs/codestyles/Square.xml b/configs/codestyles/Square.xml index 0d5bd27..9109861 100644 --- a/configs/codestyles/Square.xml +++ b/configs/codestyles/Square.xml @@ -278,4 +278,11 @@