Skip to content

Commit

Permalink
fix(build): copy plugin to server based on rootProject.rootDir
Browse files Browse the repository at this point in the history
  • Loading branch information
Silthus committed May 25, 2020
1 parent 4cccd5b commit 1315050
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ processResources {
task cleanPlugin() {
group 'deploy'
description 'Cleans the plugin in the working directory up'
delete 'working/plugins/' + project.property("pluginName") + '*.jar'
delete "${rootProject.rootDir}/working/plugins/" + project.property("pluginName") + '*.jar'
}

task copyPluginYaml(type: Copy, dependsOn: spigotPluginYaml) {
Expand All @@ -131,14 +131,14 @@ task deploy(type: Copy, dependsOn: [
def pluginFolder = project.property('pluginFolder').toString()

from shadowJar
into pluginFolder.isEmpty() ? 'working/plugins' : pluginFolder
into pluginFolder.isEmpty() ? "${rootProject.rootDir}/working/plugins" : pluginFolder
}

task setupServer {
group 'server'
description 'Downloads the server jar'

def server = new File('working/server.jar')
def server = new File("${rootProject.rootDir}/working/server.jar")

if (server.exists()) {
server.delete()
Expand Down

0 comments on commit 1315050

Please sign in to comment.