forked from betacraftuk/betacraft-launcher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
70 lines (63 loc) · 1.21 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
plugins {
id 'java'
id 'eclipse'
}
targetCompatibility = 5;
sourceCompatibility = 5;
repositories {
mavenCentral()
flatDir {
dirs 'lib'
}
}
jar {
from {
configurations.extraLibs.collect {
it.isDirectory() ? it : zipTree(it)
}
}
manifest {
attributes(
'Main-Class': 'org.betacraft.launcher.Launcher'
)
}
}
task osxBuildApp {
dependsOn jar
doLast {
def dist = "${buildDir}/app/BetaCraft Launcher.app"
mkdir("$dist/Contents/MacOS")
mkdir("$dist/Contents/Resources")
copy {
from "${buildDir}/../src/main/app/Info.plist"
into "$dist/Contents"
}
copy {
from "${buildDir}/../src/main/app/PkgInfo"
into "$dist/Contents"
}
copy {
from "${buildDir}/../src/main/app/BetaCraft Launcher"
into "$dist/Contents/MacOS"
}
copy {
from "${buildDir}/../src/main/app/icon.icns"
into "$dist/Contents/Resources"
}
copy {
from "${buildDir}/libs/${project.name}.jar"
into "$dist/Contents/MacOS"
}
exec {
workingDir "${buildDir}/app/"
commandLine('zip', '-rvFSX', "../libs/BetaCraft-Launcher-macOS.zip", '.')
}
}
}
configurations {
extraLibs
}
dependencies {
compile fileTree(dir: 'lib', include: ['*.jar'])
extraLibs files('lib/gson-java5-2.8.10-SNAPSHOT.jar')
}