Skip to content

Commit f486a9f

Browse files
author
jiangyunyang
committed
新增Repository;Repository版本更新;AndroidX支持
1 parent ec693a8 commit f486a9f

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Github](https://img.shields.io/badge/github-AutoGradle-blue.svg)](https://www.github.com/jyygithub/AutoGradle)
44
[![Issue](https://img.shields.io/badge/issue-AutoGradle-red.svg)](https://github.com/jyygithub/AutoGradle/issues)
5-
[![Version](https://img.shields.io/badge/version-1.0.2-lightgrey.svg)](https://plugins.jetbrains.com/plugin/12061-autogradle)
5+
[![Version](https://img.shields.io/badge/version-1.0.3-lightgrey.svg)](https://plugins.jetbrains.com/plugin/12061-autogradle)
66
![Support](https://img.shields.io/badge/support-Android%20Studio-green.svg)
77

88
## A auto import gradle project plugin.

resources/META-INF/plugin.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<idea-plugin>
22
<id>com.jiangyy.auto-gradle</id>
33
<name>AutoGradle</name>
4-
<version>1.0.2</version>
4+
<version>1.0.3</version>
55
<vendor email="jiangyychn@gmail.com" url="http://www.github.com/jyygithub/AutoGradle">
66
http://www.github.com/jyygithub/AutoGradle
77
</vendor>
@@ -26,11 +26,11 @@
2626
<li>Click the button below</li>
2727
</ul>
2828
<br/>
29-
<p><img src="http://jiangyunyang.com//plugin/AutoGradle/img/toolbar_logo.png" width="750" height="30" alt="toolbar_logo.png"/></p>
29+
<p><img src="https://github.com/jyygithub/AutoGradle/blob/master/img/plugin_toolbar.png" width="750" height="30" alt="toolbar_logo.png"/></p>
3030
<br/>
3131
<h2>The following figure is the operation interface</h2>
3232
<br/>
33-
<p><img src="http://jiangyunyang.com//plugin/AutoGradle/img/home_dialog.png" width="750" height="370" alt="screenshots.png"/></p>
33+
<p><img src="https://github.com/jyygithub/AutoGradle/blob/master/img/plugin_main.png" width="750" height="370" alt="screenshots.png"/></p>
3434
<br/>
3535
<p><a href="https://github.com/jyygithub/AutoGradle/issues">Send feedback</a></p>
3636
]]></description>
@@ -39,6 +39,7 @@
3939
<ul>
4040
<li>增加Repository</li>
4141
<li>新增AndroidX支持</li>
42+
<li>修复BUG</li>
4243
</ul>
4344
<a href="https://github.com/jyygithub/AutoGradle/blob/master/CHANGELOG.md"><b>Full Changelog History</b></a>
4445
]]></change-notes>

src/com/jiangyy/ui/HomeDialog.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,23 +151,28 @@ private void insetStringAfterOffset(AnActionEvent e, List<Repository> data) {
151151
public void run() {
152152
for (Repository resp : data) {
153153
if (resp.isChoose()) {
154-
String impl = "\n // " + resp.getName() + "\n implementation \'" + resp.getGradle() + resp.getVersion() + "\'";
155-
if (!resp.getProcessor().isEmpty()) {
156-
if (androidXCheckBox.isSelected()) {
154+
if (androidXCheckBox.isSelected()) {
155+
String impl = "\n // " + resp.getName() + "\n implementation \'" + resp.getGradle_x() + resp.getVersion_x() + "\'";
156+
if (!resp.getProcessor().isEmpty()) {
157157
if (kotlinCheckBox.isSelected()) {
158158
impl += "\n kapt \'" + resp.getProcessor_x() + resp.getVersion_x() + "\'";
159159
} else {
160160
impl += "\n annotationProcessor \'" + resp.getProcessor_x() + resp.getVersion_x() + "\'";
161161
}
162-
} else {
162+
}
163+
editor.getDocument().insertString(offset, impl);
164+
} else {
165+
String impl = "\n // " + resp.getName() + "\n implementation \'" + resp.getGradle() + resp.getVersion() + "\'";
166+
if (!resp.getProcessor().isEmpty()) {
163167
if (kotlinCheckBox.isSelected()) {
164168
impl += "\n kapt \'" + resp.getProcessor() + resp.getVersion() + "\'";
165169
} else {
166170
impl += "\n annotationProcessor \'" + resp.getProcessor() + resp.getVersion() + "\'";
167171
}
168172
}
173+
editor.getDocument().insertString(offset, impl);
169174
}
170-
editor.getDocument().insertString(offset, impl);
175+
171176
}
172177
}
173178
}

0 commit comments

Comments
 (0)