diff --git a/package/build.gradle b/package/build.gradle index 0cb6397e3..88574e35c 100644 --- a/package/build.gradle +++ b/package/build.gradle @@ -22,10 +22,6 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -plugins { - id "com.github.johnrengelman.shadow" version "6.1.0" -} - allprojects { version "2.0-SNAPSHOT" group "net.runelite.pluginhub" @@ -38,12 +34,17 @@ allprojects { subprojects { apply plugin: "java" - apply plugin: "com.github.johnrengelman.shadow" sourceCompatibility = 11 - shadowJar { + task shadowJar(type: Jar) { archiveFileName.set archiveBaseName.get() + "." + archiveExtension.get() + from { + configurations.runtimeClasspath.collect { + it.isDirectory() ? it : zipTree(it) + } + } + with tasks.jar } } @@ -51,7 +52,6 @@ subprojects { // the daemon used to build this can be reused by a real plugin build task prep { dependsOn ":package:shadowJar" - dependsOn ":initLib:shadowJar" dependsOn ":apirecorder:shadowJar" doLast { file("build").mkdirs() diff --git a/package/gradle/verification-metadata.xml b/package/gradle/verification-metadata.xml index a47840a93..1b438790c 100644 --- a/package/gradle/verification-metadata.xml +++ b/package/gradle/verification-metadata.xml @@ -3,25 +3,12 @@ true false - - - - - + + + + + - - - - - - - - - - - - - @@ -111,19 +98,6 @@ - - - - - - - - - - - - - @@ -132,73 +106,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -222,19 +129,6 @@ - - - - - - - - - - - - - @@ -256,14 +150,6 @@ - - - - - - - - @@ -277,42 +163,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -351,23 +202,10 @@ - - - - - - - - - - - - - diff --git a/package/initLib/build.gradle b/package/initLib/build.gradle deleted file mode 100644 index 8dc58782b..000000000 --- a/package/initLib/build.gradle +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2020 Abex - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -repositories { - mavenCentral() - gradlePluginPortal() -} - -dependencies { - implementation "com.github.johnrengelman.shadow:com.github.johnrengelman.shadow.gradle.plugin:6.1.0" -} \ No newline at end of file diff --git a/package/package/build.gradle b/package/package/build.gradle index 34168b383..08443a5f0 100644 --- a/package/package/build.gradle +++ b/package/package/build.gradle @@ -63,7 +63,6 @@ jar { } test { - dependsOn ":initLib:shadowJar" dependsOn ":apirecorder:shadowJar" workingDir new File(project.rootDir, "../") } \ No newline at end of file diff --git a/package/package/src/main/java/net/runelite/pluginhub/packager/Plugin.java b/package/package/src/main/java/net/runelite/pluginhub/packager/Plugin.java index ea1e30f6f..0ca308f6c 100644 --- a/package/package/src/main/java/net/runelite/pluginhub/packager/Plugin.java +++ b/package/package/src/main/java/net/runelite/pluginhub/packager/Plugin.java @@ -469,7 +469,6 @@ public class Plugin implements Closeable "--console=plain", "--init-script", new File("./package/target_init.gradle").getAbsolutePath()) .setEnvironmentVariables(ImmutableMap.of( - "runelite.pluginhub.package.lib", new File(Packager.PACKAGE_ROOT, "initLib/build/libs/initLib.jar").toString(), "runelite.pluginhub.package.apirecorder", new File(Packager.PACKAGE_ROOT, "apirecorder/build/libs/apirecorder.jar").toString(), "runelite.pluginhub.package.buildDir", buildDirectory.getAbsolutePath(), "runelite.pluginhub.package.runeliteVersion", runeliteVersion)) diff --git a/package/settings.gradle b/package/settings.gradle index 651866b14..de9baa086 100644 --- a/package/settings.gradle +++ b/package/settings.gradle @@ -1,6 +1,5 @@ rootProject.name = "package-root" -include "initLib" include "upload" include "package" include 'apirecorder' \ No newline at end of file diff --git a/package/target_init.gradle b/package/target_init.gradle index 08807a7f4..7ae0d942e 100644 --- a/package/target_init.gradle +++ b/package/target_init.gradle @@ -22,18 +22,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin -import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar - -initscript { - dependencies { - classpath files(System.getenv("runelite.pluginhub.package.lib")) - } -} - allprojects { apply plugin: "java" - apply plugin: ShadowPlugin compileJava { options.release.set(8) @@ -51,11 +41,15 @@ allprojects { def buildDir = new File(System.getenv("runelite.pluginhub.package.buildDir")); - task runelitePluginHubPackage(type: ShadowJar) { - destinationDir = buildDir - archiveName = "plugin.jar" - configurations = [project.configurations.runtimeClasspath] + task runelitePluginHubPackage(type: Jar) { + destinationDirectory = buildDir + archiveFileName = "plugin.jar" from sourceSets.main.output + from { + project.configurations.runtimeClasspath.collect { + it.isDirectory() ? it : project.zipTree(it) + } + } } task runelitePluginHubManifest {