-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
73 lines (63 loc) · 1.88 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
import groovy.json.JsonSlurper
plugins {
id 'java'
}
repositories {
mavenCentral()
ivy {
url 'https://github.com/'
patternLayout {
artifact '/[organization]/[module]/releases/download/[revision]/[ext]'
}
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 'Release'
}
}
}
// compile time dependencies
dependencies {
implementation "jaghaimo:starsector-api:[email protected]"
// 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('Release')
from 'assets'
from jar
into 'Koprulu Sector'
}
// methods
def readModInfoJson() {
def jsonFile = file('assets/mod_info.json')
def slurper = new JsonSlurper()
return slurper.parse(jsonFile)
}