This repository was archived by the owner on Nov 10, 2024. It is now read-only.
forked from MinecraftForge/SrgUtils
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
129 lines (114 loc) · 3.53 KB
/
build.gradle
File metadata and controls
129 lines (114 loc) · 3.53 KB
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
buildscript {
repositories {
mavenLocal()
maven {
url = 'https://maven.minecraftforge.net/'
}
mavenCentral()
}
}
plugins {
id 'java'
id 'eclipse'
id 'maven-publish'
id 'org.cadixdev.licenser' version '0.6.1'
id 'net.minecraftforge.gradleutils' version '1.+'
id 'com.github.ben-manes.versions' version '0.39.0'
}
group 'net.minecraftforge'
// version = gradleutils.getTagOffsetVersion()
version = '0.4.11-SNAPSHOT'
// java.toolchain.languageVersion = JavaLanguageVersion.of(8)
ext {
CHANGELOG = rootProject.file('build/changelog.txt')
}
repositories {
mavenLocal()
maven { url = 'https://maven.minecraftforge.net/' }
mavenCentral()
}
test {
useJUnitPlatform()
}
license {
header = file('LICENSE-header.txt')
ext {
project = 'SRG Utils'
}
}
dependencies {
testImplementation('org.junit.jupiter:junit-jupiter:5.8.2')
testImplementation('org.junit.jupiter:junit-jupiter-engine:5.8.2')
testImplementation('org.powermock:powermock-core:2.0.9')
compileOnly('com.google.code.findbugs:jsr305:3.0.2')
}
task sourcesJar(type: Jar) {
archiveClassifier.set('sources')
from sourceSets.main.allSource
}
artifacts {
archives jar
archives sourcesJar
}
publishing {
publications {
mavenJava(MavenPublication) {
if (CHANGELOG.exists()) {
artifact(CHANGELOG) {
classifier = 'changelog'
}
}
artifact jar
artifact sourcesJar
pom {
name = 'SRG Utils'
description = 'Library for managing java obfuscation mappings in various formats.'
url = 'https://github.com/MinecraftForge/SrgUtils'
scm {
url = 'https://github.com/MinecraftForge/SrgUtils'
connection = 'scm:git:git://github.com/MinecraftForge/SrgUtils.git'
developerConnection = 'scm:git:git@github.com:MinecraftForge/SrgUtils.git'
}
issueManagement {
system = 'github'
url = 'https://github.com/MinecraftForge/SrgUtils/issues'
}
licenses {
license {
name = 'LGPLv2.1'
url = 'https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt'
}
}
developers {
developer {
id = 'LexManos'
name = 'LexManos'
}
}
}
}
}
repositories {
maven({ MavenArtifactRepository repository ->
if (((String) project.version).contains("SNAPSHOT")) {
repository.url = System.getenv("NEXUS_URL_SNAPSHOT")
} else {
repository.url = System.getenv("NEXUS_URL_RELEASE")
}
repository.credentials.username = System.getenv("NEXUS_USERNAME")
repository.credentials.password = System.getenv("NEXUS_PASSWORD")
})
}
}
dependencyUpdates.resolutionStrategy {
componentSelection { rules ->
rules.all { ComponentSelection selection ->
boolean rejected = ['alpha', 'beta', 'rc', 'cr', 'm', 'preview'].any { qualifier ->
selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/
}
if (rejected) {
selection.reject('Release candidate')
}
}
}
}