File tree Expand file tree Collapse file tree 1 file changed +36
-8
lines changed
Expand file tree Collapse file tree 1 file changed +36
-8
lines changed Original file line number Diff line number Diff line change 22
33## Installation
44
5- ``` xml
6- <dependency >
7- <groupId >cloud.unum</groupId >
8- <artifactId >usearch</artifactId >
9- <version >2.20.0</version >
10- </dependency >
11- ```
5+ For the most up-to-date version, automatically download from GitHub releases and build with Gradle:
126
13- Add that snippet to your ` pom.xml ` and hit ` mvn install ` .
7+ ``` groovy
8+ repositories {
9+ mavenCentral()
10+
11+ // Custom repository for USearch JAR
12+ flatDir {
13+ dirs 'lib'
14+ }
15+ }
16+
17+ // Task to download USearch JAR from GitHub releases
18+ task downloadUSearchJar {
19+ doLast {
20+ def usearchVersion = '2.20.0'
21+ def usearchUrl = "https://github.com/unum-cloud/usearch/releases/download/v${usearchVersion}/usearch-${usearchVersion}.jar"
22+ def usearchFile = file("lib/usearch-${usearchVersion}.jar")
23+
24+ usearchFile.parentFile.mkdirs()
25+ if (!usearchFile.exists()) {
26+ new URL(usearchUrl).withInputStream { i ->
27+ usearchFile.withOutputStream { it << i }
28+ }
29+ println "Downloaded USearch JAR: ${usearchFile.name}"
30+ }
31+ }
32+ }
33+
34+ // Make compilation depend on downloading USearch
35+ compileJava.dependsOn downloadUSearchJar
36+
37+ dependencies {
38+ // USearch JAR from local lib directory (downloaded automatically)
39+ implementation name: 'usearch', version: '2.20.0', ext: 'jar'
40+ }
41+ ```
1442
1543## Quickstart
1644
You can’t perform that action at this time.
0 commit comments