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
Copy file name to clipboardExpand all lines: README.md
+23-54Lines changed: 23 additions & 54 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,62 +71,31 @@ The plugins are constructed and initialized lazily upon their first call through
71
71
72
72
5. One-shot calls like `takeoff` and `land` are not added to the `mavsdk-event-queue` when the user subscribes to them. This is done to avoid their piling up while the `mavsdk_server` discovers a system. Instead, the `onError` callback will be triggered after a 100ms delay indicating that no system was available for the command.
73
73
74
-
## Contributing
75
-
76
-
### Coding style
77
-
78
-
Java/Android coding style is ensured using CheckStyle with the Google style.
79
-
80
-
#### Command line
81
-
82
-
A `checkstyle` task is defined in the root `build.gradle` of each project and can be run as follows:
83
-
84
-
$ ./gradlew checkstyle
85
-
86
-
The `build` task depends on `checkstyle`, meaning that `$ ./gradlew build` runs the checks as well.
87
-
88
-
#### IntelliJ / Android-Studio
89
-
90
-
There exist a plugin for CheckStyle in JetBrains' IDEs.
91
-
92
-
##### Setup
93
-
94
-
1. Install the plugin called "CheckStyle-IDEA" in IntelliJ / Android-Studio.
95
-
2. Import the checkstyle configuration as a code style scheme in _Settings > Editor > Code Style > Java > Manage... >
96
-
Import..._ by selecting "CheckStyle configuration" and then browsing to `config/checkstyle/checkstyle.xml`.
97
-
3. In _Settings > Other Settings > Checkstyle_, change the "Scan Scope" to "Only Java sources (including tests)".
98
-
4. Still in _Settings > Other Settings > Checkstyle_, add a new configuration file and browse to
99
-
`config/checkstyle/checkstyle.xml`.
100
-
101
-
##### Usage
102
-
103
-
In IntelliJ / Android-Studio's bottom task bar, you should see a "CheckStyle" tab. It will allow you to select your configuration
104
-
with the "Rules" dropdown-list, and to run the analysis on your code.
105
-
106
-
Note that by default, the IDE will not run checkstyle when building the project (whereas `$ ./gradlew build` always does it).
107
-
108
-
#### Troubleshooting
109
-
110
-
In IntelliJ / Android-Studio, the IDE might force the order of the imports in a way that is not following the checkstyle rules. For some reason, this is not set when importing `checkstyle.xml` as a code style scheme. However, it can be manually updated in _Settings > Code Style > Java > Import Layout_.
111
-
112
74
### Releasing
113
75
114
-
Both [sdk](./sdk) and [mavsdk_server](./mavsdk_server) are released with Maven. Publishing can be done through a gradle task:
115
-
116
-
```gradle
117
-
./gradlew uploadArchives
118
-
```
119
-
120
-
This task requires a few secrets in `gradle.properties`:
121
-
122
-
```
123
-
signing.keyId=<keyId>
124
-
signing.password=<password>
125
-
signing.secretKeyRingFile=<ring_file>
126
-
127
-
ossrhUsername=<username>
128
-
ossrhPassword=<password>
129
-
```
76
+
1. Update the proto submodule (./sdk/proto) to match the version of
77
+
`mavsdk_server` you want to use. The proto submodule should point to the same
78
+
commit hash as the proto submodule in
79
+
[MAVSDK-C++](https://github.com/mavlink/mavsdk) (make sure you check the hash
80
+
associated with the right release tag!).
81
+
1. Update the version in both modules:
82
+
[./sdk/build.gradle.kts](./sdk/build.gradle.kts) and
83
+
[./mavsdk_server/build.gradle.kts](./mavsdk_server/build.gradle.kts). The new version
84
+
should be the version of `mavsdk_server` followed by an optional build
85
+
number, e.g. `3.6.0` or `3.6.0-2`. This means that the proto definitions
86
+
should match with the `v3.6.0` tag of
87
+
[MAVSDK-C++](https://github.com/mavlink/mavsdk). We support snapshots, e.g.
88
+
`3.6.0-SNAPSHOT` will publish a temporary snapshot to Maven Central (this is
89
+
convenient for testing before the final release).
90
+
1. In [./mavsdk_server/build.gradle.kts](./mavsdk_server/build.gradle.kts),
91
+
change `mavsdk_server_release` to point to the version of `mavsdk_server` you
92
+
want to use. This should correspond to the proto submodule and to the version
93
+
numbers set in the previous step (e.g. if you set 3.6.0-2, the proto
94
+
submodule should point to the same hash as MAVSDK-C++ v3.6.0, and
95
+
`mavsdk_server_release` should be set to "v3.6.0").
96
+
1. Update the README to point to the new version.
97
+
1. Tag a release. The CI will publish the artifacts to Maven Central
0 commit comments