Skip to content

Commit 50b7594

Browse files
authored
Merge pull request #1 from jyygithub/canary
update
2 parents 5977475 + 6ee7604 commit 50b7594

File tree

5 files changed

+32
-28
lines changed

5 files changed

+32
-28
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 jiangyy
3+
Copyright (c) 2019-2023 jiangyy
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
# AutoGradle
2-
3-
[![Github](https://img.shields.io/badge/github-AutoGradle-blue.svg)](https://www.github.com/jyygithub/AutoGradle)
4-
[![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.3.1-lightgrey.svg)](https://plugins.jetbrains.com/plugin/12061-autogradle)
6-
![Support](https://img.shields.io/badge/support-Android%20Studio-green.svg)
7-
8-
## Get libraries and implementation quickly.
1+
<p align="center">
2+
<a target="_blank">
3+
<img width="128" src="https://raw.githubusercontent.com/jyygithub/AutoGradle/d05df84cdf71cdb2d107cd179090ad949a20ee33/src/main/resources/META-INF/pluginIcon.svg" alt="logo">
4+
</a>
5+
</p>
6+
<p align="center">
7+
<img src="https://img.shields.io/github/v/release/jyygithub/AutoGradle" alt="release">
8+
<img src="https://img.shields.io/github/repo-size/jyygithub/AutoGradle?color=orange&label=size" alt="size">
9+
</p>
10+
<h2 align="center">
11+
Get libraries and implementation quickly.
12+
</h2>
913

1014
## Usage
1115

build.gradle.kts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
plugins {
22
id("java")
3-
id("org.jetbrains.kotlin.jvm") version "1.7.10"
4-
id("org.jetbrains.intellij") version "1.9.0"
3+
id("org.jetbrains.kotlin.jvm") version "1.8.10"
4+
id("org.jetbrains.intellij") version "1.13.3"
55
}
66

77
group = "com.jiangyy"
8-
version = "1.3.1"
8+
version = "1.3.2"
99

1010
repositories {
1111
mavenCentral()
1212
}
1313

1414
dependencies {
1515
implementation("com.squareup.okhttp3:okhttp:4.10.0")
16-
implementation("com.google.code.gson:gson:2.9.0")
16+
implementation("com.google.code.gson:gson:2.10.1")
1717
}
1818

1919
// Configure Gradle IntelliJ Plugin
@@ -37,7 +37,7 @@ tasks {
3737

3838
patchPluginXml {
3939
sinceBuild.set("213")
40-
untilBuild.set("223.*")
40+
untilBuild.set("232.*")
4141
}
4242

4343
signPlugin {

src/main/kotlin/com/jiangyy/autogradle/entity/Reponse.kt renamed to src/main/kotlin/com/jiangyy/autogradle/entity/ApiResponse.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.jiangyy.autogradle.entity
22

3-
class Reponse(
3+
class ApiResponse(
44
val code: Int,
55
val message: String,
66
val data: MutableList<Repository>

src/main/kotlin/com/jiangyy/autogradle/ui/EntranceDialog.kt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import com.intellij.ui.components.JBScrollPane
1111
import com.intellij.ui.layout.panel
1212
import com.intellij.ui.table.JBTable
1313
import com.intellij.util.ui.JBDimension
14-
import com.jiangyy.autogradle.entity.Reponse
14+
import com.jiangyy.autogradle.entity.ApiResponse
1515
import com.jiangyy.autogradle.entity.Repository
1616
import com.jiangyy.autogradle.utils.orDefault
1717
import okhttp3.*
@@ -33,7 +33,7 @@ import javax.swing.event.DocumentListener
3333
import javax.swing.text.BadLocationException
3434

3535
class EntranceDialog(@Nullable private val event: AnActionEvent) : DialogWrapper(true), DocumentListener,
36-
MouseListener, ItemListener {
36+
MouseListener, ItemListener {
3737

3838
private var bindData = mutableListOf<Repository>()
3939
private var originalData = mutableListOf<Repository>()
@@ -90,9 +90,9 @@ class EntranceDialog(@Nullable private val event: AnActionEvent) : DialogWrapper
9090
}
9191

9292
val keys = arrayOf(
93-
"All", "Androidx", "Cache", "Chart", "CustomView", "Debug", "Dialog", "Http",
94-
"Image", "Json", "Kit", "Log", "Permission", "Picker", "RecyclerView", "Subscribe",
95-
"WebView"
93+
"All", "Androidx", "Cache", "Chart", "CustomView", "Debug", "Dialog", "Http",
94+
"Image", "Json", "Kit", "Log", "Permission", "Picker", "RecyclerView", "Subscribe",
95+
"WebView"
9696
)
9797

9898
comboBox = ComboBox<String>().apply {
@@ -222,7 +222,7 @@ class EntranceDialog(@Nullable private val event: AnActionEvent) : DialogWrapper
222222
for (i in originalData.indices) {
223223
val item = originalData[i]
224224
if (
225-
item.nickname.orEmpty().lowercase().contains(input.orEmpty())
225+
item.nickname.orEmpty().lowercase().contains(input.orEmpty())
226226
) {
227227
bindData.add(originalData[i])
228228
}
@@ -233,9 +233,9 @@ class EntranceDialog(@Nullable private val event: AnActionEvent) : DialogWrapper
233233
for (i in originalData.indices) {
234234
val item = originalData[i]
235235
if (
236-
item.nickname.orEmpty().lowercase().contains(input.orEmpty())
237-
&&
238-
item.key.orEmpty().lowercase() == key.orEmpty().lowercase()
236+
item.nickname.orEmpty().lowercase().contains(input.orEmpty())
237+
&&
238+
item.key.orEmpty().lowercase() == key.orEmpty().lowercase()
239239
) {
240240
bindData.add(originalData[i])
241241
}
@@ -288,14 +288,14 @@ class EntranceDialog(@Nullable private val event: AnActionEvent) : DialogWrapper
288288

289289
private fun listRepos() {
290290
OkHttpClient().newCall(
291-
Request.Builder()
292-
.addHeader("factory-api-version", "v2.0")
293-
.url("https://plugins.95factory.com/api/autogradle/repository").get().build()
291+
Request.Builder()
292+
.addHeader("factory-api-version", "v2.0")
293+
.url("https://plugins.95factory.com/api/autogradle/repository").get().build()
294294
).enqueue(object : Callback {
295295
override fun onFailure(call: Call, e: IOException) {}
296296

297297
override fun onResponse(call: Call, response: Response) {
298-
Gson().fromJson<Reponse>(response.body?.string(), Reponse::class.java)?.let { result ->
298+
Gson().fromJson<ApiResponse>(response.body?.string(), ApiResponse::class.java)?.let { result ->
299299
originalData = result.data
300300
bindData.clear()
301301
bindData.addAll(result.data)

0 commit comments

Comments
 (0)