Skip to content

Commit

Permalink
Add support for platforms 29 and 30 (and above) (#3)
Browse files Browse the repository at this point in the history
* Update Readme

Add java JDK requirement

* Add potential letters to API regex.

Add two new entries to the Aliases dict.
  • Loading branch information
GlassToeStudio authored Sep 20, 2020
1 parent 304e9a4 commit 5758000
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 29 deletions.
27 changes: 19 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,38 @@
---
## Prerequisites
---
### Already have a valid Sdk installed?
* You are done :D

__This Program requires the Android SDK Command Line Tools and the Java JDK__
### ★ Already have a valid Sdk installed and Java JDK?
* You are done :D

### Don't have a valid Sdk installed?
---

__Go download [Android Sdk Command Line Tools](https://developer.android.com/studio#downloads) installed. (For windows)__
#### ★ Don't have a valid JDK installed?

* __Go download [Java JDK](https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) and install it. (For Windows)__

* After installation add Java to your `PATH`
* More information about adding Java to `PATH` can be found [here](https://javatutorial.net/set-java-home-windows-10)

* Create a root `Sdk` folder somewhere that is easy to find `C:\\` is a good place.
* Extract the zip file to that root `Sdk` folder.
* Folder structure should be `C:\\Sdk\tools` (if you chose `C:\\`)
* Folder structure is important for this to work, since you will need to navigate to the root `Sdk` folder within the application, It will then look in `\tools\bin\` for the sdkmanager.bat file that is included with the command-line tools.
#### ★ Don't have a valid Sdk installed?

* __Go download [Android Sdk Command Line Tools](https://developer.android.com/studio#downloads). (For windows)__

* Create a root `Sdk` folder somewhere that is easy to find `C:\\` is a good place.
* Extract the zip file to that root `Sdk` folder.
* Folder structure should be `C:\\Sdk\tools` (if you chose `C:\\`)
* Folder structure is important for this to work, since you will need to navigate to the root `Sdk` folder within the application, It will then look in `\tools\bin\` for the sdkmanager.bat file that is included with the command-line tools.

---

### Notes:
* I named the root folder `Sdk`, the name does not matter. Additionally, this folder can be inside any other folder. The important part is that you know which is the root.
* A common structure is `C:\\Android\Sdk\` or `C:\\Android-Sdk\` as the root folder name.
* It is preferable (but not necessary) that `C:\\Sdk\tools` has been added to your `PATH`.
* More info about adding to your `PATH` can be found [here](https://www.androidcentral.com/installing-android-sdk-windows-mac-and-linux-tutorial)


* If contributing, be sure to have `git` installed.
---

Expand Down
2 changes: 2 additions & 0 deletions SdkManager.Core/SDKManager/Utilities/LookUpTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ public static class LookUpTable
{ "Android SDK Platform 26", "Android 8.0 (Oreo)"},
{ "Android SDK Platform 27", "Android 8.1 (Oreo)"},
{ "Android SDK Platform 28", "Android 28 (Pie)"},
{ "Android SDK Platform 29", "Android 10"},
{ "Android SDK Platform 30", "Android 11"},
{ "Android SDK Platform Q", "Android SDK Platform Q"},
{ "android-28", "Android SDK Platform 28"},
};
Expand Down
10 changes: 5 additions & 5 deletions SdkManager.Core/SDKManager/Utilities/Patterns.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,23 @@ public static class Patterns
/// <summary>
/// Expression to match the pattern of all high-level platforms.
/// </summary>
public const string PLATFORM_PATTERN = @"(?<Platform>(?:platforms;android-)(?<APILevel>[\d]*))(?:[\s]*Description[:][\s]*)(?<Description>Android[\s\w]*\n)(?:[\s]*[\w\s]*[:][\s]*)(?<Version>[\d]*)(?:(?:[\s]*Installed Location[:][\s]*)(?<Installed_Location>[\s]*[\w\:\\\-]*))?";
public const string PLATFORM_PATTERN = @"(?<Platform>(?:platforms;android-)(?<APILevel>[\da-zA-Z]*))(?:[\s]*Description[:][\s]*)(?<Description>Android[\s\w]*\n)(?:[\s]*[\w\s]*[:][\s]*)(?<Version>[\d]*)(?:(?:[\s]*Installed Location[:][\s]*)(?<Installed_Location>[\s]*[\w\:\\\-]*))?";
/// <summary>
/// Expression to match the pattern of all google api packages.
/// </summary>
public const string GOOGLE_APIS = @"(?<Platform>(?:add-ons;addon-google_apis-google-)(?<APILevel>[\d]*))(?:[\s\w]*[:][\s]*)(?<Description>Google[\s\w]*\n)(?:[\s]*[\w\s]*[:][\s]*)(?<Version>[\d]*)(?:(?:[\s]*Installed Location[:][\s]*)(?<Installed_Location>[\s]*[\w\:\\\-]*))?";
public const string GOOGLE_APIS = @"(?<Platform>(?:add-ons;addon-google_apis-google-)(?<APILevel>[\da-zA-Z]*))(?:[\s\w]*[:][\s]*)(?<Description>Google[\s\w]*\n)(?:[\s]*[\w\s]*[:][\s]*)(?<Version>[\d]*)(?:(?:[\s]*Installed Location[:][\s]*)(?<Installed_Location>[\s]*[\w\:\\\-]*))?";
/// <summary>
/// Expression to match the pattern of all platform sources.
/// </summary>
public const string SOURCES_PATTERN = @"(?<Platform>(?:sources;android-)(?<APILevel>[\d]*))(?:[\s\w]*[:][\s]*)(?<Description>Sources[\s\w]*\n)(?:[\s]*[\w\s]*[:][\s]*)(?<Version>[\d]*)(?:(?:[\s]*Installed Location[:][\s]*)(?<Installed_Location>[\s]*[\w\:\\\-]*))?";
public const string SOURCES_PATTERN = @"(?<Platform>(?:sources;android-)(?<APILevel>[\da-zA-Z]*))(?:[\s\w]*[:][\s]*)(?<Description>Sources[\s\w]*\n)(?:[\s]*[\w\s]*[:][\s]*)(?<Version>[\d]*)(?:(?:[\s]*Installed Location[:][\s]*)(?<Installed_Location>[\s]*[\w\:\\\-]*))?";
/// <summary>
/// Expression to match the pattern of all system images.
/// </summary>
public const string SYSTEM_IMAGES_PATTERN = @"(?<Platform>(?:system-images;android-)(?<APILevel>[\d]*)[\s\w\-\;]*\n)(?:[\s]*Description[:][\s]*)(?<Description>[\s\w]*\n)(?:[\s]*[\w\s]*[:][\s]*)(?<Version>[\d]*)(?:(?:[\s]*Installed Location[:][\s]*)(?<Installed_Location>[\s]*[\w\:\\\-]*))?";
public const string SYSTEM_IMAGES_PATTERN = @"(?<Platform>(?:system-images;android-)(?<APILevel>[\da-zA-Z]*)[\s\w\-\;]*\n)(?:[\s]*Description[:][\s]*)(?<Description>[\s\w]*\n)(?:[\s]*[\w\s]*[:][\s]*)(?<Version>[\d]*)(?:(?:[\s]*Installed Location[:][\s]*)(?<Installed_Location>[\s]*[\w\:\\\-]*))?";
/// <summary>
/// Expression to match the pattern of google glass packages.
/// </summary>
public const string GOOGLE_GLASS_PATTERN = @"(?<Platform>(?:add-ons;addon-google_gdk-google-)(?<APILevel>[\d]*))(?:[\s\w]*[:][\s]*)(?<Description>Glass[\s\w]*\n)(?:[\s]*[\w\s]*[:][\s]*)(?<Version>[\d]*)(?:(?:[\s]*Installed Location[:][\s]*)(?<Installed_Location>[\s]*[\w\:\\\-]*))?";
public const string GOOGLE_GLASS_PATTERN = @"(?<Platform>(?:add-ons;addon-google_gdk-google-)(?<APILevel>[\da-zA-Z]*))(?:[\s\w]*[:][\s]*)(?<Description>Glass[\s\w]*\n)(?:[\s]*[\w\s]*[:][\s]*)(?<Version>[\d]*)(?:(?:[\s]*Installed Location[:][\s]*)(?<Installed_Location>[\s]*[\w\:\\\-]*))?";

// This requires a different method to parse.
/// <summary>
Expand Down
6 changes: 3 additions & 3 deletions SdkManager.UI/StandaloneSDKManager.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<SignManifests>true</SignManifests>
<SignManifests>false</SignManifests>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Icon.ico</ApplicationIcon>
Expand All @@ -69,8 +69,7 @@
</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup>
<ManifestKeyFile>
</ManifestKeyFile>
<ManifestKeyFile>StandaloneSDKManagerUWP_StoreKey.pfx</ManifestKeyFile>
</PropertyGroup>
<PropertyGroup>
<GenerateManifests>true</GenerateManifests>
Expand Down Expand Up @@ -245,6 +244,7 @@
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<None Include="StandaloneSDKManagerUWP_StoreKey.pfx" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace SdkManager.UI
{
Expand Down

0 comments on commit 5758000

Please sign in to comment.