Skip to content

Commit 9f5712d

Browse files
authored
Merge pull request #51 from kklisura/update-protocol
Update protocol to latest version
2 parents 821b13c + 13fbc27 commit 9f5712d

File tree

768 files changed

+14336
-1839
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

768 files changed

+14336
-1839
lines changed

Makefile

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ BROWSER_PROTOCOL_JSON_FILE=./browser_protocol.json
1818

1919
EXAMPLES_DIR=cdt-examples
2020

21-
install-cdt-java-protocol-parser:
22-
# Building and install cdt-protocol-parser project...
21+
copy-protocol-files-to-test-resources:
22+
# Copy protocol files to cdt-protocol-parser test resources dir.
2323
$(CP) $(JS_PROTOCOL_JSON_FILE) "./$(PROTOCOL_PARSER)/src/test/resources/js_protocol.json"
2424
$(CP) $(BROWSER_PROTOCOL_JSON_FILE) "./$(PROTOCOL_PARSER)/src/test/resources/browser_protocol.json"
2525
$(MVN) --file "$(PROTOCOL_PARSER_DIR)/" clean install
2626

27-
build-cdt-java-protocol-builder: install-cdt-java-protocol-parser
28-
# Building cdt-java-protocol-builder project...
29-
$(MVN) --file "$(JAVA_PROTOCOL_BUILDER_DIR)/" clean package
27+
build-all-modules:
28+
# Building all modules
29+
$(MVN) clean package
3030

3131
compile-cdt-java-client:
3232
# Compiling cdt-java-client project...
@@ -46,14 +46,22 @@ clean-previous-protocol:
4646
$(RM) -rf $(JAVA_CLIENT_DIR)/src/main/java/$(JAVA_CLIENT_PACKAGE)/events
4747
$(RM) -rf $(JAVA_CLIENT_DIR)/src/main/java/$(JAVA_CLIENT_PACKAGE)/commands
4848

49-
upgrade-protocol: build-cdt-java-protocol-builder clean-previous-protocol
49+
upgrade-protocol: copy-protocol-files-to-test-resources build-all-modules clean-previous-protocol
5050
$(RUN_JAR) $(JAVA_PROTOCOL_BUILDER_JAR) --base-package="$(PACKAGE_NAME)" \
5151
--output=./$(JAVA_CLIENT_DIR)/ \
5252
--js-protocol=$(JS_PROTOCOL_JSON_FILE) \
53-
--browser-protocol=$(BROWSER_PROTOCOL_JSON_FILE) \
53+
--browser-protocol=$(BROWSER_PROTOCOL_JSON_FILE)
54+
# Apply the formatting on the codebase
55+
$(MVN) com.coveo:fmt-maven-plugin:format
5456

55-
update-protocol: upgrade-protocol compile-cdt-java-client
57+
update-protocol: upgrade-protocol
5658
# Updated protocol on cdt-java-client
59+
$(MVN) verify
60+
61+
update-copyright-license-header:
62+
$(MVN) clean license:update-file-header
63+
# Apply the formatting on the codebase
64+
$(MVN) com.coveo:fmt-maven-plugin:format
5765

5866
sonar-analysis:
5967
# Running sonar analysis
@@ -62,11 +70,9 @@ sonar-analysis:
6270

6371
verify:
6472
# Running unit tests
65-
cd $(JAVA_PROTOCOL_BUILDER_DIR)/ && make verify
66-
cd $(JAVA_CLIENT_DIR)/ && make verify
67-
$(MVN) --file "$(JAVA_CLIENT_DIR)/" clean install && \
68-
$(MVN) --file "$(EXAMPLES_DIR)/" clean compile
73+
$(MVN) verify
6974

7075
download-latest-protocol:
76+
# Downloads the latest protocol json files
7177
curl -o browser_protocol.json https://raw.githubusercontent.com/ChromeDevTools/devtools-protocol/master/json/browser_protocol.json
7278
curl -o js_protocol.json https://raw.githubusercontent.com/ChromeDevTools/devtools-protocol/master/json/js_protocol.json

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ For more information on DevTools, see https://chromedevtools.github.io/devtools-
88

99
[v1.3.6](https://github.com/kklisura/chrome-devtools-java-client/tree/v1.3.6) tested on Google Chrome Version 67.0.3396.87. Protocol files from [dev-tools-protocol#1aa7b31ca7](https://github.com/ChromeDevTools/devtools-protocol/tree/1aa7b31ca7bba982eceea8d4bd494b27850fb0df/json)
1010

11-
[v2.0.0](https://github.com/kklisura/chrome-devtools-java-client/tree/v2.0.0) tested on Google Chrome Version 76.0.3809.100. Protocol files from [dev-tools-protocol#e1fb93bd76](https://github.com/ChromeDevTools/devtools-protocol/tree/e1fb93bd76f99cdf401b949757c874c579e15434/json)
11+
[v2.1.0](https://github.com/kklisura/chrome-devtools-java-client/tree/v2.1.0) tested on Google Chrome Version 76.0.3809.100. Protocol files from [dev-tools-protocol#e1fb93bd76](https://github.com/ChromeDevTools/devtools-protocol/tree/e1fb93bd76f99cdf401b949757c874c579e15434/json)
12+
13+
[vx.x.x](https://github.com/kklisura/chrome-devtools-java-client/tree/vx.x.x) tested on Google Chrome Version 86.0.4240.111. Protocol files from [dev-tools-protocol#fcb68d10bc](https://github.com/ChromeDevTools/devtools-protocol/tree/fcb68d10bc5258ebf96121caf57200069f6e6731/json)
1214

1315
[1] https://chromedevtools.github.io/devtools-protocol/.
1416

@@ -129,6 +131,14 @@ make update-protocol
129131

130132
This will build the tools for parsing and generating Java files, [cdt-java-protocol-builder](cdt-java-protocol-builder/) project. The input for this tool are protocol definitions files: `browser_protocol.json` and `js_protocol.json`. The generated Java files will be present in [cdt-java-client](cdt-java-client/) project. After building Java files, the [cdt-java-client](cdt-java-client/) will be compiled. If everything goes successfully, consider the protocol updated. :)
131133

134+
## Updating copyright license header
135+
136+
To go over each module and each source java file to update copyright license header, run:
137+
138+
```
139+
make update-copyright-license-header
140+
```
141+
132142
## License
133143

134144
Chrome DevTools Java Client is licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE.txt) for the full license text.

0 commit comments

Comments
 (0)