fix(build): Correct location of local curseforge_key.txt file

Relative path bad, use absolute. It causes issues in gradle vers that
have workingDir in caches.
This commit is contained in:
tomikun
2026-04-27 18:56:34 +08:00
parent 5dd8c88db4
commit 70a87ba7df
2 changed files with 2 additions and 1 deletions

1
.gitignore vendored
View File

@@ -13,3 +13,4 @@ app_pojavlauncher/.cxx/
/jre_lwjgl3glfw/gradle/
/jre_lwjgl3glfw/**/build/
/jre_lwjgl3glfw/**/.gradle/
/app_pojavlauncher/curseforge_key.txt

View File

@@ -54,7 +54,7 @@ def getVersionName = {
def getCFApiKey = {
String key = System.getenv("CURSEFORGE_API_KEY");
if(key != null) return key;
File curseforgeKeyFile = new File("./curseforge_key.txt");
File curseforgeKeyFile = new File("$projectDir/curseforge_key.txt");
if(curseforgeKeyFile.canRead() && curseforgeKeyFile.isFile()) {
return curseforgeKeyFile.text;
}