Repository navigation
Expand file tree
/
Copy pathbuild.gradle
More file actions
90 lines (73 loc) · 2.12 KB
/
Copy pathbuild.gradle
File metadata and controls
90 lines (73 loc) · 2.12 KB
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
plugins {
id 'java-library'
id 'maven-publish'
alias libs.plugins.licenser
alias libs.plugins.gitversion
alias libs.plugins.gradleutils
alias libs.plugins.forgegradle
}
gradleutils.displayName = 'Legacy Java Fixer'
description = 'A tweaker that fixes legacy Forge versions for the sorting change in java 8u20'
version = gitversion.tagOffset
group = 'net.minecraftforge'
println "Version: $version"
java {
toolchain.languageVersion = JavaLanguageVersion.of(8)
}
repositories {
minecraft.mavenizer(it)
mavenCentral()
maven gradleutils.forgeMaven
maven { url = 'https://libraries.minecraft.net/' }
}
minecraft {
runs {
configureEach {
systemProperty 'fml.coreMods.load', 'net.minecraftforge.legacyjavafixer.LoadingPlugin'
}
register('client') {
workingDir = file('runs/main/client/')
systemProperty 'fml.ignoreInvalidMinecraftCertificates', 'true'
}
}
}
dependencies {
// We just need the classes to compile against, but include the full thing so we can test run configs
implementation minecraft.dependency(libs.forge)
}
license {
header rootProject.file('LICENSE-header.txt')
newLine false
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
tasks.named('jar', Jar) {
manifest {
attributes(
'TweakClass': 'net.minecraftforge.legacyjavafixer.Tweaker',
'TweakOrder': -2147483648
)
}
}
publishing {
publications.register('mavenJava', MavenPublication) {
// This causes it to skip any transitive dependencies in the pom
artifact tasks.named('jar')
gradleutils.promote(it)
pom { pom ->
name = gradleutils.displayName
description = project.description
gradleutils.pom.addRemoteDetails(pom)
licenses {
license gradleutils.pom.licenses.MIT
}
developers {
developer gradleutils.pom.developers.LexManos
}
}
}
repositories {
maven gradleutils.publishingForgeMaven
}
}