Skip to main content

Properties Reference

Some setup of properties is needed to make the Jarbird plugin function properly.

Usually, we put them in one of the gradle.properties files. It is recommended to put them in ~/.gradle/gradle.proeprties rather than the project's gradle.properties so that sensitive information is not in the project.

Jarbird plugin read these properties with Gradle property mechanism, this means we may put the setting in one of the following ways:

  • Command-line option -P
    ./gradlew -Prepository.mavencentral.username=ABC jbPublish
  • Java system properties -D
    ./gradlew -Prepository.mavencentral.username=ABC jbPublish
  • Environment variable
    export repository.mavencentral.username=ABC    ./gradlew jbPublish
  • gradle.properties at Gradle home directory (~/.gradle/garadle.properties)

  • gradle.properties at the project root directory

If a property is set in multiple places, the one at the higher place of the table override the lower one.

Maven Central #

Publish to Maven Central's Sonatype Server.

PropertiesMeaning
repository.mavencentral.usernameUsername to the Maven Central Sonatype server
repository.mavencentral.passwordPassword to the Maven Central Sonatype server
repository.mavencentral.newUserTrue if the account is created after February 2021, false otherwise. Default is true.

Custom Maven repository #

Publish to custom Maven Server. Replace [repoId] with the name of repository defined in jarbird configuration block in build script.

PropertiesMeaning
repository.maven.[repoId].releasePublishing URL for released component
repository.maven.[repoId].snapshotPublishing URL for snapshot component
repository.maven.[repoId].usernameUsername to the Maven server
repository.maven.[repoId].passwordPassword to the Maven server
repository.maven.[repoId].descriptionDescription of the repository to be shown in gradle tasks. Optional
repository.maven.[repoId].allowInsecureProtocolTrue if we need to connect to HTTP server rather than HTTPS server. Default is false

Custom Artifactory repository #

Publish to custom Maven Sonatype Server. Replace [repoId] with the name of the repository defined in the jarbird configuration block in the build script.

PropertiesMeaning
repository.artifactory.[repoId].releasePublishing URL for released
component
repository.artifactory.[repoId].snapshotPublishing URL for snapshot component
repository.artifactory.[repoId].repoKeyRepository key for particular
repository in Artifactory server
repository.artifactory.[repoId].usernameUsername to the Artifactory
server
repository.artifactory.[repoId].passwordPassword to the Maven Central Sonatype server
repository.artifactory.[repoId].descriptionDescription of the repository to be shown in gradle tasks. Optional

Artifact signing #

There are two types of GPG key store. The old style is "Keyring".

PropertiesMeaning
signing.keyId8-character Key ID
signing.passwordPassword to unlock the key ring]
signing.secretKeyRingFileFull path to the secring.gpg file

The new style is "keybox" file.

PropertiesMeaning
signing.gnupg.keyName8-character key name
signing.gnupg.passphrasePassphrase to unlock the keystore

Jarbird plugin determines automatically which type of key to use. We can also use the signWithKeybox() of the pub block to enforce the use of the new keybox format.

Gradle Plugin Portal #

PropertiesMeaning
gradle.publish.keyPublish key of the Gradle Plugin Portal account
gradle.publish.secretPublish secret of the Gradle Plugin Portal account