-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
116 lines (96 loc) · 2.39 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
plugins {
id 'edu.sc.seis.launch4j' version '2.4.6'
}
apply plugin: 'java'
apply plugin: 'application'
// give your project a name
archivesBaseName = "Pumpkin Keeper"
version = "v1.1.0"
targetCompatibility = "18"
mainClassName = "de.gurkenlabs.ldjam46.Program"
repositories {
mavenCentral()
}
dependencies {
implementation 'de.gurkenlabs:litiengine:0.5.1'
}
sourceSets {
main.java.srcDir "src"
main.resources.srcDirs = ["sprites", "audio", "misc"]
// main.resources.includes = ["game.litidata"]
}
jar {
from {
configurations.runtimeClasspath.collect {
it.isDirectory() ? it : zipTree(it)
}
configurations.compileClasspath.collect {
it.isDirectory() ? it : zipTree(it)
}
} {
exclude 'META-INF/services/**'
}
// // make sure to only include service providers from the litiengine when directly referencing the project
// from ("${project(':litiengine').projectDir}/resources/") {
// include 'META-INF/services/**'
// }
from 'game.litidata'
exclude '**/*.dll'
exclude '**/*.jnilib'
exclude '**/*.dylib'
exclude '**/*.so'
exclude 'junit**/**'
manifest {
attributes 'Class-Path': ".",
'Main-Class': mainClassName
}
}
launch4j {
mainClassName = 'de.gurkenlabs.ldjam46.Program'
icon = 'game.ico'
outputDir = 'libs'
outfile = archivesBaseName +'.exe'
companyName = 'gurkenlabs.de'
version = '1.1.0'
textVersion = 'v1.1.0'
copyright = '2020 gurkenlabs.de'
bundledJrePath = 'jre'
jvmOptions = ['-Xms256m', '-Xmx1024m']
cmdLine = '-release'
splashFileName = 'made-with-litiengine.bmp'
}
task copyNativeLibs(type: Copy) {
def litiengineLibs ='../litiengine/build/libs'
def buildFolder = new File(buildDir, 'libs')
from(litiengineLibs) {
include '**/*'
exclude '**/*.jar'
exclude '**/*.zip'
exclude 'LICENSE'
exclude 'lib/**'
}
from('/dist/'){
include 'game.ico'
include 'config.properties'
include 'made-with-litiengine.bmp'
// include 'steam_appid.txt'
include 'jre/**'
}
into buildFolder
}
build.dependsOn copyNativeLibs
task distZipWindow(type: Zip) {
group 'build'
from 'build/libs/'
include '*.exe'
include '*.dll'
include 'config.properties'
include 'jre/**'
archiveClassifier = 'win'
exclude archiveName
exclude 'jinput-dx8.dll'
exclude 'jinput-raw.dll'
exclude 'steam_api.dll'
exclude 'steamworks4j.dll'
destinationDirectory = file('build/libs/')
}