-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
111 lines (89 loc) · 2.97 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
import net.minecraftforge.gradleutils.PomUtils
plugins {
id 'java-library'
id 'maven-publish'
id 'net.minecraftforge.licenser' version '1.0.1'
id 'net.minecraftforge.gradleutils' version '[2.3,2.4)'
}
group = 'net.minecraftforge'
version = gradleutils.tagOffsetVersion
println "Version: $version"
subprojects { Project subproject ->
subproject.apply {
plugin 'java-library'
plugin 'maven-publish'
plugin 'net.minecraftforge.licenser'
}
subproject.group = 'net.minecraftforge'
subproject.version = rootProject.version
sourceSets {
test {
java {
srcDir file('src/binks/java')
}
resources.srcDir file('src/binks/resources')
}
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
withSourcesJar()
}
repositories {
mavenCentral()
maven gradleutils.forgeMaven
}
dependencies {
testImplementation libs.junit.api
testRuntimeOnly libs.junit.engine
}
project.tasks.withType(JavaCompile).configureEach {
JavaToolchainService service = project.extensions.getByType(JavaToolchainService)
Provider<JavaCompiler> compiler = service.compilerFor(s -> s.languageVersion.set(JavaLanguageVersion.of(8)))
javaCompiler = compiler
}
tasks.named('test', Test).configure {
useJUnitPlatform()
}
tasks.named('processTestResources', ProcessResources).configure {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
tasks.named('jar', Jar).configure {
manifest {
attributes([
'Maven-Artifact' : "${project.group}:${project.archivesBaseName}:${project.version}",
"Specification-Title" : project.name,
"Specification-Vendor" : "Minecraft Forge",
"Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : project.name,
"Implementation-Version" : "${project.version}",
"Implementation-Vendor" : "Minecraft Forge",
"Automatic-Module-Name" : project.name,
])
}
}
license {
header = file('../header.txt')
newLine = false
exclude '**/*.properties'
}
publishing {
publications.register('mavenJava', MavenPublication) {
from components.java
pom {
name = project.name
description = 'Jar in Jar Utilities including the required NIO FileSystems. SubSystem: ' + project.name
url = 'https://github.com/MinecraftForge/JarJar'
PomUtils.setGitHubDetails(pom, 'JarJar')
license PomUtils.Licenses.LGPLv2_1
}
}
repositories {
maven gradleutils.publishingForgeMaven
}
}
}
changelog {
from '0.3'
}