From 1ed4038c75851d881bb80ef389e07aeb3111c5b5 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Sat, 5 Jun 2021 19:29:05 +0530 Subject: [PATCH] Credential Setup for release --- .gitignore | 3 +++ killerbee/publish.gradle | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e0a376c..ce136f7 100644 --- a/.gitignore +++ b/.gitignore @@ -54,3 +54,6 @@ freeline_project_description.json # Temporary files *.DS_Store + +# Github configuration file (sdk path, etc) +github.properties \ No newline at end of file diff --git a/killerbee/publish.gradle b/killerbee/publish.gradle index debdf8b..6e31a73 100644 --- a/killerbee/publish.gradle +++ b/killerbee/publish.gradle @@ -5,6 +5,9 @@ def LIB_GROUP_ID = 'com.adonmo.libraries' def LIB_ARTIFACT_ID = 'killerbee' def LIB_VERSION = '1.0.0' +def githubProperties = new Properties() +githubProperties.load(new FileInputStream(rootProject.file("github.properties"))) + task sourceJar(type: Jar) { from android.sourceSets.main.java.srcDirs classifier "sources" @@ -16,8 +19,8 @@ publishing { name = "GithubPackages" url = uri("https://maven.pkg.github.com/adonmo/killerbee") credentials { - username = System.getenv('GITHUB_USER') ?: project.properties['GITHUB_USER'] - password = System.getenv('GITHUB_PERSONAL_ACCESS_TOKEN') ?: project.properties['GITHUB_PERSONAL_ACCESS_TOKEN'] + username = githubProperties['GITHUB_USER'] + password = githubProperties['GITHUB_PERSONAL_ACCESS_TOKEN'] } } maven {