-
Notifications
You must be signed in to change notification settings - Fork 32
/
build.gradle
108 lines (87 loc) · 2.8 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
plugins {
id 'com.github.ben-manes.versions' version '0.39.0'
id 'net.neoforged.licenser' version '0.7.2' apply false
id 'com.diffplug.spotless' version '6.25.0' apply false
id 'net.neoforged.gradleutils' version "${gradleutils_version}"
id 'net.neoforged.gradleutils.spotless' version "${gradleutils_version}" apply false
}
changelog {
disableAutomaticPublicationRegistration()
}
gradleutils.version {
branches {
suffixBranch()
}
}
println "Version: ${project.version = gradleutils.version}"
allprojects {
apply plugin: 'java-library'
apply plugin: 'jacoco'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'net.neoforged.licenser'
apply plugin: 'com.diffplug.spotless'
apply plugin: 'net.neoforged.gradleutils'
apply plugin: 'net.neoforged.gradleutils.spotless'
gradleutils {
setupSigning(signAllPublications: true)
}
group = 'net.neoforged.fancymodloader'
version = rootProject.version
spotlessUtils.configure(spotless)
dependencyUpdates.rejectVersionIf { isNonStable(it.candidate.version) }
java {
withSourcesJar()
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
test {
useJUnitPlatform()
}
}
subprojects { subProject ->
subProject.version = rootProject.version
jar {
manifest.attributes(
'Git-Commit' : gradleutils.gitInfo.abbreviatedId,
'Build-Number': "${subProject.version}",
'Automatic-Module-Name' : "fml_${subProject.name.replace("-", "_")}",
'Specification-Title' : "FML${subProject.name}",
'Specification-Vendor' : 'NeoForged',
'Specification-Version' : "${subProject.version.toString().split('\\.')[0]}",
'Implementation-Title' : "FML $subProject.name",
'Implementation-Version': "${subProject.version.toString().split('\\.')[0]}.${subProject.version.toString().split('\\.')[1]}",
'Implementation-Vendor' : 'NeoForged'
)
if (subProject.name != 'junit') {
manifest.attributes.put('FMLModType', 'LIBRARY')
}
}
tasks.withType(JavaCompile) {
options.compilerArgs << '-Xlint:unchecked'
}
license {
header = rootProject.file('LICENSE-header.txt')
skipExistingHeaders true
include 'net/neoforged/'
}
artifacts {
archives jar
archives sourcesJar
}
publishing {
publications {
maven(MavenPublication) {
from components.java
}
}
repositories {
maven gradleutils.publishingMaven
}
}
changelog {
from "1.0"
}
}