-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
106 lines (86 loc) · 1.98 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
plugins {
id 'eclipse'
id 'idea'
id 'java-library'
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'net.neoforged.moddev' version '1.0.0'
}
group = "com.lovetropics"
archivesBaseName = "love-accessibility"
ext.buildnumber = 0
if (System.getenv('GITHUB_RUN_NUMBER')) {
project.buildnumber = System.getenv('GITHUB_RUN_NUMBER')
version = "${mod_version}+${buildnumber}-gha"
} else {
version = "${mod_version}"
}
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
neoForge {
version = project.neo_version
parchment {
minecraftVersion = minecraft_version
mappingsVersion = parchment_version
}
runs {
client {
client()
programArguments.addAll '--username', 'Dev###'
}
server {
server()
programArgument '--nogui'
}
data {
data()
programArguments.addAll '--mod', project.mod_id, '--all', '--output', file('src/generated/resources/').getAbsolutePath(), '--existing', file('src/main/resources/').getAbsolutePath()
}
configureEach {
logLevel = org.slf4j.event.Level.INFO
}
}
mods {
"${project.mod_id}" {
sourceSet sourceSets.main
sourceSet sourceSets.test
}
}
}
configurations {
shade
library
implementation.extendsFrom library
}
repositories {
maven { url = 'https://maven.gegy.dev' }
}
dependencies {
final def nvda_controller = 'dev.gegy:nvda-controller-client-java:1.0.0'
library nvda_controller
shade(nvda_controller) {
transitive = false
}
}
tasks.withType(ProcessResources).configureEach {
var replaceProperties = [
mod_version: mod_version,
]
inputs.properties replaceProperties
filesMatching(['META-INF/neoforge.mods.toml']) {
expand replaceProperties
}
}
shadowJar {
configurations = [project.configurations.shade]
archiveClassifier.set('')
}
build.dependsOn shadowJar
idea {
module {
downloadSources = true
downloadJavadoc = true
}
}
jar {
archiveClassifier.set('slim')
}