Repository: android10/java-code-styles Branch: master Commit: d1798d20307c Files: 7 Total size: 33.1 KB Directory structure: gitextract_0twaui5s/ ├── README.md ├── configs/ │ ├── codestyles/ │ │ ├── Square.xml │ │ └── SquareAndroid.xml │ ├── inspection/ │ │ └── Square.xml │ └── options/ │ └── editor.codeinsight.xml ├── install.bat └── install.sh ================================================ FILE CONTENTS ================================================ ================================================ FILE: README.md ================================================ Java Code Styles ================ IntelliJ IDEA code style settings for Square's Java and Android projects. Installation ------------ * 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. License ------- [![Public domain](https://licensebuttons.net/p/zero/1.0/88x31.png)](https://creativecommons.org/publicdomain/zero/1.0/legalcode) ================================================ FILE: configs/codestyles/Square.xml ================================================ ================================================ FILE: configs/codestyles/SquareAndroid.xml ================================================ ================================================ FILE: configs/inspection/Square.xml ================================================ ================================================ FILE: configs/options/editor.codeinsight.xml ================================================ ================================================ FILE: install.bat ================================================ 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 ================================================ FILE: install.sh ================================================ #!/bin/bash # Installs Square's IntelliJ configs into your user configs. echo "Installing Square IntelliJ configs..." CONFIGS="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/configs" for i in $HOME/Library/Preferences/IntelliJIdea* \ $HOME/Library/Preferences/IdeaIC* \ $HOME/Library/Preferences/AndroidStudio* \ $HOME/.IntelliJIdea*/config \ $HOME/.IdeaIC*/config \ $HOME/.AndroidStudio*/config do if [[ -d $i ]]; then # Install codestyles mkdir -p $i/codestyles cp -frv "$CONFIGS/codestyles"/* $i/codestyles # 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 echo "Done." echo "" echo "Restart IntelliJ and/or AndroidStudio, go to preferences, and apply 'Square' or 'SquareAndroid'."