This repository has been archived by the owner on Nov 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathbuild.gradle
91 lines (74 loc) · 2.47 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
plugins {
id 'net.minecrell.licenser' version '0.3'
id "us.kirchmeier.capsule" version "1.0.2"
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
group = 'com.surgeplay'
def commits = 'git rev-list --count HEAD'.execute().in.text.trim();
def dirty = !'git diff-index HEAD'.execute().in.text.trim().isEmpty();
version = '2.0.'+commits+(dirty ? '-dirty' : '');
archivesBaseName = 'Visage'
def commitHash = 'git rev-parse HEAD'.execute().in.text.trim();
if (commitHash.length() != 40) {
commitHash = 'master';
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
import org.gradle.internal.os.OperatingSystem
switch ( OperatingSystem.current() ) {
case OperatingSystem.WINDOWS:
project.ext.lwjglNatives = "natives-windows"
break
case OperatingSystem.LINUX:
project.ext.lwjglNatives = "natives-linux"
break
case OperatingSystem.MAC_OS:
project.ext.lwjglNatives = "natives-macos"
break
}
repositories {
mavenCentral()
mavenLocal()
}
project.ext.lwjglVersion = "3.1.2"
dependencies {
compile 'com.google.guava:guava:22.0'
compile 'net.sf.jopt-simple:jopt-simple:5.0.3'
compile 'com.typesafe:config:1.3.1'
compile 'com.rabbitmq:amqp-client:4.1.1'
compile 'com.google.code.gson:gson:2.8.1'
compile 'org.fusesource.jansi:jansi:1.16'
compile 'com.github.kerner1000:javapng:2.1.2'
compile 'org.slf4j:slf4j-jdk14:1.7.25'
compile "org.lwjgl:lwjgl:${lwjglVersion}"
compile "org.lwjgl:lwjgl-glfw:${lwjglVersion}"
compile "org.lwjgl:lwjgl-jemalloc:${lwjglVersion}"
compile "org.lwjgl:lwjgl-opengl:${lwjglVersion}"
compile "org.lwjgl:lwjgl-stb:${lwjglVersion}"
runtime "org.lwjgl:lwjgl:${lwjglVersion}:${lwjglNatives}"
runtime "org.lwjgl:lwjgl-glfw:${lwjglVersion}:${lwjglNatives}"
runtime "org.lwjgl:lwjgl-jemalloc:${lwjglVersion}:${lwjglNatives}"
runtime "org.lwjgl:lwjgl-opengl:${lwjglVersion}:${lwjglNatives}"
runtime "org.lwjgl:lwjgl-stb:${lwjglVersion}:${lwjglNatives}"
compile 'org.eclipse.jetty:jetty-server:9.4.6.v20170531'
compile 'redis.clients:jedis:2.9.0'
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.deprecation = true
}
task capsule(type: MavenCapsule) {
applicationClass 'com.surgeplay.visage.Visage'
capsuleManifest {
systemProperties['com.surgeplay.visage.internal.builtFrom'] = commitHash;
systemProperties['com.surgeplay.visage.internal.version'] = project.version;
}
}
license {
header = project.file('LICENSE')
matching('**/com/github/steveice10/mc/auth/**') {
header = project.file('mcauthlib-LICENSE')
}
}