From e1cbe57dadc12022bdd14768547184eb99b72aaf Mon Sep 17 00:00:00 2001
From: ansgarz <ansgar.zwick@meissa.de>
Date: Fri, 21 Feb 2025 11:36:30 +0100
Subject: [PATCH] [skip ci] avoid misleading error message for token, and
 improve cmts

---
 build.gradle | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/build.gradle b/build.gradle
index 0c76c85..afa4ef9 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,5 +1,5 @@
 buildscript {
-    ext.kotlin_version_no = "1.8.20"
+    ext.kotlin_version_no = "1.8.21"
     ext.CI_PROJECT_ID = System.env.CI_PROJECT_ID
 
     repositories {
@@ -216,12 +216,12 @@ publishing {
                         println "$publishPackageTokenName found - "
                     }
                 } else {
-                    // use project-property (define e.g. in "~/.gradle/gradle.properties") when not running in ci
-                    // you can create a token in gitea "Profile and Settings ... > Settings > Applications", Token Name, Select scopes (write:package) > "Generate Token"
+                    // for publishing from local: you must use project-property "MEISSA_PUBLISH_PACKAGE_TOKEN" with the token (e.g. define it in "~/.gradle/gradle.properties")
+                    // you can create a token e.g. on forgejo server by "Profile and Settings ... > Settings > Applications", Token Name, Select scopes (write:package) > "Generate Token"
                     if (!project.hasProperty(publishPackageTokenName)) {
-                        // if token is missing, provide a dummy in order to avoid error "Could not get unknown property 'MEISSA_PUBLISH_PACKAGE_TOKEN' for Credentials [header: Authorization]" for other gradle tasks
+                        // if token is missing, provide a dummy in order to avoid error "Could not get unknown property ..." for Credentials [header: Authorization]" for other gradle tasks
                         ext.MEISSA_PUBLISH_PACKAGE_TOKEN = "Token $publishPackageTokenName not provided in file \".gradle/gradle.properties\""
-                        println "Error: Token $publishPackageTokenName not found"
+                        println "Info: $publishPackageTokenName is set to a dummy value. In case of publishing to a maven repo, you will get a authorization error."
                     } else {
                         value = "token " + project.property(publishPackageTokenName)
                     }