forked from jaghaimo/starpocalypse
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
83 lines (73 loc) · 2.22 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
import groovy.json.JsonSlurper
plugins {
id 'java'
}
repositories {
mavenCentral()
ivy {
url 'https://github.com/'
patternLayout {
artifact '/[organization]/[module]/releases/download/[revision]/[ext]'
}
metadataSources {
artifact()
}
}
ivy {
url 'https://github.com/'
patternLayout {
artifact '/[organization]/[module]/raw/master/jars/[revision]'
}
metadataSources {
artifact()
}
}
}
// project level config
java {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
// where to find sources
sourceSets.main.java.srcDirs = ['src/']
// build everything and make a jar
build {
doLast {
copy {
from 'assets'
from jar
into '.'
}
}
}
// compile time dependencies
dependencies {
implementation "jaghaimo:starsector-api:[email protected]"
implementation "Histidine91:Nexerelin:ExerelinCore.jar"
// game dependencies
implementation group: 'com.thoughtworks.xstream', name: 'xstream', version: '1.4.10'
implementation group: 'org.lwjgl.lwjgl', name: 'lwjgl', version: '2.9.3'
implementation group: 'org.lwjgl.lwjgl', name: 'lwjgl_util', version: '2.9.3'
implementation group: 'log4j', name: 'log4j', version: '1.2.9'
implementation group: 'org.json', name: 'json', version: '20090211'
implementation group: 'net.java.jinput', name: 'jinput', version: '2.0.7'
implementation group: 'org.codehaus.janino', name: 'janino', version: '3.0.7'
// lombok
compileOnly group: 'org.projectlombok', name: 'lombok', version: '1.18.22'
annotationProcessor 'org.projectlombok:lombok:1.18.22'
}
// custom tasks
task release(type: Zip) {
dependsOn build
archiveFileName = "${project.name}-${readModInfoJson().version}.zip"
destinationDirectory = file(rootDir)
from 'assets'
from jar
into project.name
}
// methods
def readModInfoJson() {
def jsonFile = file('assets/mod_info.json')
def slurper = new JsonSlurper()
return slurper.parse(jsonFile)
}