forked from MinecraftForge/InstallerTools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
105 lines (94 loc) · 3.27 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
plugins {
id 'maven-publish'
id 'java'
id 'eclipse'
id 'org.cadixdev.licenser' version '0.5.0'
id 'org.ajoberstar.grgit' version '4.1.0'
id 'com.github.johnrengelman.shadow' version '2.0.4'
}
group = 'net.minecraftforge'
version = (grgit.describe(longDescr: true, tags: true) ?: 'unknown-unknown-unknown').split('-').with { "${it[0]}.${it[1]}" }
println('Version: ' + version)
java.toolchain.languageVersion = JavaLanguageVersion.of(8)
repositories {
mavenCentral()
maven { url 'https://files.minecraftforge.net/maven/' }
}
license {
header project.file('LICENSE-header.txt')
include 'net/minecraftforge/installertools/**/*.java'
newLine false
}
jar {
manifest.attributes('Main-Class': 'net.minecraftforge.installertools.ConsoleTool')
manifest.attributes('Implementation-Version': project.version)
}
shadowJar {
classifier 'fatjar'
manifest.attributes('Main-Class': 'net.minecraftforge.installertools.ConsoleTool')
manifest.attributes('Implementation-Version': project.version)
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives jar
archives shadowJar
archives sourcesJar
}
dependencies {
implementation 'net.sf.jopt-simple:jopt-simple:5.0.4'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'net.md-5:SpecialSource:1.8.5'
implementation 'de.siegmar:fastcsv:2.0.0'
implementation 'net.minecraftforge:srgutils:0.4.1'
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact shadowJar
pom {
name = 'Installer Tools'
description = 'A collection of command line tools that are useful for the Forge installer, that are not worth being their own standalone projects.'
url = 'https://github.com/MinecraftForge/InstallerTools'
scm {
url = 'https://github.com/MinecraftForge/InstallerTools'
connection = 'scm:git:git://github.com/MinecraftForge/InstallerTools.git'
developerConnection = 'scm:git:[email protected]:MinecraftForge/InstallerTools.git'
}
issueManagement {
system = 'github'
url = 'https://github.com/MinecraftForge/InstallerTools/issues'
}
licenses {
license {
name = 'LGPLv2.1'
url = 'https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt'
}
}
developers {
developer {
id = 'LexManos'
name = 'Lex Manos'
}
}
}
}
}
repositories {
maven {
if (project.hasProperty('forgeMavenPassword')) {
credentials {
username project.properties.forgeMavenUser
password project.properties.forgeMavenPassword
}
url 'http://files.minecraftforge.net/maven/manage/upload'
} else {
url 'file://' + rootProject.file('repo').getAbsolutePath()
}
}
}
}