Skip to content

Commit

Permalink
Fixed up some stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
mosemister committed Oct 9, 2023
1 parent 918f354 commit f22ff51
Showing 1 changed file with 5 additions and 28 deletions.
33 changes: 5 additions & 28 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,43 +12,19 @@ tasks.withType(JavaCompile) {
}

tasks.register('buildFolia', Jar) {
def path = project.rootDir.path + "/standalone/"
file(path).mkdirs()
archiveClassifier = 'uber'
archiveFileName = 'ShipsFolia.jar'
destinationDirectory = file(path)

dependsOn ':ShipsForCore:standaloneFolia'
dependsOn ':CoreToFolia:plugin'
dependsOn configurations.runtimeClasspath

def type = 'Folia'
archiveClassifier = 'uber'
archiveFileName = 'ShipsFolia.jar'

def translateCoreFile = files(project.projectDir.path + '/CoreTo' + type + '/build/libs/TranslateCore' + type + '.jar')
from {
translateCoreFile
configurations.runtimeClasspath.findAll {
it.name.endsWith('jar') && !it.name.contains("junit") && !it.name.contains("hamcrest")
}.collect {
zipTree(it).matching {
exclude "*.txt"
}
}
}
}

tasks.register('buildBukkit', Jar) {
def path = project.rootDir.path + "/standalone/"
file(path).mkdirs()
it.archiveClassifier = 'uber'
it.archiveFileName = 'ShipsBukkit.jar'
destinationDirectory = file(path)

dependsOn ':ShipsForCore:standaloneBukkit'
dependsOn ':CoreToBukkit:plugin'
dependsOn configurations.runtimeClasspath

def type = 'Bukkit'
def type = 'Folia'

def jarFiles = configurations.runtimeClasspath.findAll {
it.name.endsWith('jar') && !it.name.contains("junit") && !it.name.contains("hamcrest")
Expand All @@ -58,12 +34,13 @@ tasks.register('buildBukkit', Jar) {
}
}

File translateCoreFile = file(project.projectDir.path + '/CoreTo' + type + '/build/libs/TranslateCore' + type + '.jar')
File translateCoreFile = file(project.projectDir.path + '/CoreTo' + type + '/build/libs').listFiles()[0]
def coreFiles = zipTree(translateCoreFile)
jarFiles.add(coreFiles)
from {
jarFiles
}

}

dependencies {
Expand Down

0 comments on commit f22ff51

Please sign in to comment.