-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 78e8f7b
Showing
13 changed files
with
1,853 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
= Android Standards Repo | ||
|
||
This is a single place for all our Android Standards to live and grow. | ||
To make a change or suggest an edit to these standards please fork this | ||
repository and create a pull request. To discuss possible changes please | ||
create an issue. | ||
|
||
== code-style | ||
|
||
Contains Android Studio code style templates and an install script for copying them | ||
to your Android Studio or IntelliJ config directory. See the | ||
link:code-style/README.adoc[README] for more info. | ||
|
||
== standards | ||
|
||
Living documents which demonstrate best practices for The Nerdery's Android | ||
discipline. See them link:standards/index.adoc[here]. | ||
|
||
== License | ||
|
||
image:https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png["Creative Commons License", link="LICENSE"] | ||
|
||
This work is licensed under a link:LICENSE[Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
= Android Code Styles | ||
|
||
Android Studio code style settings for The Nerdery's Android projects. | ||
|
||
== Installation | ||
|
||
* On Unix, run the `install.sh` script. Windows users should use `install.bat` instead. | ||
* Restart Android Studio if it is running. | ||
* Open Android Studio -> Settings -> Editor -> Code Styles, change the scheme to `NerderyAndroid` | ||
|
||
== Credit | ||
|
||
Based on the Android code style customized by | ||
https://github.com/square/java-code-styles[Square]. |
Large diffs are not rendered by default.
Oops, something went wrong.
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<inspections profile_name="Nerdery" version="1.0"> | ||
<option name="myName" value="Nerdery" /> | ||
<inspection_tool class="FallthruInSwitchStatement" enabled="true" level="ERROR" enabled_by_default="true" /> | ||
<inspection_tool class="UnnecessarySemicolon" enabled="true" level="ERROR" enabled_by_default="true" /> | ||
</inspections> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<application> | ||
<component name="CodeInsightSettings"> | ||
<EXCLUDED_PACKAGE NAME="autovalue.shaded" /> | ||
<EXCLUDED_PACKAGE NAME="avro.shaded" /> | ||
<EXCLUDED_PACKAGE NAME="com.beust.jcommander.internal" /> | ||
<EXCLUDED_PACKAGE NAME="com.sun.istack" /> | ||
<EXCLUDED_PACKAGE NAME="jline.internal" /> | ||
<EXCLUDED_PACKAGE NAME="joptsimple.internal" /> | ||
<EXCLUDED_PACKAGE NAME="junit.framework.Assert" /> | ||
<EXCLUDED_PACKAGE NAME="org.assertj.core.util" /> | ||
<EXCLUDED_PACKAGE NAME="org.flywaydb.core.internal.util" /> | ||
<EXCLUDED_PACKAGE NAME="org.hibernate.validator.internal" /> | ||
<EXCLUDED_PACKAGE NAME="org.mockito.internal.util.collections" /> | ||
<EXCLUDED_PACKAGE NAME="org.mockito.internal.verification.VerificationModeFactory" /> | ||
<EXCLUDED_PACKAGE NAME="junit.framework.Assert" /> | ||
</component> | ||
</application> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
REM Installs The Nerdery's IntelliJ configs into your user configs. | ||
@echo off | ||
echo Installing Nerdery 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 'NerderyAndroid'. | ||
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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
# Installs The Nerdery's Android Studio configs into your user configs. | ||
|
||
echo "Installing Nerdery Android Studio configs..." | ||
|
||
CONFIGS="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/configs" | ||
# escape spaces in path | ||
CONFIGS=$(echo $CONFIGS | sed 's/ /\\ /g') | ||
|
||
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 | ||
|
||
# Install file templates | ||
mkdir -p $i/fileTemplates/includes | ||
cp -fv "$CONFIGS/fileTemplates/includes/File Header.java" $i/fileTemplates/includes | ||
fi | ||
done | ||
|
||
echo "Done." | ||
echo "" | ||
echo "Restart Android Studio, go to preferences, and apply 'NerderyAndroid'." |
Oops, something went wrong.