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
| prepare | Perpare the repository for development |
26
+
### Using Gradle
36
27
37
-
## Contributing
28
+
Gradle has some special tasks that help you managing the driver, such as downloading sources from the main repository.
38
29
39
-
Hurray, You reached this section, which means you are ready to
40
-
contribute. You're probably here because you added new ReQL terms and need to update the driver. Once you've got this stuff installed and working, make appropriate changes to term_info.json and then call
41
-
`make update-driver`.
30
+
You can invoke any task by running `./gradlew taskName` (or `gradlew.bat` in Windows) and get a list of tasks by running `./gradlew tasks`
Generally, you won't need to use metajava.py if you only want to build
@@ -76,25 +72,29 @@ If you're building the java driver without changing the template
76
72
files, you can simply do:
77
73
78
74
```bash
79
-
$ make java-driver
75
+
$ ./gradlew assemble
80
76
# or if you want to run tests as well
81
-
$ gradle build
77
+
$ ./gradlew build
82
78
```
83
79
84
-
This will create the .jar files in `$BUILD_DIR/gradle/libs`.
80
+
This will create the .jar files in `build/libs`.
85
81
86
-
## Testing
82
+
###Testing
87
83
88
-
Tests are created from the polyglot yaml tests located in the rethinkdb github repository's `test/rql_test/src/` directory. To get the polyglot yaml tests run `make prepare` which will checkout the lates rethinkdb repository under `/tmp/rethinkdb/`. The `make java-convert-tests` command is used to run the test conversion, which requires python3 and the above listed python dependencies.
84
+
Tests are created from the polyglot yaml tests located in the rethinkdb github repository's `test/rql_test/src/` directory.
85
+
To get the polyglot yaml tests, run the Gradle task `downloadProtoAndTests`. Gradle will checkout the tests into `build/rethinkdb_gen`.
89
86
90
-
`make java-convert-tests` will output junit test files into `src/test/java/gen`. These are also checked into git, so you don't need to run the conversion script if you just want to verify that the existing tests pass.
87
+
The `genTestJava` task is used to run the test conversion, which requires python3 and the above listed python dependencies.
88
+
It will output JUnit test files into `src/test/java/com/rethinkdb/gen`, using `process_polyglot.py` and `convert_tests.py`.
89
+
These are also checked into git, so you don't need to run the conversion script if you just want to verify that the existing tests pass.
91
90
92
-
`make java-convert-tests` makes use of `process_polyglot.py` and `convert_tests.py`. `process_polyglot.py` is intended to be independent of the java driver, and only handles reading in the polyglot tests and normalizing them into a format that's easier to use to generate new tests from. Short version: `process_polyglot.py` doesn't have the word "java" anywhere in it, while `convert_tests.py` has all of the java specific behavior in it and builds on top of the stream of test definitions that `process_polyglot.py` emits.
91
+
`process_polyglot.py` is intended to be independent of the java driver, and only handles reading in the polyglot tests and normalizing them into a format that's easier to use to generate new tests from.
92
+
93
+
**TL;DR**: `process_polyglot.py` doesn't have the word "java" anywhere in it, while `convert_tests.py` has all of the java specific behavior in it and builds on top of the stream of test definitions that `process_polyglot.py` emits.
93
94
94
95
## Deploying a release or snapshot
95
96
96
-
To deploy you'll need to create a file called `gradle.properties` with
97
-
the following format:
97
+
To deploy you'll need to create a file called `gradle.properties` at `~/.gradle` (`%USERPROFILE%\.gradle` on Windows) with the following:
0 commit comments