forked from MinecraftForge/GradleUtils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
136 lines (115 loc) · 3.61 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
132
133
134
135
136
import net.minecraftforge.gradleutils.ChangelogUtils
import net.minecraftforge.gradleutils.GradleUtils
import net.minecraftforge.gradleutils.tasks.ExtractTeamCityProjectConfigurationTask
import net.minecraftforge.gradleutils.tasks.GenerateChangelogTask
plugins {
id 'java-gradle-plugin'
id 'groovy'
id 'maven-publish'
id 'org.cadixdev.licenser' version '0.6.1'
}
ext {
GIT_INFO = GradleUtils.gitInfo(file('.'))
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}
}
group 'network.rs485.forge.gradleutils'
version GradleUtils.getTagOffsetVersion(GIT_INFO)
println('Version: ' + version)
repositories {
mavenCentral()
}
dependencies {
implementation 'org.eclipse.jgit:org.eclipse.jgit:5.10.0.202012080955-r'
}
task copyGradleUtilsGroovy(type: Copy) {
outputs.upToDateWhen { false }
into 'src/main/groovy'
from('buildSrc/src/main/groovy') {
include '**/*.groovy'
include '**/*.java'
}
}
task copyGradleUtilsResources(type: Copy) {
outputs.upToDateWhen { false }
into 'src/main/resources'
from('buildSrc/src/main/resources') {
include '**/*.zip'
}
}
compileGroovy.dependsOn(copyGradleUtilsResources)
checkLicenseMain.dependsOn(copyGradleUtilsResources)
compileGroovy.dependsOn(copyGradleUtilsGroovy)
checkLicenseMain.dependsOn(copyGradleUtilsGroovy)
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
license {
header = file('HEADER')
ext {
name = 'GradleUtils'
year = 2021
fullname = 'Forge Development LLC'
}
exclude '**/*.properties'
}
gradlePlugin {
plugins {
gradleutils {
id = 'network.rs485.forge.gradleutils'
implementationClass = 'net.minecraftforge.gradleutils.GradleUtilsPlugin'
}
}
}
ChangelogUtils.setupChangelogGenerationFromTag(project, '1.0')
publishing {
publications {
pluginMaven(MavenPublication) { mavenPublication ->
artifact sourcesJar
ChangelogUtils.setupChangelogGenerationForPublishing(project, mavenPublication)
pom {
name = 'Gradle Utils'
description = 'Used by MinecraftForge projects as a util library for Gradle buildscripts'
url = 'https://github.com/MinecraftForge/GradleUtils'
scm {
url = 'https://github.com/MinecraftForge/GradleUtils'
connection = 'scm:git:git://github.com/MinecraftForge/GradleUtils.git'
developerConnection = 'scm:git:[email protected]:MinecraftForge/GradleUtils.git'
}
issueManagement {
system = 'github'
url = 'https://github.com/MinecraftForge/GradleUtils/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'
}
developer {
id = 'SizableShrimp'
name = 'SizableShrimp'
}
}
}
}
}
repositories {
maven GradleUtils.getPublishingForgeMaven(project)
}
}
task setupTeamCityProject(type: ExtractTeamCityProjectConfigurationTask) {
}
GradleUtils.setupCITasks(project);