Skip to content

Commit f49ff3c

Browse files
authored
Merge pull request #96 from virusman/gradle-jcenter
Gradle repo update: jcenter + shift modifier
2 parents 47ace7e + 3f9d3e7 commit f49ff3c

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Package Managers.alfredworkflow

275 Bytes
Binary file not shown.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Package Managers ([Download v3.11](https://github.com/willfarrell/alfred-pkgman-workflow/releases/download/3.11/Package.Managers.alfredworkflow))
1+
# Package Managers ([Download v3.12](https://github.com/willfarrell/alfred-pkgman-workflow/releases/download/3.12/Package.Managers.alfredworkflow))
22

33
Package Repo Search
44

src/Gradle.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ class Gradle extends Repo
88
{
99
protected $id = 'gradle';
1010
protected $kind = 'libraries';
11-
protected $url = 'http://search.maven.org';
12-
protected $search_url = 'http://search.maven.org/#search%7Cga%7C1%7C';
11+
protected $url = 'https://bintray.com/bintray/jcenter';
12+
protected $search_url = 'https://bintray.com/search?query=';
1313

1414
public function search($query)
1515
{
@@ -20,19 +20,19 @@ public function search($query)
2020
$this->pkgs = $this->cache->get_query_json(
2121
$this->id,
2222
$query,
23-
"{$this->url}/solrsearch/select?q={$query}&rows=10&wt=json"
23+
"https://api.bintray.com/search/packages/maven?q=*{$query}*"
2424
)->response->docs;
2525

2626
foreach($this->pkgs as $pkg) {
2727

2828
// make params
2929
$title = "{$pkg->a} (v{$pkg->latestVersion})";
30-
$url = "{$this->url}/#artifactdetails%7C{$pkg->g}%7C{$pkg->a}%7C{$pkg->latestVersion}%7C{$pkg->p}";
30+
$url = "{$this->url}/{$pkg->id}/view";
3131
$details = "GroupId: {$pkg->id}";
3232

3333
$this->cache->w->result(
3434
$pkg->a,
35-
$this->makeArg($pkg->a, $url),
35+
$this->makeArg($pkg->id, $url, "{$pkg->id}:{$pkg->latestVersion}"),
3636
$title,
3737
$details,
3838
"icon-cache/{$this->id}.png"

0 commit comments

Comments
 (0)