Skip to content

Commit

Permalink
Merge pull request #69 from liquidz/dev
Browse files Browse the repository at this point in the history
ver 0.12.2
  • Loading branch information
liquidz authored Mar 18, 2021
2 parents ca123bc + 51d6144 commit d58d4e5
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 6 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ All notable changes to this project will be documented in this file. This change

== Unreleased (dev)

== 0.12.2 (2021-03-19)
// {{{
=== Changed
* Bumped rewrite-clj to 1.0.591-alpha.

=== Fixed
* Fixed some reflection warnings.
// }}}

== 0.12.1 (2021-03-17)
// {{{
=== Fixed
Expand Down
2 changes: 1 addition & 1 deletion deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
cheshire/cheshire {:mvn/version "5.10.0"}
clj-commons/clj-yaml {:mvn/version "0.7.106"}
version-clj/version-clj {:mvn/version "2.0.1"}
rewrite-clj/rewrite-clj {:mvn/version "1.0.579-alpha"}}
rewrite-clj/rewrite-clj {:mvn/version "1.0.591-alpha"}}

:aliases
{:1.8
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.liquidz</groupId>
<artifactId>antq</artifactId>
<version>0.12.1</version>
<version>0.12.2</version>
<name>antq</name>
<description>Point out your outdated dependencies</description>
<url>https://github.com/liquidz/antq</url>
Expand Down Expand Up @@ -37,7 +37,7 @@
<dependency>
<groupId>rewrite-clj</groupId>
<artifactId>rewrite-clj</artifactId>
<version>1.0.579-alpha</version>
<version>1.0.591-alpha</version>
</dependency>
<dependency>
<groupId>org.clojure</groupId>
Expand Down
14 changes: 12 additions & 2 deletions src/antq/diff/java.clj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
[antq.util.url :as u.url]
[clojure.string :as str])
(:import
(org.eclipse.aether
DefaultRepositorySystemSession
RepositorySystem)
(org.eclipse.aether.artifact
Artifact)
(org.eclipse.aether.repository
RemoteRepository)
(org.eclipse.aether.resolution
ArtifactRequest)))

Expand All @@ -24,12 +31,15 @@
[{:keys [name version] :as dep}]
(try
(let [opts (u.mvn/dep->opts dep)
{:keys [system session artifact remote-repos]} (u.mvn/repository-system name version opts)
{:keys [^RepositorySystem system
^DefaultRepositorySystemSession session
^Artifact artifact
remote-repos]} (u.mvn/repository-system name version opts)
req (doto (ArtifactRequest.)
(.setArtifact artifact)
(.setRepositories remote-repos))]
(some-> (.resolveArtifact system session req)
(.getRepository)
^RemoteRepository (.getRepository)
(.getUrl)))
;; Skip showing diff URL when fetching repository URL is failed
(catch Exception _ nil)))
Expand Down
10 changes: 9 additions & 1 deletion src/antq/ver/java.clj
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,20 @@
[antq.ver :as ver]
[version-clj.core :as version])
(:import
(org.eclipse.aether
DefaultRepositorySystemSession
RepositorySystem)
(org.eclipse.aether.artifact
Artifact)
(org.eclipse.aether.resolution
VersionRangeRequest)))

(defn get-versions
[name opts]
(let [{:keys [system session artifact remote-repos]} (u.mvn/repository-system name "[0,)" opts)
(let [{:keys [^RepositorySystem system
^DefaultRepositorySystemSession session
^Artifact artifact
remote-repos]} (u.mvn/repository-system name "[0,)" opts)
req (doto (VersionRangeRequest.)
(.setArtifact artifact)
(.setRepositories remote-repos))]
Expand Down

0 comments on commit d58d4e5

Please sign in to comment.