-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle
116 lines (98 loc) · 3 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
112
113
114
115
116
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
plugins {
id 'java'
id 'idea'
id 'eclipse'
id 'maven-publish'
id 'org.ajoberstar.grgit' version '5.0.0'
id 'org.cadixdev.licenser' version '0.6.1'
id 'net.minecraftforge.gradleutils' version '2.+'
id 'com.github.johnrengelman.shadow' version '8.0.0'
}
repositories {
mavenCentral()
}
changelog {
fromTag '0.2.3'
}
group = 'net.minecraftforge'
archivesBaseName = 'legacydev'
version = gradleutils.tagOffsetVersion
println "Version: $version"
license {
header project.file('LICENSE-header.txt')
include 'net/minecraftforge/legacydev/**/*.java'
newLine false
}
final MANIFEST = manifest {
attributes([
'Specification-Title': 'accesstransformers',
'Specification-Vendor': 'Forge Development LLC',
'Specification-Version': version,
'Implementation-Title': project.name,
'Implementation-Version': "${version}+${System.getenv("BUILD_NUMBER")?:0}+${grgit.head().abbreviatedId}",
'Implementation-Vendor': 'Forge Development LLC',
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
'Git-Commit': grgit.head().abbreviatedId,
'Git-Branch': grgit.branch.current().getName()
] as LinkedHashMap, 'net/minecraftforge/legacydev/')
}
dependencies {
implementation 'net.sf.jopt-simple:jopt-simple:5.0.4'
}
java {
withSourcesJar()
toolchain {
languageVersion.set(JavaLanguageVersion.of(8))
}
}
compileJava {
options.encoding = 'UTF-8'
}
tasks.register('relocateShadowJar', ConfigureShadowRelocation) {
target = tasks.shadowJar
prefix = "${project.group}.${project.name}.reloc"
}
shadowJar {
dependsOn(relocateShadowJar)
manifest.from(MANIFEST)
archiveClassifier.set('fatjar')
}
artifacts {
archives shadowJar
archives sourcesJar
}
jar {
manifest.from(MANIFEST)
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
pom {
name = project.archivesBaseName
packaging = 'jar'
description = 'Minecraft Forge Legacy Dev'
url = 'https://github.com/MinecraftForge/LegacyDev'
scm {
url = 'https://github.com/MinecraftForge/LegacyDev'
connection = 'scm:git:git://github.com/MinecraftForge/LegacyDev.git'
developerConnection = 'scm:git:[email protected]:MinecraftForge/LegacyDev.git'
}
issueManagement {
system = 'github'
url = 'https://github.com/MinecraftForge/LegacyDev/issues'
}
developers {
developer {
id = 'LexManos'
name = 'Lex Manos'
}
}
}
}
}
repositories {
maven(gradleutils.getPublishingForgeMaven())
}
}