-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathbuild.gradle
69 lines (62 loc) · 1.36 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
plugins {
id 'java'
id 'eclipse'
}
// Gson 2.10 requires Java 7, there's no point in compiling this for Java 5
targetCompatibility = 7;
sourceCompatibility = 7;
repositories {
mavenCentral()
maven {
url = uri("https://repo.blueberrymc.net/repository/maven-releases/")
}
}
jar {
from {
configurations.runtime.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", '.')
}
}
}
dependencies {
runtime 'com.google.code.gson:gson:2.10.1'
compileOnly 'com.google.code.gson:gson:2.10.1'
compileOnly 'net.arikia.dev:discord-rpc-without-jna:1.7.0'
}