progressbar icon indicating copy to clipboard operation
progressbar copied to clipboard

Add Gradle build script

Open TheTeXnician opened this issue 4 years ago • 7 comments

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.

TheTeXnician avatar Mar 16 '20 19:03 TheTeXnician

Why do the files take a .kts extension?

koppor avatar Oct 24 '20 20:10 koppor

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

koppor avatar Oct 24 '20 20:10 koppor

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.

TheTeXnician avatar Oct 24 '20 21:10 TheTeXnician

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.

TheTeXnician avatar Oct 24 '20 21:10 TheTeXnician

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 avatar Oct 24 '20 21:10 koppor

@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.

TheTeXnician avatar Oct 24 '20 21:10 TheTeXnician

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)…

TheTeXnician avatar Oct 24 '20 21:10 TheTeXnician