progressbar
progressbar copied to clipboard
Add Gradle build script
This addresses #46 and adds a Gradle build script that is able to build and test the project. For publishing there are two points to consider:
- Signing has to be configured (otherwise the current task will error), see https://docs.gradle.org/current/userguide/signing_plugin.html
- The SonaType publishing is not set up yet. One may use the code from https://help.sonatype.com/repomanager2/maven-and-other-build-tools/gradle or have a look at other documentation.
This is not intended to be a full-featured transition but a start for the Gradle build system. Hence, it is an addition to the current Maven POM.
Why do the files take a .kts
extension?
I would recommend to add a gradle wrapper to enable a self-contained repository (only JDK will be needed then).
Thereby, I would also propose to add a gradle wrapper validation
Why do the files take a
.kts
extension?
Because the Gradle Kotlin DSL is Kotlin Script which has the .kts
extension. See also https://docs.gradle.org/current/userguide/kotlin_dsl.html#sec:scripts.
I would recommend to add a gradle wrapper to enable a self-contained repository (only JDK will be needed then).
Thereby, I would also propose to add a gradle wrapper validation
This is a great idea. I usually also do this, so I don't know why I did not add the wrapper. And the GitHub actions workflow looks very promising.
Why do the files take a
.kts
extension? Because the Gradle Kotlin DSL is Kotlin Script which has the.kts
extension. See also docs.gradle.org/current/userguide/kotlin_dsl.html#sec:scripts.
Oh, wow, never saw Kotlin-based gradle build files until now.
@koppor Thanks for your suggestion. I have added the Gradle wrapper and the wrapper validation workflow in the commits fd68d1b and bcca640.
Oh, wow, never saw Kotlin-based gradle build files until now.
They stabilized the Kotlin DSL a while ago. And as the issue title of #46 mentions "Gradle (kt)" I thought @ctongfei intended to transition to Kotlin DSL gradle builds.
I have updated this branch to the current master (e8fd860). Probably it should be squashed when merging if it is going to be merged at some point. As there has not been a comment for over 6 months until now, it is likely it will remain dormant for some more time (just ping me if it needs updates)…