- Open Android Studio
- Go to: Tools > Create Command-line Launcher
- Leave as default, Press OK
- Add the following lines to your
.gitconfig
| public static float convertPixelsToDp(float px){ | |
| DisplayMetrics metrics = Resources.getSystem().getDisplayMetrics(); | |
| float dp = px / (metrics.densityDpi / 160f); | |
| return Math.round(dp); | |
| } | |
| public static float convertDpToPixel(float dp){ | |
| DisplayMetrics metrics = Resources.getSystem().getDisplayMetrics(); | |
| float px = dp * (metrics.densityDpi / 160f); | |
| return Math.round(px); |
| /* | |
| * Copyright (C) 2008 The Android Open Source Project | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| $apiKey = "" #Octopus API Key | |
| $OctopusURL = "" #Octopus URL | |
| $ProjectName = "" #project name | |
| $Header = @{ "X-Octopus-ApiKey" = $apiKey } | |
| #Getting Project By Name | |
| $Project = Invoke-WebRequest -Uri "$OctopusURL/api/projects/$ProjectName" -Headers $Header| ConvertFrom-Json | |
| #Getting Deployment Template to get next release version |