Skip to content

Commit b4678df

Browse files
committed
make maven group overridable
1 parent 7324472 commit b4678df

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/gradle.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,4 @@ jobs:
107107
ORG_GRADLE_PROJECT_mavenCentralSnapshotsPassword: ${{ secrets.SONATYPE_PASSWORD }}
108108
MAVEN_CENTRAL_PORTAL_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
109109
MAVEN_CENTRAL_PORTAL_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
110+
LIBDATACHANNEL_JAVA_GROUP_OVERRIDE: ${{ vars.LIBDATACHANNEL_JAVA_GROUP_OVERRIDE }}

build.gradle.kts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,15 @@ fun produceVersion(): String {
6363

6464
version = produceVersion()
6565
val isSnapshot = version.toString().endsWith("-SNAPSHOT")
66+
67+
// Allow overriding the Maven group via env var.
68+
// If set and non-empty, this will replace the default group
69+
val libdatachannelGroupOverride = System.getenv("LIBDATACHANNEL_JAVA_GROUP_OVERRIDE")
70+
?.takeIf { it.isNotBlank() }
71+
if (libdatachannelGroupOverride != null) {
72+
group = libdatachannelGroupOverride
73+
}
74+
6675
description = "${project.name} is a binding to the libdatachannel that feels native to Java developers."
6776

6877
val currentVersion by tasks.registering(DefaultTask::class) {

0 commit comments

Comments
 (0)