You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
:warning: Note 1: You must install the 0.9.x version of Thrift. Otherwise compiling would fail at error `error: package org.apache.thrift.annotation does not exist`
15
+
16
+
:warning: Note 2: It's currently compatible with Java 8 compiler but no guarantee in the future.
17
+
18
+
## IntelliJ IDE integration (Optional)
19
+
20
+
* Make sure you set the gradle path with the right version ([currently 6.x](https://github.com/uber/cadence-java-client/blob/master/gradle/wrapper/gradle-wrapper.properties))
This project is Open Source Software, and requires a header at the beginning of
@@ -32,16 +45,42 @@ Overcommit adds some requirements to your commit messages. At Uber, we follow th
32
45
[Chris Beams](http://chris.beams.io/posts/git-commit/) guide to writing git
33
46
commit messages. Read it, follow it, learn it, love it.
34
47
35
-
## Test
36
48
37
-
Testing and building cadence-java-client requires running cadence docker locally, execute:
49
+
## Build & Publish & Test locally
50
+
Build with:
51
+
52
+
```bash
53
+
./gradlew build
54
+
```
55
+
56
+
To test locally, you can publish to [MavenLocal](https://docs.gradle.org/current/userguide/declaring_repositories.html#sec:case-for-maven-local)
57
+
58
+
1. Change `build.gradle`:
59
+
Comment out the first section in `publications` ( line 160 to line 191 in [this commit](https://github.com/uber/cadence-java-client/blob/c9ec6786aa9f866b0310292ea3ee5df63adc8799/build.gradle#L160))
38
60
61
+
2. Change the [version](https://github.com/uber/cadence-java-client/blob/c9ec6786aa9f866b0310292ea3ee5df63adc8799/build.gradle#L43) to add a `local` suffix. E.g.
Now you have the local cadence-java-client in your machine using veriosn `3.3.0-local`
43
74
44
-
(If this does not work, see instructions for running the Cadence Server at https://github.com/uber/cadence/blob/master/README.md.)
75
+
3. To test with Cadence Java Samples, [change](https://github.com/uber/cadence-java-samples/blob/master/build.gradle#L32)`mavenCentral()` to `mavenLocal()`
76
+
and also change the [version](https://github.com/uber/cadence-java-samples/blob/a79d8d6e5860cf9986bf549fc1f96badecb09f8f/build.gradle#L38) with your suffix.
77
+
78
+
Then `./gradlew build` and refer to the sample repo for how to run the code(it needs to run with a [Cadence server](https://github.com/uber/cadence)).
79
+
80
+
:warning: If you run into problem with `version.properties`[creation task](https://github.com/uber/cadence-java-client/blob/c9ec6786aa9f866b0310292ea3ee5df63adc8799/build.gradle#L109), you can comment the task out. It's okay for local testing.
81
+
The property file is being used by [Version class](https://github.com/uber/cadence-java-client/blob/master/src/main/java/com/uber/cadence/internal/Version.java#L39)to report the library version for logging/metrics.
82
+
83
+
## Unit & Integration Test
45
84
46
85
Then run all the tests with:
47
86
@@ -60,26 +99,3 @@ STICKY_OFF=true USE_DOCKER_SERVICE=true ./gradlew test
60
99
61
100
Also, if there is any Buildkite test failure that you cannot reproduce locally,
62
101
follow [buildkite docker-compose](./docker/buildkite/README.md) instructions to run the tests.
63
-
64
-
## Build & Publish
65
-
Build with:
66
-
67
-
```bash
68
-
./gradlew build
69
-
```
70
-
71
-
To test locally, change `build.gradle`:
72
-
1. Comment out the whole `publications`
73
-
2. Change
74
-
```
75
-
group = 'com.uber.cadence'
76
-
````
77
-
to
78
-
```
79
-
group = 'com.local.cadence'
80
-
```
81
-
Then run the command
82
-
```bash
83
-
./gradlew publishToMavenLocal
84
-
```
85
-
Now you can use the local cadence-java-client in your laptop.
0 commit comments