forked from SizableShrimp/LegacyDev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
131 lines (115 loc) · 3.35 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
plugins {
id 'eclipse'
id 'idea'
id 'java'
id 'maven-publish'
id 'org.cadixdev.licenser' version '0.6.1'
id 'com.github.johnrengelman.shadow' version '5.2.0'
id 'net.minecraftforge.gradleutils' version '1.+'
}
repositories {
mavenCentral()
maven {
name 'mojang'
url 'https://libraries.minecraft.net/'
}
}
ext {
GIT_INFO = gradleutils.gitInfo
}
group = 'net.minecraftforge'
archivesBaseName = 'legacydev'
version = gradleutils.getTagOffsetVersion()
targetCompatibility = sourceCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
license {
header project.file('LICENSE-header.txt')
include 'net/minecraftforge/legacydev/**/*.java'
newLine false
}
ext {
MANIFEST = manifest{
attributes([
'Specification-Title': 'accesstransformers',
'Specification-Vendor': 'Forge Development LLC',
'Specification-Version': GIT_INFO.tag,
'Implementation-Title': project.name,
'Implementation-Vendor': 'Forge Development LLC',
] as LinkedHashMap, 'net/minecraftforge/legacydev/')
}
}
configurations {
shade
}
dependencies {
shade 'net.sf.jopt-simple:jopt-simple:5.0.4'
implementation('net.minecraft:launchwrapper:1.12') {
exclude group: 'org.ow2.asm'
}
implementation 'com.google.guava:guava:21.0'
}
compileJava {
options.encoding = 'UTF-8'
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
manifest.from(MANIFEST)
}
shadowJar {
classifier 'fatjar'
configurations = [ project.configurations.shade ]
manifest.from(MANIFEST)
}
artifacts {
archives shadowJar
archives sourcesJar
}
jar {
manifest.from(MANIFEST)
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact sourcesJar
artifact shadowJar
artifact jar
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 {
if (System.env.MAVEN_USER) {
url "https://maven.minecraftforge.net/releases/"
authentication {
basic(BasicAuthentication)
}
credentials {
username = System.env.MAVEN_USER ?: 'not'
password = System.env.MAVEN_PASSWORD ?: 'set'
}
} else {
url 'file://' + rootProject.file('repo').getAbsolutePath()
}
}
}
}