From 2d6a8b5da44fdf204bfc48e780b93d871e8f0821 Mon Sep 17 00:00:00 2001 From: Paolo Di Tommaso Date: Fri, 8 Nov 2024 11:06:13 +0100 Subject: [PATCH] Add support for GH user & token (#465) 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") } } }