This is an automated email from the ASF dual-hosted git repository.

russellspitzer pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git


The following commit(s) were added to refs/heads/main by this push:
     new 67e0f16  Don't fail IntelliJ import for Polaris logo download (#116)
67e0f16 is described below

commit 67e0f1644d93c4f04466cdcd0674b2455ddf3896
Author: Robert Stupp <[email protected]>
AuthorDate: Mon Aug 26 03:26:24 2024 +0200

    Don't fail IntelliJ import for Polaris logo download (#116)
    
    When working without network/internet access, the logo download might fail 
the whole build. This change replaces the logo download with a file-copy.
---
 build.gradle.kts | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/build.gradle.kts b/build.gradle.kts
index f07a977..e761dfc 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -45,16 +45,11 @@ if (System.getProperty("idea.sync.active").toBoolean()) {
 
   val icon = ideaDir.file("icon.png").asFile
   if (!icon.exists()) {
-    val img =
-      java.net
-        .URI(
-          
"https://raw.githubusercontent.com/apache/polaris/main/docs/img/logos/polaris-brandmark.png";
-        )
-        .toURL()
-        .openConnection()
-        .getInputStream()
-        .use { inp -> inp.readAllBytes() }
-    ideaDir.file("icon.png").asFile.outputStream().use { out -> out.write(img) 
}
+    copy {
+      from("docs/img/logos/polaris-brandmark.png")
+      into(ideaDir)
+      rename { _ -> "icon.png" }
+    }
   }
 }
 

Reply via email to