-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbuild.gradle
More file actions
109 lines (88 loc) · 2.67 KB
/
Copy pathbuild.gradle
File metadata and controls
109 lines (88 loc) · 2.67 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
plugins {
id 'java-library'
id 'idea'
id 'maven-publish'
alias libs.plugins.licenser
alias libs.plugins.gradleutils
}
final projectDisplayName = 'Logging Utils'
final projectVendor = 'Forge Development LLC'
description = 'General-purpose logging utilities for Forge-specific projects'
group = 'net.minecraftforge'
version = gitversion.tagOffset
println "Version: $version"
final java11 = sourceSets.create('java11')
java {
toolchain.languageVersion = JavaLanguageVersion.of 8
withSourcesJar()
registerFeature(java11.name) {
usingSourceSet java11
capability project.group.toString(), project.name, project.version.toString()
disablePublication()
}
}
configurations {
named(java11.implementationConfigurationName) { extendsFrom implementation }
named(java11.compileOnlyConfigurationName) { extendsFrom compileOnly }
}
dependencies {
compileOnly libs.nulls
}
tasks.named('jar', Jar) {
manifest {
attributes([
'Automatic-Module-Name': 'net.minecraftforge.utils.logging',
'Multi-Release' : 'true'
])
attributes([
'Specification-Title' : projectDisplayName,
'Specification-Vendor' : projectVendor,
'Specification-Version' : gitversion.info.tag,
'Implementation-Title' : projectDisplayName,
'Implementation-Vendor' : projectVendor,
'Implementation-Version': project.version
], 'net/minecraftforge/util/logging/')
into('META-INF/versions/11') {
from java11.output
}
}
}
tasks.named(java11.compileJavaTaskName, JavaCompile) {
javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of 11
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
license {
header = rootProject.file('LICENSE-header.txt')
newLine = false
exclude '**/*.properties'
}
changelog {
fromBase()
publishAll = false
}
publishing {
publications.register('mavenJava', MavenPublication) {
from components.java
artifactId = project.name
pom { pom ->
name = projectDisplayName
description = project.description
gradleutils.pom.setGitHubDetails pom
licenses {
license gradleutils.pom.licenses.LGPLv2_1
}
developers {
developer gradleutils.pom.Developers.LexManos
developer gradleutils.pom.Developers.Jonathing
}
}
}
repositories {
maven gradleutils.publishingForgeMaven
}
}
idea.module { downloadSources = downloadJavadoc = true }