Skip to content

Commit

Permalink
Add document for setting up Gradle #83
Browse files Browse the repository at this point in the history
  • Loading branch information
liquidz committed Jun 25, 2021
1 parent db4dc71 commit 0183dda
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ In another way, you can use the following action.

* https://github.com/liquidz/antq-action

=== Gradle

Antq experimentally supports https://gradle.org[Gradle].
See link:./doc/gradle.adoc[here] for details.

== Options
=== --upgrade
Upgrade outdated versions interactively.
Expand Down Expand Up @@ -236,6 +241,7 @@ When you use `--error-format` option, this reporter will be used automatically.
* link:./doc/avoid-slf4j-warnings.adoc[Avoid SLF4J warnings]
* link:./doc/latest-version-of-a-specific-library.adoc[Latest version of a specific library]
* link:./doc/clojure-1.7.adoc[Antq with Clojure 1.7.0 or earlier]
* link:./doc/gradle.adoc[Work with Gradle]

== License

Expand Down
48 changes: 48 additions & 0 deletions doc/gradle.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
= Work with Gradle

WARNING: Gradle support is experimental

== Requirements

* `gradle` command must be installed.
** antq alone does not work.

== build.gradle

To work with gradle, you should update your `build.gradle` as following.

[source,build.gradle]
----
plugins {
id 'java-library'
}
repositories {
mavenCentral()
maven {
name = 'clojars'
url = 'https://repo.clojars.org'
}
}
dependencies {
runtimeOnly 'org.clojure:clojure:1.10.3'
runtimeOnly 'com.github.liquidz:antq:latest.release'
}
// OPTIONAL: Used to support detecting repositories
task antq_list_repositories {
doLast {
project.repositories.each { println "ANTQ;" + it.name + ";" + it.url }
}
}
// Main task to run antq
task outdated(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
mainClass = "clojure.main"
args = ['-m', 'antq.core']
}
----

Then, run `gradle outdated`.

0 comments on commit 0183dda

Please sign in to comment.