From 586b9a7c44e86b7f673170848b8b91339a3aeff4 Mon Sep 17 00:00:00 2001 From: Taras Smakula <tarassmakula@gmail.com> Date: Tue, 22 Aug 2023 17:18:03 +0300 Subject: [PATCH] Change publisher --- matrix-sdk-android/gradle-publish.gradle | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/matrix-sdk-android/gradle-publish.gradle b/matrix-sdk-android/gradle-publish.gradle index 26898bc3..2ae72174 100644 --- a/matrix-sdk-android/gradle-publish.gradle +++ b/matrix-sdk-android/gradle-publish.gradle @@ -7,9 +7,8 @@ def versionName = "1.5.30.6" def artifactPath = "$buildDir/outputs/aar/$artifactIdString-release.aar" def publicationName = "release" def projectId = "16" -def token = "e3yxa-_Duy7xLabSa7_z" -task sourceJar(type: Jar) { +tasks.register('sourceJar', Jar) { from android.sourceSets.main.java.srcDirs classifier = "sources" } @@ -41,12 +40,16 @@ publishing { } } repositories { + Properties properties = new Properties() + if (rootProject.file("local.properties").exists()) { + properties.load(rootProject.file("local.properties").newDataInputStream()) + } maven { url "https://gitlab.futo.org/api/v4/projects/$projectId/packages/maven" name "GitLab" credentials(HttpHeaderCredentials) { name = "Private-Token" - value = token + value = properties.getProperty("PUBLISH_TOKEN") } authentication { header(HttpHeaderAuthentication) -- GitLab