Skip to content

Commit c933d30

Browse files
Note for developers was updated
1 parent 9a444f1 commit c933d30

File tree

1 file changed

+35
-28
lines changed

1 file changed

+35
-28
lines changed

docs/Note-for-developers.md

Lines changed: 35 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,63 @@
11
# IDE
22

3-
If you are working on this project and use Intellij Idea, you need to change the compiler to the Eclipse compiler instead of the default javac.
3+
The **Intellij Idea** is recommended.
44

5-
![eclipse compiler](https://cloud.githubusercontent.com/assets/4927589/14228367/6fce184e-f91b-11e5-837c-2673446d24ea.png)
5+
# Settings
66

7+
## Importing the project
78

8-
If you are using the Eclipse IDE, make sure you are using version Luna or later.
9+
This is the Gradle project.
910

10-
# Coding Standards
11+
![](https://cloud.githubusercontent.com/assets/4927589/18324097/6141ef7c-7543-11e6-8661-81d631615502.png)
1112

12-
Appium java-client strictly follows [Google Java Style](http://google-styleguide.googlecode.com/svn/trunk/javaguide.html) as a coding standards. Contributors are requested to follow this by configuring in their IDE's Editor Code style,
13+
Be sure that:
1314

14-
* Clone [Google Style Guide](https://github.com/google/styleguide.git) from git
15+
- The `JAVA_HOME` environmental contains a path to JDK > 7
1516

16-
**Intellij IDEA** user's can configure this way,
17-
`Files -> Other Settings -> Default Settings ->Editor -> Code Style -> Manage -> Manage -> Import -> eclipse-java-google-style.xml (Downloaded from Google Style Guide)-> Apply`
17+
- If non built-in gradle distribution is used then its version should be > 2.1
1818

19-
**Eclipse IDE** user's can configure this way,
20-
`Preferences -> Java -> Code Style -> Formatter -> Import -> eclipse-java-google-style.xml (Downloaded from Google Style Guide)-> Apply`
19+
## Compiler
2120

22-
Reformat your code before raising a Pull Request.
21+
This project is compiled in some not common way. We use `ecj` Eclipse Java Compiler. Below is the sample how to define this compiler by IDE.
22+
![eclipse compiler](https://cloud.githubusercontent.com/assets/4927589/14228367/6fce184e-f91b-11e5-837c-2673446d24ea.png)
2323

24-
# Code style
24+
## JDK
2525

26-
Please be careful with code style.
26+
Please check following settings:
2727

28-
## How to check the style of proposed code.
28+
![](https://cloud.githubusercontent.com/assets/4927589/18324490/7ffd3ba4-7545-11e6-9f22-eb028737283c.png)
2929

30-
Execute the command
30+
![](https://cloud.githubusercontent.com/assets/4927589/18324593/f5254e3a-7545-11e6-85c5-e4c491ee268d.png)
3131

32-
`mvn clean site`
32+
![](https://cloud.githubusercontent.com/assets/4927589/18324648/3f4635a6-7546-11e6-966c-2949059968ac.png)
3333

34-
After the finishing please go and open
35-
36-
`{project__folder}/target/site/index.html`
34+
![](https://cloud.githubusercontent.com/assets/4927589/18324760/cbca4aee-7546-11e6-8cfb-e86d8018be6a.png)
3735

38-
and then
36+
![](https://cloud.githubusercontent.com/assets/4927589/18324835/2e3bfc04-7547-11e6-8f5e-981aea8f1771.png)
3937

40-
![](https://cloud.githubusercontent.com/assets/4927589/14588981/d9eef6f6-04df-11e6-9c6f-9bbd2bed3400.png)
38+
## Coding Standards
4139

42-
and then
40+
Appium java-client strictly follows [Google Java Style](http://google-styleguide.googlecode.com/svn/trunk/javaguide.html) as a coding standards. Contributors are requested to follow this by configuring in their IDE's Editor Code style,
4341

44-
![](https://cloud.githubusercontent.com/assets/4927589/14588999/29ca76e6-04e0-11e6-8647-d868ab185682.png)
42+
* Clone [Google Style Guide](https://github.com/google/styleguide.git) from git
4543

46-
choose the `Checkstyle`. If there are errors please fix them. Please keep the count of warnings as minimal as
47-
it possible.
44+
**Intellij IDEA** users can configure this way,
45+
`Files -> Other Settings -> Default Settings ->Editor -> Code Style -> Manage -> Manage -> Import -> eclipse-java-google-style.xml (Downloaded from Google Style Guide)-> Apply`
46+
47+
Reformat your code before raising a Pull Request.
4848

49-
![](https://cloud.githubusercontent.com/assets/4927589/14589025/e817bed8-04e0-11e6-9eb9-8987f24672e0.png)
5049

51-
# Code Coverage
50+
## Code Coverage
5251

5352
`jacoco-maven-plugin` generates the coverage reports, once integration tests are successfully run by `maven-surefire-plugin`
5453

5554
**Intellij IDEA** user's can configure and view this way,
56-
`Analyse -> show coverage Data -> Add -> Select ${basedir}/target/coverage-reports/jacoco-unit.exec (jacoco-unit.exec generated after integration test run) -> Click Show Selected -> Coverage Results displayed in IDE`
55+
`Analyse -> show coverage Data -> Add -> Select ${basedir}/target/coverage-reports/jacoco-unit.exec (jacoco-unit.exec generated after integration test run) -> Click Show Selected -> Coverage Results displayed in IDE`
56+
57+
# Please do not forget to check the code before the pull-request proposal.
58+
59+
It is needed to go to the directory where `java_client` is located. You can do it via command line. And then run the following command
60+
61+
`gradle check`. If everything is ok then all checks should be passed. Otherwise you can open reports at `JAVA_CLIENT_DIRECTORY/build/reports`
62+
63+
**The adding of new tests is required when new feature is added or some bug is fixed.**

0 commit comments

Comments
 (0)