From 868996895ac1c8400cd4649d099be786f2441d2c Mon Sep 17 00:00:00 2001 From: Pranav Date: Sun, 22 Oct 2023 12:12:12 +0530 Subject: [PATCH] fix: download JAR of bundle libs --- .../cosmic/ide/dependency/resolver/api/Artifact.kt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/src/main/kotlin/org/cosmic/ide/dependency/resolver/api/Artifact.kt b/lib/src/main/kotlin/org/cosmic/ide/dependency/resolver/api/Artifact.kt index d517a7a..a61f119 100644 --- a/lib/src/main/kotlin/org/cosmic/ide/dependency/resolver/api/Artifact.kt +++ b/lib/src/main/kotlin/org/cosmic/ide/dependency/resolver/api/Artifact.kt @@ -1,10 +1,9 @@ /* * - * * This file is part of Cosmic IDE. - * * Cosmic IDE is a free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - * * Cosmic IDE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - * * You should have received a copy of the GNU General Public License along with Foobar. If not, see . - * + * This file is part of Cosmic IDE. + * Cosmic IDE is a free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * Cosmic IDE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + * You should have received a copy of the GNU General Public License along with Foobar. If not, see . * */ @@ -33,7 +32,7 @@ data class Artifact( } output.createNewFile() val dependencyUrl = - "${ repository!!.getURL() }/${ groupId.replace(".", "/") }/$artifactId/$version/$artifactId-$version" + "." + extension + "${ repository!!.getURL() }/${ groupId.replace(".", "/") }/$artifactId/$version/$artifactId-$version" + "." + if (extension == "bundle") "jar" else extension logger.info("Downloading $dependencyUrl") try { val stream = URL(dependencyUrl).openConnection().apply { connectTimeout = 2000; readTimeout = 5000 }.inputStream