This repository has been archived by the owner on Nov 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
97 lines (81 loc) · 2.6 KB
/
build.gradle.kts
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
import org.cadixdev.lorenz.io.MappingFormats
import org.cadixdev.lorenz.io.MappingsReader
import org.cadixdev.lorenz.io.MappingsWriter
import java.io.InputStream
import java.io.OutputStream
import java.io.Reader
import java.io.Writer
import java.util.Optional
plugins {
java
id("net.minecrell.licenser") version "0.4.1"
id("net.minecrell.gitpatcher") version "0.9.0" // Because we modify SpongeCommon build scripts for remapping
}
apply(plugin = "net.minecrell.licenser")
group = "me.i509"
version = "1.0"
repositories {
mavenCentral()
maven("https://oss.sonatype.org/content/groups/public") {
this.name = "Sonatype OSS"
}
maven("http://maven.fabricmc.net") {
this.name = "Fabric"
}
maven("https://oss.sonatype.org/content/repositories/snapshots/") {
this.name = "Sonatype Snapshots"
}
maven("https://files.minecraftforge.net/maven") {
this.name = "MinecraftForge"
}
maven("https://repo-new.spongepowered.org/repository/maven-public") {
this.name = "New Sponge"
}
maven("https://repo.spongepowered.org/maven") {
this.name = "Sponge"
}
}
dependencies {
implementation("org.cadixdev", "lorenz", "0.5.2")
implementation("net.fabricmc:tiny-mappings-parser:0.3.0+build.17")
implementation("net.fabricmc:lorenz-tiny:2.0.0+build.2")
}
configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_1_8
}
license {
header = file("LICENSE.txt")
include("**.java")
newLine = true
}
patches {
submodule = "upstream"
target = file("PatchedSpongeCommon")
patches = file("patches")
}
task<RemapSpongeCommonTask>("remapCommon") {
this.group = "remapping"
}
task<GenerateSrgToIntermediaryTask>("generateSrgToIntermediary") {
this.format = MappingFormats.TSRG
this.outputName = "srgToIntermediary.tsrg"
}
task<GenerateSrgToIntermediaryTask>("generateTinySrgToIntermediary") {
this.format = WritableTinyFormat
this.outputName = "srgToIntermediary.tiny"
}
task<GenerateIntermediaryToMcpMappingsTask>("generateIntermediaryToMcp") {
this.format = WritableTinyFormat
this.outputName = "intermediaryToMcp.tiny"
}
object WritableTinyFormat : org.cadixdev.lorenz.io.TextMappingFormat {
override fun createWriter(writer: Writer?): MappingsWriter {
return TinyV2MappingsWriter(writer, "named", "intermediary")
}
override fun getStandardFileExtension(): Optional<String> {
return Optional.of(".tiny")
}
override fun createReader(reader: Reader?): MappingsReader {
throw UnsupportedOperationException("Use normal tiny reader")
}
}