-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle
99 lines (84 loc) · 2.73 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
plugins {
id 'java-gradle-plugin'
id 'groovy'
id 'maven-publish'
id 'net.minecraftforge.licenser' version '1.0.1'
id 'com.gradle.plugin-publish' version '1.2.1'
id 'net.minecraftforge.gradleutils'
id 'com.github.johnrengelman.shadow' version '8.1.1'
}
group 'net.minecraftforge'
version gradleutils.tagOffsetVersion
println "Version: $version"
repositories {
mavenCentral()
}
dependencies {
implementation 'org.eclipse.jgit:org.eclipse.jgit:6.7.0.202309050840-r'
}
java {
// JGit 6.7 requires Java 11
toolchain.languageVersion = JavaLanguageVersion.of(11)
withSourcesJar()
}
tasks.withType(GroovyCompile).configureEach {
groovyOptions.optimizationOptions.indy = true
}
license {
header = file('LICENSE-header.txt')
newLine = false
exclude '** /*.properties'
}
gradlePlugin {
website = 'https://github.com/MinecraftForge/GradleUtils'
vcsUrl = 'https://github.com/MinecraftForge/GradleUtils.git'
plugins {
gradleutils {
id = 'net.minecraftforge.gradleutils'
implementationClass = 'net.minecraftforge.gradleutils.GradleUtilsPlugin'
displayName = 'Forge Gradle Utilities'
description = 'Small collection of utilities for standerdizing our gradle scripts'
tags.set(['minecraftforge'])
}
changelog {
id = 'net.minecraftforge.changelog'
implementationClass = 'net.minecraftforge.gradleutils.changelog.ChangelogPlugin'
displayName = 'Git Changelog'
description = 'Creates a changelog text file based on git history'
tags.set(['git', 'changelog'])
}
}
}
jar {
archiveClassifier = 'thin'
}
tasks.named('shadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
enableRelocation true
archiveClassifier = null
relocationPrefix = 'net.minecraftforge.gradleutils.shadow'
}
changelog {
fromBase()
publishAll = false
}
publishing {
publications.register('pluginMaven', MavenPublication) {
changelog.publish(it)
pom {
artifactId = 'gradleutils'
name = 'Gradle Utils'
description = 'Used by MinecraftForge projects as a util library for Gradle buildscripts'
url = 'https://github.com/MinecraftForge/GradleUtils'
gradleutils.pom.setGitHubDetails(pom, 'GradleUtils')
license gradleutils.pom.licenses.LGPLv2_1
developers {
developer gradleutils.pom.Developers.LexManos
developer gradleutils.pom.Developers.SizableShrimp
developer gradleutils.pom.Developers.Paint_Ninja
}
}
}
repositories {
maven gradleutils.publishingForgeMaven
}
}