Skip to content

Commit

Permalink
Bump 1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
IzzelAliz committed Jun 16, 2020
1 parent 8562905 commit 2a532ef
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

group 'io.izzel.arclight'
version '1.4'
version '1.5'

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ class ArclightGradlePlugin implements Plugin<Project> {
def processMapping = project.tasks.create('processMapping', ProcessMappingTask)
def remapSpigot = project.tasks.create('remapSpigotJar', RemapSpigotTask)
def generateMeta = project.tasks.create('generateArclightMeta', Copy)
def downloadInstaller = project.tasks.create('downloadInstaller')
generateMeta.dependsOn(downloadInstaller)
def metaFolder = project.file("${project.buildDir}/arclight_cache/meta")
project.sourceSets.main.output.dir metaFolder, builtBy: generateMeta
generateMeta.configure { Copy task ->
Expand Down Expand Up @@ -89,6 +91,12 @@ class ArclightGradlePlugin implements Plugin<Project> {
}
}
project.tasks.compileJava.dependsOn(remapSpigot)
def installerJar = project.file("${project.buildDir}/arclight_cache/forge-${arclightExt.mcVersion}-${arclightExt.forgeVersion}-installer.jar")
downloadInstaller.doFirst {
if (installerJar.exists()) throw new StopExecutionException()
def installerUrl = "https://files.minecraftforge.net/maven/net/minecraftforge/forge/${arclightExt.mcVersion}-${arclightExt.forgeVersion}/forge-${arclightExt.mcVersion}-${arclightExt.forgeVersion}-installer.jar"
Utils.download(installerUrl, installerJar)
}
generateMeta.configure { Copy task ->
task.doFirst {
Files.walkFileTree(metaFolder.toPath(), new SimpleFileVisitor<Path>() {
Expand All @@ -97,6 +105,7 @@ class ArclightGradlePlugin implements Plugin<Project> {
Files.delete(file)
return FileVisitResult.CONTINUE
}

@Override
FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {
Files.delete(dir)
Expand Down Expand Up @@ -130,7 +139,8 @@ class ArclightGradlePlugin implements Plugin<Project> {
def output = [
installer: [
minecraft: arclightExt.mcVersion,
forge : arclightExt.forgeVersion
forge : arclightExt.forgeVersion,
hash : ArclightGradlePlugin.sha1(installerJar)
],
libraries: ArclightGradlePlugin.artifacts(project, libs)
]
Expand Down

0 comments on commit 2a532ef

Please sign in to comment.