wuespace / telestion-core

Telestion is a ground station software developed by the TelestionTeam for WüSpace projects.
https://telestion.wuespace.de/
MIT License
7 stars 0 forks source link

Publish sources (to include Doc comments) #272

Closed pklaschka closed 3 years ago

pklaschka commented 3 years ago

Currently, the source files (or, more specifically, the JavaDoc comments, which, to my knowledge, are in the sources) don't get published in the packages.

This means that the APIs don't include these doc comments, which, of course, is a pity as that's the very reason these comments should be included 😉 .

One example of this can be seen in this screenshot, for the JsonMessage.on function:

image image

For comparison, this is the comment included in the original sources:

image

Trying to run the gradle task 'DownloadSources' results in the following error (in the telestion-project-daedalus2 repository):

14:38:48: Executing task 'DownloadSources'...

> Task :DownloadSources FAILED
Attempt to download sources from MavenRepo
Attempt to download sources from GitHubCorePackages
Attempt to download sources from GitHubMavlink

FAILURE: Build failed with an exception.

* Where:
Initialization script 'C:\Users\pablo\AppData\Local\Temp\ijmiscinit.gradle' line: 25

* What went wrong:
Execution failed for task ':DownloadSources'.
> Could not resolve all files for configuration ':downloadSources_981ed470-1c42-45e7-a3dc-903828c1a364'.
   > Could not find de.wuespace.telestion:telestion-api:0.2.1.
     Required by:
         project :

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/7.0/userguide/command_line_interface.html#sec:command_line_warnings
1 actionable task: 1 executed
14:38:50: Task execution finished 'DownloadSources'.

Due to my limited knowledge about Java and Gradle, it is, of course, very much possible that I overlooked something and it is an error on my part. In this case, however, it would be great if such information could be included in the README or, potentially, even made accessible with this Gradle task as it is "proposed" by Intellij, which, arguably, would be great to support as much as possible.

pklaschka commented 3 years ago

@fussel178 is this actually closed or more "on accident" by referencing it in the PR? As far as I could see it, the PR only handled the "website part" of the docs, didn't it?

fussel178 commented 3 years ago

@fussel178 is this actually closed or more "on accident" by referencing it in the PR? As far as I could see it, the PR only handled the "website part" of the docs, didn't it?

Nope, the sources will now be published in all packages through:

java {
    withJavadocJar()
    withSourcesJar()
}
fussel178 commented 3 years ago

I've used the wrong specifier in the commit message, otherwise the changelog would contain this informatiom. My bad :see_no_evil: