Skip to content

Commit fb74554

Browse files
Gradle: document supported project properties.
1 parent 85886e5 commit fb74554

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ image: objectboxio/buildenv:21.11.11-centos7
55
# - SONATYPE_USER
66
# - SONATYPE_PWD
77
# - GOOGLE_CHAT_WEBHOOK_JAVA_CI
8-
# Additionally, Gradle scripts assume these Gradle project properties are set:
9-
# https://docs.gradle.org/current/userguide/build_environment.html#sec:project_properties
8+
# Additionally, these environment variables used by the objectbox-publish Gradle script:
109
# - ORG_GRADLE_PROJECT_signingKeyFile
1110
# - ORG_GRADLE_PROJECT_signingKeyId
1211
# - ORG_GRADLE_PROJECT_signingPassword

build.gradle.kts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
// This script supports some Gradle project properties:
2+
// https://docs.gradle.org/current/userguide/build_environment.html#sec:project_properties
3+
// - versionPostFix: appended to snapshot version number, e.g. "1.2.3-<versionPostFix>-SNAPSHOT".
4+
// Use to create different versions based on branch/tag.
5+
// - sonatypeUsername: Maven Central credential used by Nexus publishing.
6+
// - sonatypePassword: Maven Central credential used by Nexus publishing.
7+
18
buildscript {
29
// Typically, only edit those two:
310
val objectboxVersionNumber = "3.4.1" // without "-SNAPSHOT", e.g. "2.5.0" or "2.4.0-RC"

buildSrc/src/main/kotlin/objectbox-publish.gradle.kts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// This script requires some Gradle project properties to be set
2+
// (to set as environment variable prefix with ORG_GRADLE_PROJECT_):
3+
// https://docs.gradle.org/current/userguide/build_environment.html#sec:project_properties
4+
//
5+
// To publish artifacts to the internal GitLab repo set:
6+
// - gitlabUrl
7+
// - gitlabPrivateToken
8+
// - gitlabTokenName: optional, if set used instead of "Private-Token". Use for CI to specify e.g. "Job-Token".
9+
//
10+
// To sign artifacts using an ASCII encoded PGP key given via a file set:
11+
// - signingKeyFile
12+
// - signingKeyId
13+
// - signingPassword
14+
115
plugins {
216
id("maven-publish")
317
id("signing")
@@ -73,6 +87,8 @@ publishing {
7387

7488
signing {
7589
if (hasSigningProperties()) {
90+
// Sign using an ASCII-armored key read from a file
91+
// https://docs.gradle.org/current/userguide/signing_plugin.html#using_in_memory_ascii_armored_openpgp_subkeys
7692
val signingKey = File(project.property("signingKeyFile").toString()).readText()
7793
useInMemoryPgpKeys(
7894
project.property("signingKeyId").toString(),

0 commit comments

Comments
 (0)