-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathbuild.gradle
87 lines (71 loc) · 2.02 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
import net.minecraftforge.gradleutils.PomUtils
plugins {
id 'java'
id 'eclipse'
id 'maven-publish'
id 'org.cadixdev.licenser' version '0.6.1'
id 'net.minecraftforge.gradleutils' version '[2.3,2.4)'
id 'com.github.ben-manes.versions' version '0.50.0'
}
group 'net.minecraftforge'
version = gradleutils.getTagOffsetVersion()
println "Version: $version"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}
withSourcesJar()
}
repositories {
mavenLocal()
maven gradleutils.forgeMaven
mavenCentral()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.1'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.10.1'
testImplementation 'org.powermock:powermock-core:2.0.9'
compileOnly 'com.google.code.findbugs:jsr305:3.0.2'
}
test {
useJUnitPlatform()
}
changelog {
from '0.4'
}
license {
header = file('LICENSE-header.txt')
newLine = false
exclude '**/*.properties'
}
publishing {
publications.register('mavenJava', MavenPublication) {
from components.java
artifactId = 'srgutils'
pom {
name = 'SRG Utils'
description = 'Library for managing java obfuscation mappings in various formats.'
url = 'https://github.com/MinecraftForge/SrgUtils'
PomUtils.setGitHubDetails(pom, 'SrgUtils')
license PomUtils.Licenses.LGPLv2_1
developers {
developer PomUtils.Developers.LexManos
}
}
}
repositories {
maven gradleutils.getPublishingForgeMaven()
}
}
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')
}
}
}
}