Build Properties

A number of properties affect the build. They can be provided via Gradle or Java system property. They can also be injected from the environment by converting to uppercase and replacing dots by underscores. Many of these are automatically injected when running on Gitlab

Table 1. Build Properties

Property

Description

Injected in CI?

Local Build?

ci.project.url

The Gitlab Project URL.

Y

For documentation building for a real URL is required.

ci.project.path

The Gitlab Project Path.

Y

-

org.ysb33r.ysf.projects.gitlab.url

The Gitlab server URL

N

This is used in tests to override the Gitlab server and point it to a mock server.

ysf.discord.invite.url

The Discord invitation URL

Y

Only if a correct URL is required. A non-resolvable URL is otherwise injected.

ysf.gitlab.api.auth.token

A read/write token for accessing the Gitlab API .

Y

Only when running gitPublishPush task.

ysf.gitlab.api.auth.username

The name of the user that interacts with Gitlab.

Y

Only when running gitPublishPush task.

ysf.gpg.sign.key

The key for signing artifacts that will be pushed to Sonatype’s OSSRH

Y

Only needed when publishing locally, do ./.gradlew pTML -xsignYAP instead.

ysf.gpg.sign.password

The key for signing artifacts that will be pushed to Sonatype’s OSSRH

Y

Only needed when publishing locally, do ./.gradlew pTML -xsignYAP instead.

ysf.mastodon.access.token

The Mastodon access token

Y

When testing announcement against Mastodon, this is required.

ysf.mastodon.announce.server

The Mastodon server to send announcements to. It defaults to https://fosstodon.org.

N

Not needed, as there is a default value. Only supply when testing against another Mastodon account.

Due to the GrGit used under the hood, there are two authentication properties that need to be supplied either via environment variables or system properties. There are required when building documentation for publication - publishDocumentation task. For local building, the token does not need to have repository write permissions. You can create the appropriate token in your Gitlab profile page.

Table 2. GrGit properties

System property

Environment variable

org.ajoberstar.grgit.auth.username

GRGIT_USER

org.ajoberstar.grgit.auth.password

GRGIT_PASS