From b15492ac6413b0e51e484b652d2049552ab49594 Mon Sep 17 00:00:00 2001 From: Paolo Di Tommaso Date: Tue, 5 Nov 2024 18:03:44 +0100 Subject: [PATCH] Add support for GH user & token Signed-off-by: Paolo Di Tommaso --- build.gradle | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 4706ca6d..6fe362bd 100644 --- a/build.gradle +++ b/build.gradle @@ -7,13 +7,17 @@ plugins { id 'com.github.johnrengelman.shadow' version '7.1.2' } +// define these in the `gradle.properties` file +ext.githubUser = project.findProperty('github.packages.user') +ext.githubToken = project.findProperty('github.packages.token') + repositories { mavenCentral() maven { url = uri("https://maven.pkg.github.com/seqeralabs/tower-java-sdk") credentials { - username = System.getenv("GITHUB_USERNAME") - password = System.getenv("GITHUB_TOKEN") + username = githubUser ?: System.getenv("GITHUB_USERNAME") + password = githubToken ?: System.getenv("GITHUB_TOKEN") } } }