Skip to content
This repository was archived by the owner on Jul 4, 2023. It is now read-only.

Commit 9d67189

Browse files
author
Matt York
committed
Merge branch 'master' of https://github.com/AndroidGears/Plugin
2 parents f86331b + 8282171 commit 9d67189

File tree

7 files changed

+71
-51
lines changed

7 files changed

+71
-51
lines changed
3.77 KB
Loading
3.77 KB
Loading
3.77 KB
Loading

AndroidGears/src/Interfaces/AndroidGearIcons.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ public interface AndroidGearIcons {
1111
public Icon ANDROID_GEAR_ICON = IconLoader.getIcon("/gears.png");
1212
public Icon declaredIcon =IconLoader.getIcon("/GearStateDeclared.png");//Fix
1313
public Icon installedIcon =IconLoader.getIcon("/GearStateInstalled.png");//Fix
14+
public Icon jarfile =IconLoader.getIcon("/jarfile.png");//Fix
1415
}

AndroidGears/src/Renderers/GearSpecCellRenderer.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ public class GearSpecCellRenderer extends JPanel implements ListCellRenderer {
1919
JLabel nameLabel;
2020
JLabel authorLabel;
2121
JLabel imageLabel;
22+
JLabel jarLabel;
2223
ImageIcon declaredIcon = new ImageIcon(getClass().getResource("GearStateDeclared.png"));
2324
ImageIcon installedIcon = new ImageIcon(getClass().getResource("GearStateInstalled.png"));
25+
ImageIcon jarfile = new ImageIcon(getClass().getResource("jarfile.png"));
2426

2527
public GearSpecCellRenderer() {
2628
setOpaque(true);
@@ -78,11 +80,22 @@ public Component getListCellRendererComponent(
7880
break;
7981
}
8082

83+
84+
//set jar image
85+
jarLabel = new JLabel();
86+
if(spec.getType().equals("jar")){
87+
jarLabel.setIcon(jarfile);
88+
}else{
89+
jarLabel.setIcon(new ImageIcon());
90+
}
91+
92+
8193
//Add components
8294
this.add(specInfoPanel, BorderLayout.WEST);
8395
specInfoPanel.add(nameLabel);
8496
specInfoPanel.add(authorLabel);
8597
this.add(imageLabel, BorderLayout.EAST);
98+
this.add(jarLabel,BorderLayout.CENTER);
8699
}
87100
else {
88101
//Set name label
@@ -110,6 +123,12 @@ public Component getListCellRendererComponent(
110123
case 2: imageLabel.setIcon(installedIcon);
111124
break;
112125
}
126+
//set if jar
127+
if(spec.getType().equals("jar")){
128+
jarLabel.setIcon(jarfile);
129+
}else{
130+
jarLabel.setIcon(new ImageIcon());
131+
}
113132
}
114133

115134
if(isSelected) {
3.77 KB
Loading

README.md

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ An example of searching for, downloading and using an Android library in your pr
1212

1313
* [**Installation**](#installation)
1414
* [**Basic Usage**](#basic-usage)
15-
* [**Core Concepts**](#core-concepts)
16-
* [Gears](#gears)
17-
* [The Specs Repository](#the-specs-repository)
18-
* [Accessing the Specs Repository](#accessing-the-specs-repository)
19-
* [Gitignore Considerations and Working in Teams](#gitignore-considerations-and-working-in-teams)
2015
* [**Android Studio Plugin**](#android-studio-plugin)
2116
* [Managing Android Gears](#managing-android-gears)
2217
* [Creating a Gear Spec](#creating-a-gear-spec)
2318
* [Linting a Gear Spec](#linting-a-gear-spec)
2419
* [Settings](#settings)
20+
* [**Core Concepts**](#core-concepts)
21+
* [Gears](#gears)
22+
* [The Specs Repository](#the-specs-repository)
23+
* [Accessing the Specs Repository](#accessing-the-specs-repository)
24+
* [Gitignore Considerations and Working in Teams](#gitignore-considerations-and-working-in-teams)
2525
* [**Adding Your Library to Android Gears**](#adding-your-library-to-android-gears)
2626
* [Packaging Your Library](#packaging-your-library)
2727
* [Pull Requests](pull-requests)
@@ -35,7 +35,7 @@ An example of searching for, downloading and using an Android library in your pr
3535
- Download and install (and Update) [Android Studio](http://developer.android.com/sdk/installing/studio.html)
3636
- [Download latest Android Gears release](https://github.com/AndroidGears/Plugin/releases)
3737

38-
**Mac (OSX 10.9.2 & 10.9.1)**
38+
**Mac (OSX 10.9.2 & 10.9.1 tested)**
3939
- Open Android Studio
4040
- Go To Android Studio > Preferences... ( Command+,) > Go to "Plugins" under IDE Settings > Click Install plugin from disk... > find the Android Gears latest release on your computer. Click "OK" and restart your IDE.
4141
- And you are DONE!!
@@ -66,6 +66,51 @@ Finally, to access the Android Gears menu, navigate to Tools -> Android Gears (W
6666
- Once you have installed all the gears, click "Done"
6767
- All done! You should now be able to use the code from the gears you selected.
6868

69+
##Android Studio Plugin
70+
71+
The Android Gears plugin for Android Studio and IntelliJ is the engine that makes Android Gears work. It coordinates with the Specs Repository and your project to ensure that managing libraries is as painless as possible. This section will cover the basics of the plugin including how to install and uninstall Gears, as well as finer points like auto-syncing Gears across teams.
72+
73+
####Managing Android Gears
74+
75+
To manage the Android Gears for a given project, select Tools -> Android Gears -> Manage Android Gears.
76+
77+
####Creating a Gear Spec
78+
79+
Gear Specs is a text file that holds information about an Android library listed in Android Gears. The Android Gears plugin for Android Studio comes with a GUI for creating a Gear Spec that may be pulled into the Specs Repository. Use this tool to create a listing for your library. For more information about the process, see [**Adding Your Library to Android Gears**](#adding-your-library-to-android-gears).
80+
81+
When using GUI First go to Tools > Android Gears > Create GearSpec
82+
![CreateGearSpecMenu](https://raw.githubusercontent.com/AndroidGears/Resources/master/Screenshots/CreateGearMenu.png)
83+
84+
Then fill out form as best you can and we will tell you if you have done it correctly.
85+
86+
![CreateGearSpec](https://raw.githubusercontent.com/AndroidGears/Resources/master/Screenshots/CreateGearScreen.png)
87+
88+
Things to take into consideration.
89+
* All fields must be filled out unless you are pointing your Url Source directly to a .jar file. Then "Tag" and "Location" are to be left blank.
90+
* Dependencies for your libraries must already be gearspecs in the Specs Repository.
91+
* A Gearspec can have more then one Author but you must have at least one author.
92+
* Each Author must have a name and email address.
93+
* A library's version must be [semantic versioning](http://en.wikipedia.org/wiki/Software_versioning#Semantic_versioning)
94+
* Use tags to create greater visibility for your library.
95+
* When creating tag use commas to seprate out each tag.
96+
* When you are searching for your Gear after it has been added to the Specs Repository it is a full text search so Author name and project name are not required to be in the tags as well they are already part of the search algorithm.
97+
* Source must be a valid .git repository or .jar file. See the [Packaging](#packaging) section for a complete list of your options.
98+
* The homepage is the face or your library. Link it to a site that looks good and/or has alot of detailed information about your library. The library's Github page is a wonderful place to start.
99+
* If you have already created a gearspec and would like to edit it and reupload it. Use the "Load Android Gear Spec" button in the bottom left corner for quick and easy filler and editing.
100+
* To remove authors or dependencies just click on the the listing in the table and then click on the - Remove Author or Dependency button below the selected table.
101+
* Dependency addition requires both fields to be filled. These need to be the name and version of a valid gearspec in the specs repo.
102+
* License is the **name** of the License not the entire license text.
103+
* Click "Create Android Gear Spec" in the bottom right corner. This will summon the Android Gear Spec Linter. If your spec makes it past the linter you are ready to create a pull request to the Android Gears Specs Repository and add your library to our ever growing community.
104+
* HAPPY CODING!
105+
106+
####Linting a Gear Spec
107+
108+
The plugin also has a built-in linting tool for making sure your <code>.gearspec</code> file is valid before issuing a pull request to the Specs Repository. This tool will tell you if there is anything wrong. This same linting tool is used by the "Create Gear Spec" mechanism.
109+
110+
![LintGearSpec](https://raw.githubusercontent.com/AndroidGears/Resources/master/Screenshots/LintGearSpecScreenshot.png)
111+
112+
####Settings
113+
69114
##Core Concepts
70115

71116
Before getting started with Android Gears, you may find it helpful to gain a better understanding of how things work "under the hood". This section will detail some core terminology that helps make sense of the Gears system.
@@ -146,51 +191,6 @@ A great example of this system's utility is when someone inherits a mature proje
146191

147192
*Note:** There is no need to actually open the <code>GearSpecRegister</code> file, but if you do, you will find a simple array of Gear Specs. If there is ever a conflict in this file due to more than one team member manipulating it, resolving the conflict is as easy as shuffling a few JSON objects around.
148193

149-
##Android Studio Plugin
150-
151-
The Android Gears plugin for Android Studio and IntelliJ is the engine that makes Android Gears work. It coordinates with the Specs Repository and your project to ensure that managing libraries is as painless as possible. This section will cover the basics of the plugin including how to install and uninstall Gears, as well as finer points like auto-syncing Gears across teams.
152-
153-
####Managing Android Gears
154-
155-
To manage the Android Gears for a given project, select Tools -> Android Gears -> Manage Android Gears.
156-
157-
####Creating a Gear Spec
158-
159-
Gear Specs is a text file that holds information about an Android library listed in Android Gears. The Android Gears plugin for Android Studio comes with a GUI for creating a Gear Spec that may be pulled into the Specs Repository. Use this tool to create a listing for your library. For more information about the process, see [**Adding Your Library to Android Gears**](#adding-your-library-to-android-gears).
160-
161-
When using GUI First go to Tools > Android Gears > Create GearSpec
162-
![CreateGearSpecMenu](https://raw.githubusercontent.com/AndroidGears/Resources/master/Screenshots/CreateGearMenu.png)
163-
164-
Then fill out form as best you can and we will tell you if you have done it correctly.
165-
166-
![CreateGearSpec](https://raw.githubusercontent.com/AndroidGears/Resources/master/Screenshots/CreateGearScreen.png)
167-
168-
Things to take into consideration.
169-
* All fields must be filled out unless you are pointing your Url Source directly to a .jar file. Then "Tag" and "Location" are to be left blank.
170-
* Dependencies for your libraries must already be gearspecs in the Specs Repository.
171-
* A Gearspec can have more then one Author but you must have at least one author.
172-
* Each Author must have a name and email address.
173-
* A library's version must be [semantic versioning](http://en.wikipedia.org/wiki/Software_versioning#Semantic_versioning)
174-
* Use tags to create greater visibility for your library.
175-
* When creating tag use commas to seprate out each tag.
176-
* When you are searching for your Gear after it has been added to the Specs Repository it is a full text search so Author name and project name are not required to be in the tags as well they are already part of the search algorithm.
177-
* Source must be a valid .git repository or .jar file. See the [Packaging](#packaging) section for a complete list of your options.
178-
* The homepage is the face or your library. Link it to a site that looks good and/or has alot of detailed information about your library. The library's Github page is a wonderful place to start.
179-
* If you have already created a gearspec and would like to edit it and reupload it. Use the "Load Android Gear Spec" button in the bottom left corner for quick and easy filler and editing.
180-
* To remove authors or dependencies just click on the the listing in the table and then click on the - Remove Author or Dependency button below the selected table.
181-
* Dependency addition requires both fields to be filled. These need to be the name and version of a valid gearspec in the specs repo.
182-
* License is the **name** of the License not the entire license text.
183-
* Click "Create Android Gear Spec" in the bottom right corner. This will summon the Android Gear Spec Linter. If your spec makes it past the linter you are ready to create a pull request to the Android Gears Specs Repository and add your library to our ever growing community.
184-
* HAPPY CODING!
185-
186-
####Linting a Gear Spec
187-
188-
The plugin also has a built-in linting tool for making sure your <code>.gearspec</code> file is valid before issuing a pull request to the Specs Repository. This tool will tell you if there is anything wrong. This same linting tool is used by the "Create Gear Spec" mechanism.
189-
190-
![LintGearSpec](https://raw.githubusercontent.com/AndroidGears/Resources/master/Screenshots/LintGearSpecScreenshot.png)
191-
192-
####Settings
193-
194194
##Adding Your Library to Android Gears
195195

196196
So you have created your shiny, new Android library and you want to make it available to all the world through Android Gears! Adding your library is as simple as initiating a properly formatted pull request to the [Specs Repository](https://github.com/AndroidGears/Specs). At the high level, the entire process is as follows:

0 commit comments

Comments
 (0)