-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
build.gradle
91 lines (78 loc) · 2.5 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
import net.minecraftforge.gradleutils.PomUtils
plugins {
id 'org.cadixdev.licenser' version '0.6.1'
id 'net.minecraftforge.gradleutils' version '[2.2,2.3)'
id 'maven-publish'
id 'java-library'
}
group 'net.minecraftforge'
version = gradleutils.tagOffsetVersion
println "Version: ${version}"
java {
toolchain.languageVersion = JavaLanguageVersion.of(17)
withSourcesJar()
}
repositories {
mavenCentral()
maven gradleutils.forgeMaven
mavenLocal()
}
license {
header = file("LICENSE-header.txt")
newLine = false
}
changelog {
fromTag '1.0.0'
}
tasks.named('jar', Jar).configure {
manifest {
attributes('Automatic-Module-Name': 'net.minecraftforge.forgespi')
attributes([
'Specification-Title': 'forgespi',
'Specification-Vendor': 'forge',
'Specification-Version': gradleutils.gitInfo.tag.split('\\.')[0],
'Implementation-Title': project.name,
'Implementation-Version': project.version,
'Implementation-Vendor': 'forge'
] as java.util.LinkedHashMap, "net/minecraftforge/forgespi/")
}
}
dependencies {
implementation('org.apache.logging.log4j:log4j-api:2.17.0')
// Needed for Type
implementation('org.ow2.asm:asm:9.7')
// Needed for dependency version comparisons
implementation('org.apache.maven:maven-artifact:3.8.1')
// Needed for SecureJar API class
implementation('net.minecraftforge:securemodules:2.2.2')
// Needed for IEnvironment and ITransformer API
implementation('net.minecraftforge:modlauncher:10.1.1')
// Needed for the sided markers
api('net.minecraftforge:mergetool-api:1.0')
}
// Done down here so that it gets populdted into the pom/module file.
configurations.all {
dependencies.all {
transitive false
}
}
publishing {
publications.register('mavenJava', MavenPublication) {
from components.java
artifactId = 'forgespi'
pom {
name = 'Forge Service Provider Interface'
description = 'API for services which can plug into forge, or which are used by forge in other places'
url = 'https://github.com/MinecraftForge/ForgeSPI'
PomUtils.setGitHubDetails(pom, 'ForgeSPI')
license PomUtils.Licenses.LGPLv2_1
developers {
developer PomUtils.Developers.cpw
developer PomUtils.Developers.LexManos
}
}
}
repositories {
maven gradleutils.publishingForgeMaven
}
}