Skip to content

Commit 6bf683f

Browse files
authored
Merge pull request #278 from ambye85/master
Add Gradle usage example to main README
2 parents 812bce1 + 1695ca5 commit 6bf683f

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Implemented with and without Spring Boot support. The two samples share the comm
5353
* *mysql-schema*: Operator managing schemas in a MySQL database
5454
* *spring-boot-plain/auto-config*: Samples showing integration with Spring Boot.
5555

56-
Add [dependency](https://search.maven.org/search?q=a:operator-framework) to your project:
56+
Add [dependency](https://search.maven.org/search?q=a:operator-framework) to your project with Maven:
5757

5858
```xml
5959
<dependency>
@@ -63,7 +63,17 @@ Add [dependency](https://search.maven.org/search?q=a:operator-framework) to your
6363
</dependency>
6464
```
6565

66-
Main method initializing the Operator and registering a controller.
66+
Or alternatively with Gradle, which also requires declaring the SDK as an annotation processor to
67+
generate the mappings between controllers and custom resource classes:
68+
69+
```groovy
70+
dependencies {
71+
implementation "io.javaoperatorsdk:operator-framework:${javaOperatorVersion}"
72+
annotationProcessor "io.javaoperatorsdk:operator-framework:${javaOperatorVersion}"
73+
}
74+
```
75+
76+
Once you've added the dependency, define a main method initializing the Operator and registering a controller.
6777

6878
```java
6979
public class Runner {

0 commit comments

Comments
 (0)