From d784c26ad12befef0afa3067b9b61a578442d607 Mon Sep 17 00:00:00 2001 From: Phodal Huang Date: Wed, 23 Feb 2022 20:45:50 +0800 Subject: [PATCH] fix: make publish works --- build.gradle.kts | 4 ++++ gradle.properties | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 1632272b..fe9816f3 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -86,6 +86,10 @@ subprojects { val snapshotsRepoUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/") url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl + credentials { + username = (project.findProperty("sonatypeUsername") ?: System.getenv("GITHUB_USERNAME")).toString() + password = (project.findProperty("sonatypePassword") ?: System.getenv("GITHUB_TOKEN")).toString() + } } } } diff --git a/gradle.properties b/gradle.properties index 29e08e8c..7fc6f1ff 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -kotlin.code.style=official \ No newline at end of file +kotlin.code.style=official