-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
174 lines (148 loc) · 4.46 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
plugins {
id 'java-library'
id 'eclipse'
id 'idea'
id 'maven-publish'
id 'net.neoforged.moddev' version '2.0.42-beta'
}
version = "0.13.0"
group= "dev.gigaherz.jsonthings"
var minecraftVersionResolver = project.neoForge.version.map { "1." + (it =~ /^(\d+(?:\.[1-9]\d*|))\./)[0][1] }
base {
archivesName = minecraftVersionResolver.map { "JsonThings-${it}" }
}
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
repositories {
maven {
name = "Dogforce Games maven"
url 'https://www.dogforce-games.com/maven/'
}
maven {
url 'https://repo.spongepowered.org/repository/maven-public/'
content {
includeGroup "org.spongepowered"
}
}
maven {
url "https://cursemaven.com"
content {
includeGroup "curse.maven"
}
}
mavenLocal()
}
neoForge {
version = "21.3.8-beta"
runs {
// applies to all the run configs below
configureEach {
gameDirectory = project.file('run')
logLevel = org.slf4j.event.Level.DEBUG
}
client {
client()
}
server {
server()
}
}
mods {
thismod {
sourceSet(sourceSets.main)
}
}
parchment {
minecraftVersion = "1.21"
mappingsVersion = "2024.07.07"
}
}
dependencies {
//library 'com.google.guava:guava:21.0'
//runtimeOnly fg.deobf("useless:Botania:1.18.2.433")
//runtimeOnly fg.deobf("useless:curios-forge-1.18.2:5.0.7.0")
//runtimeOnly fg.deobf("useless:Patchouli:1.18.2.69")
//compileOnly 'curse.maven:rhino-416294:4805923'
compileOnly 'dev.gigaherz.rhinolib:rhino-lib:1.0.1'
runtimeOnly 'dev.gigaherz.rhinolib:rhino-lib:1.0.1'
jarJar(group:'dev.gigaherz.rhinolib', name:'rhino-lib', version:'[1.0-SNAPSHOT,)') {
}
/*library 'org.graalvm.regex:regex:22.0.0.2'
library 'org.graalvm.sdk:graal-sdk:22.0.0.2'
library 'org.graalvm.truffle:truffle-api:22.0.0.2'
library 'org.graalvm.js:js:22.0.0.2'
library 'org.graalvm.js:js-scriptengine:22.0.0.2'*/
}
java {
withSourcesJar()
}
tasks.named("jar") {
archiveClassifier = "slim"
from('/') {
include 'LICENSE.txt'
}
manifest {
attributes([
"Specification-Title": "jsonthings",
"Specification-Vendor": "gigaherz",
"Specification-Version": "1", // We are version 1 of ourselves
"Implementation-Title": project.name,
"Implementation-Version": project.version,
"Implementation-Vendor" :"gigaherz",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
tasks.named("jarJar") {
archiveClassifier = ""
}
tasks.withType(GenerateModuleMetadata) {
enabled = false
}
project.afterEvaluate {
publish.dependsOn('build')
publishing {
publications {
mavenJava(MavenPublication) {
artifactId project.archivesBaseName
from components.java
//jarJar.component(it)
//artifact sourceJar
pom.withXml {
asNode().dependencies.dependency.each { dep ->
if (dep.version.last().value().last().contains("mapped")) {
assert dep.parent().remove(dep)
}
}
}
}
}
repositories {
if (findProperty("RELEASE") && System.env.giga_maven_host != null) {
System.out.println("Remote publish enabled on " + System.env.giga_maven_host)
maven {
url System.env.giga_maven_host
credentials {
username System.env.giga_maven_user
password System.env.giga_maven_password
}
}
}
else {
System.out.println("Remote publish disabled.")
maven {
url "$projectDir/../CommonMaven"
}
}
}
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}
// IDEA no longer automatically downloads sources/javadoc jars for dependencies, so we need to explicitly enable the behavior.
idea {
module {
downloadSources = true
downloadJavadoc = true
}
}