-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
110 lines (94 loc) · 2.83 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import net.neoforged.gradleutils.PomUtilsExtension.License
plugins {
id 'org.cadixdev.licenser' version '0.6.1'
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
id 'net.neoforged.gradleutils' version '3.0.0-alpha.10' apply false
}
allprojects {
apply plugin: 'application'
apply plugin: 'maven-publish'
apply plugin: 'java-library'
apply plugin: 'net.neoforged.gradleutils'
if (project.name != 'cli-utils') {
apply plugin: 'com.github.johnrengelman.shadow'
}
group = 'net.neoforged.installertools'
java {
withJavadocJar()
withSourcesJar()
toolchain.languageVersion = JavaLanguageVersion.of(8)
}
repositories {
mavenCentral()
}
gradleutils.version {
branches.suffixBranch()
}
version = gradleutils.version
println("${project.name} version: " + version)
gradleutils.setupSigning(signAllPublications: true)
tasks.named('jar', Jar).configure {
manifest.attributes('Implementation-Version': project.version)
if (application.mainClass.getOrNull()) {
manifest.attributes('Main-Class': application.mainClass.get())
}
}
if (project.name != 'cli-utils') {
tasks.named('shadowJar', ShadowJar).configure {
archiveClassifier = 'fatjar'
}
}
}
gradleutils {
setupSigning()
setupCentralPublishing()
}
base {
archivesName = 'installertools'
}
application {
mainClass = 'net.neoforged.installertools.ConsoleTool'
}
license {
header project.file('LICENSE-header.txt')
include 'net/neoforged/installertools/**/*.java'
newLine false
}
dependencies {
implementation(libs.srgutils)
implementation(libs.jopt)
implementation 'com.google.code.gson:gson:2.8.9'
implementation 'net.md-5:SpecialSource:1.11.0'
implementation 'de.siegmar:fastcsv:2.0.0'
implementation 'org.ow2.asm:asm-commons:9.3'
implementation project(':cli-utils')
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifactId = base.archivesName.get()
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.'
}
}
}
}
allprojects {
publishing {
publications {
withType(MavenPublication).configureEach {
it.pom {
pomUtils.githubRepo(it, 'InstallerTools')
pomUtils.license(it, License.LGPL_v2)
pomUtils.neoForgedDeveloper(it)
}
}
}
repositories {
maven gradleutils.publishingMaven
}
}
}