-
Notifications
You must be signed in to change notification settings - Fork 96
/
build.gradle
120 lines (97 loc) · 2.67 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
117
118
119
120
plugins {
id 'application'
id 'maven-publish'
}
allprojects {
apply plugin: "java"
version = "2.2.1-dev2"
sourceCompatibility = 8
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
repositories {
mavenCentral()
}
}
subprojects {
sourceSets.main {
java {
srcDir "java"
}
resources {
srcDir "resources"
}
}
dependencies {
implementation 'org.jetbrains:annotations:23.0.0'
implementation 'org.tinylog:tinylog-api:2.4.1'
implementation 'org.tinylog:tinylog-impl:2.4.1'
}
}
project(":common") {
dependencies {
}
}
project(":client") {
archivesBaseName = "minicraft-plus"
repositories {
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://jitpack.io" }
}
dependencies {
implementation project(":common")
implementation 'org.json:json:20220320'
implementation 'com.konghq:unirest-java:3.13.10'
implementation 'com.badlogicgames.gdx:gdx:1.11.0'
implementation 'com.badlogicgames.gdx:gdx-box2d:1.11.0'
implementation 'com.badlogicgames.gdx:gdx-controllers:1.9.13'
implementation 'com.badlogicgames.jamepad:jamepad:2.0.20.0'
}
application {
mainClass = 'minicraft.core.Game'
}
}
project(":server") {
archivesBaseName = "minicraft-plus-server"
dependencies {
implementation project(":common")
}
application {
mainClass = 'minicraft.core.Server'
}
}
// Building the root project actually just builds the client project.
dependencies {
implementation project(":client")
}
// Build a runnable game distribution.
jar {
manifest {
attributes(
'Main-Class': 'minicraft.core.Game',
'Implementation-Title': project.name,
'Implementation-Version': project.version,
'SplashScreen-Image': "Minicraft_Splash_Screen_3.png")
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from files(sourceSets.main.output.classesDirs)
from files(sourceSets.main.output.resourcesDir)
from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/MinicraftPlus/minicraft-plus-revived"
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
}
// Don't override if we're building a tar package.
tasks.withType(Tar) {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
tasks.withType(Zip) {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}