-
Notifications
You must be signed in to change notification settings - Fork 20
/
build.gradle
95 lines (79 loc) · 2.71 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
plugins {
id 'java'
id 'eclipse'
id 'idea'
id 'maven-publish'
id 'fabric-loom' version '1.7.+' apply false
id 'com.matthewprenger.cursegradle' version "1.4.0"
}
class Globals {
static def baseVersion = "2.4.0"
static def mcVersion = "1.21.2-rc1"
static def yarnVersion = "+build.1"
}
archivesBaseName = "Server-Translations"
allprojects {
apply plugin: 'fabric-loom'
version = Globals.baseVersion + "+" + Globals.mcVersion
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
group = "xyz.nucleoid"
repositories {
mavenCentral()
maven { url = 'https://maven.nucleoid.xyz/' }
maven {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
}
maven {
name = 'SpongePowered'
url = 'https://repo.spongepowered.org/maven'
}
maven {
name = 'mojang'
url = 'https://libraries.minecraft.net/'
}
maven {
name = "Jitpack"
url = "https://jitpack.io"
}
//mavenLocal()
}
dependencies {
minecraft "com.mojang:minecraft:$Globals.mcVersion"
mappings "net.fabricmc:yarn:${Globals.mcVersion}${Globals.yarnVersion}:v2"
modImplementation "net.fabricmc:fabric-loader:0.16.7"
modImplementation include("xyz.nucleoid:packet-tweaker:0.6.0-pre.1+1.21.2-pre3")
modImplementation "net.fabricmc.fabric-api:fabric-api:0.106.0+1.21.2"
}
processResources {
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand "version": project.version
}
}
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
options.release.set(21)
}
java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
}
jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
}
}
if (it.name != "api") remapJar.dependsOn ':api:remapJar'
}
dependencies {
implementation project(path: ':api', configuration: "namedElements")
include project(':api'/*name: 'server-translations-api', version: project(':api').version, ext: 'jar'*/)
}