Skip to content

Commit 7c4e8c9

Browse files
committed
Add Gradle setup instructions
1 parent 1408604 commit 7c4e8c9

File tree

1 file changed

+15
-4
lines changed
  • articles/ai-services/computer-vision/includes/setup-sdk

1 file changed

+15
-4
lines changed

articles/ai-services/computer-vision/includes/setup-sdk/java.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Follow these steps to install the Vision SDK for Java using Apache Maven:
6868
</project>
6969
```
7070

71-
1. Update the version value in `<version>0.15.1-beta.1</version>` based on the latest version you find in the [Maven repository](https://mvnrepository.com/artifact/com.azure/azure-ai-vision-imageanalysis).
71+
1. Update the version value in `<version>0.15.1-beta.1</version>` based on the latest version you find in the Maven repository for the [azure-ai-vision-imageanalysis](https://mvnrepository.com/artifact/com.azure/azure-ai-vision-imageanalysis) package.
7272

7373
1. Run the following Maven command to install the Vision SDK and dependencies.
7474
```console
@@ -79,13 +79,24 @@ Follow these steps to install the Vision SDK for Java using Apache Maven:
7979

8080
# [Gradle](#tab/gradle)
8181

82-
Gradle configurations require an explicit reference to the .jar dependency extension. Add the following line in your `build.gradle` file:
82+
1. Install [Gradle](https://gradle.org/install).
83+
84+
1. In a command prompt run `gradle -v` to confirm successful installation.
85+
86+
1. Create you Java application using Gradle. See for example [Building Java Applications Sample](https://docs.gradle.org/8.3/samples/sample_building_java_applications.html).
87+
88+
1. Update your `build.gradle` file by inserting 4 new dependencies:
89+
8390
```gradle
8491
dependencies {
85-
implementation group: 'com.azure', name: ' azure-ai-vision-imageanalysis', version: "0.15.1-beta.1", ext: "jar"
92+
implementation 'com.azure:azure-ai-vision-imageanalysis:0.15.1-beta.1'
93+
implementation 'com.azure:azure-core-http-netty:1.13.6'
94+
implementation 'org.slf4j:slf4j-api:2.0.7'
95+
implementation 'org.slf4j:slf4j-simple:2.0.7'
8696
}
8797
```
8898

89-
Update the version number based on the latest version you find in the [Maven repository](https://mvnrepository.com/artifact/com.azure/azure-ai-vision-imageanalysis).
99+
1. Update the version value in `com.azure:azure-ai-vision-imageanalysis:0.15.1-beta.1` based on the latest version you find in the Maven repository for the [azure-ai-vision-imageanalysis](https://mvnrepository.com/artifact/com.azure/azure-ai-vision-imageanalysis) package.
90100

101+
1. Update your Java application with Image Analysis code, compile and run it.
91102
---

0 commit comments

Comments
 (0)