Created
May 8, 2016 10:22
-
-
Save masaibar/2e05653a30234dfb4f5544c280e9d871 to your computer and use it in GitHub Desktop.
AndroidManifest.xmlにAPIキーを書いたコードをGitHubにコミットしないために ref: http://qiita.com/masaibar/items/38735c99da6f1d439f0a
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
<activity | |
android:name=".MainActivity" | |
android:label="${label}" | |
android:theme="@style/AppTheme.NoActionBar"> | |
<intent-filter> | |
<action android:name="android.intent.action.MAIN"/> | |
<category android:name="android.intent.category.LAUNCHER"/> | |
</intent-filter> | |
</activity> |
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
buildTypes { | |
debug { | |
minifyEnabled false | |
signingConfig signingConfigs.debug | |
//manifestPlaceholders = [label: "testlabel"] #ベタ書きの例、これでも動くが... | |
manifestPlaceholders = [label: System.getenv("LABEL")] | |
} | |
} |
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
#LABELという環境変数に"testlabel"を設定する | |
$ launchctl setenv LABEL testlabel | |
#設定されていることを確認する | |
$ launchctl getenv LABEL | |
testlabel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment