fix CI.
This commit is contained in:
@@ -74,45 +74,6 @@ jar {
|
||||
}
|
||||
}
|
||||
|
||||
task proguard(type: proguard.gradle.ProGuardTask, dependsOn: jar) {
|
||||
ext {
|
||||
def re = jar.classifier
|
||||
injar = jar.archivePath
|
||||
jar.classifier = ''
|
||||
outjar = jar.archivePath
|
||||
jar.classifier = re
|
||||
}
|
||||
|
||||
injars injar
|
||||
outjars outjar
|
||||
printmapping "obfuscate_" + version + ".map"
|
||||
|
||||
configuration 'proguard.pro'
|
||||
}
|
||||
|
||||
task makeExecutable(dependsOn: jar) << {
|
||||
ext {
|
||||
jar.classifier = ''
|
||||
makeExecutableinjar = jar.archivePath
|
||||
jar.classifier = ''
|
||||
makeExecutableoutjar = jar.archivePath
|
||||
jar.classifier = ''
|
||||
}
|
||||
def loc = new File(project.buildDir, "libs/" + makeExecutableoutjar.getName().substring(0, makeExecutableoutjar.getName().length()-4)+".exe")
|
||||
def fos = new FileOutputStream(loc)
|
||||
def is = new FileInputStream(new File(project.buildDir, '../HMCLauncher.exe'))
|
||||
int read
|
||||
def bytes = new byte[8192]
|
||||
while((read = is.read(bytes)) != -1)
|
||||
fos.write(bytes, 0, read);
|
||||
is.close()
|
||||
is = new FileInputStream(makeExecutableinjar)
|
||||
while((read = is.read(bytes)) != -1)
|
||||
fos.write(bytes, 0, read);
|
||||
is.close()
|
||||
fos.close()
|
||||
}
|
||||
|
||||
launch4j {
|
||||
launch4jCmd = 'D:\\Develop\\Java\\Launch4j\\launch4j.exe'
|
||||
supportUrl = 'http://www.mcbbs.net/thread-142335-1-1.html'
|
||||
@@ -135,4 +96,4 @@ processResources {
|
||||
}
|
||||
}
|
||||
|
||||
build.dependsOn makeExecutable
|
||||
build.dependsOn makeExecutable
|
||||
BIN
HMCSM/HMCLauncher.exe
Normal file
BIN
HMCSM/HMCLauncher.exe
Normal file
Binary file not shown.
@@ -36,7 +36,6 @@ buildscript {
|
||||
repositories {
|
||||
mavenCentral();
|
||||
dependencies {
|
||||
classpath 'net.sf.proguard:proguard-gradle:4.10'
|
||||
classpath 'edu.sc.seis.gradle:launch4j:1.0.6'
|
||||
classpath 'me.tatarka:gradle-retrolambda:3.1.0'
|
||||
}
|
||||
@@ -72,26 +71,10 @@ jar {
|
||||
}
|
||||
}
|
||||
|
||||
task proguard(type: proguard.gradle.ProGuardTask, dependsOn: jar) {
|
||||
ext {
|
||||
injar = jar.archivePath
|
||||
jar.classifier = 'proguard'
|
||||
outjar = jar.archivePath
|
||||
jar.classifier = ''
|
||||
}
|
||||
|
||||
injars injar
|
||||
outjars outjar
|
||||
printusage "shrinking_" + version + ".map"
|
||||
printmapping "obfuscate_" + version + ".map"
|
||||
|
||||
configuration 'proguard.pro'
|
||||
}
|
||||
|
||||
processResources {
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
exclude 'icon.icns'
|
||||
}
|
||||
}
|
||||
|
||||
build.dependsOn proguard
|
||||
build.dependsOn makeExecutable
|
||||
File diff suppressed because it is too large
Load Diff
@@ -53,4 +53,27 @@ task createFolders(description: 'Creates the source folders if they do not exist
|
||||
srcDir.mkdirs()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task makeExecutable(dependsOn: jar) << {
|
||||
ext {
|
||||
jar.classifier = ''
|
||||
makeExecutableinjar = jar.archivePath
|
||||
jar.classifier = ''
|
||||
makeExecutableoutjar = jar.archivePath
|
||||
jar.classifier = ''
|
||||
}
|
||||
def loc = new File(project.buildDir, "libs/" + makeExecutableoutjar.getName().substring(0, makeExecutableoutjar.getName().length()-4)+".exe")
|
||||
def fos = new FileOutputStream(loc)
|
||||
def is = new FileInputStream(new File(project.buildDir, '../HMCLauncher.exe'))
|
||||
int read
|
||||
def bytes = new byte[8192]
|
||||
while((read = is.read(bytes)) != -1)
|
||||
fos.write(bytes, 0, read);
|
||||
is.close()
|
||||
is = new FileInputStream(makeExecutableinjar)
|
||||
while((read = is.read(bytes)) != -1)
|
||||
fos.write(bytes, 0, read);
|
||||
is.close()
|
||||
fos.close()
|
||||
}
|
||||
Reference in New Issue
Block a user