forked from MinecraftForge/CoreMods
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
147 lines (129 loc) · 4.27 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
137
138
139
140
141
142
143
144
145
146
147
plugins {
id 'org.ajoberstar.reckon' version '0.11.0'
id 'org.ajoberstar.grgit' version '3.1.1'
id "com.github.ben-manes.versions" version '0.21.0'
}
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'java-library'
apply plugin: 'eclipse'
apply plugin: 'jacoco'
group 'net.minecraftforge'
sourceCompatibility = 1.8
targetCompatibility = 1.8
jacoco {
toolVersion = "0.8.2"
}
reckon {
scopeFromProp()
stageFromProp('milestone', 'rc', 'final')
}
reckonTagCreate.dependsOn check
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')
}
}
}
}
test {
useJUnitPlatform()
}
repositories {
mavenCentral()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
}
sourceSets {
testJars
}
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter-api:5.5.+")
testImplementation("org.powermock:powermock-core:2.0.+")
testImplementation("org.hamcrest:hamcrest-core:2.1")
testImplementation("org.apache.logging.log4j:log4j-core:2.11.2")
testRuntime("org.junit.jupiter:junit-jupiter-engine:5.5.+")
testRuntime(sourceSets.testJars.output)
implementation("cpw.mods:modlauncher:3.0.+")
implementation("org.apache.logging.log4j:log4j-api:2.11.+")
implementation("org.ow2.asm:asm:6.2")
implementation("org.ow2.asm:asm-commons:6.2")
implementation("org.ow2.asm:asm-tree:6.2")
implementation("net.minecraftforge:forgespi:0.13.+")
implementation("com.google.code.findbugs:jsr305:3.0.2")
}
ext.sharedManifest = manifest {
attributes(["Specification-Title": "coremods",
"Specification-Vendor": "Forge",
"Specification-Version": "1", // Currently version 1 of the coremod specification
"Implementation-Title": project.name,
"Implementation-Version": "${version}+${System.getenv("BUILD_NUMBER")?:0}+${grgit.head().abbreviatedId}",
"Implementation-Vendor" :"Forge",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"Git-Commit": grgit.head().abbreviatedId,
"Git-Branch": grgit.branch.current().getName() ],
"net/minecraftforge/coremod/")
}
jar {
manifest = project.manifest {
from sharedManifest
}
}
task sourcesJar(type: Jar) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives jar
archives sourcesJar
}
publishing {
publications {
mavenJava(MavenPublication) {
pom {
from components.java
artifact sourcesJar
name = 'Core Mods'
description = 'Core modding framework for use with forge'
url = 'https://github.com/MinecraftForge/coremods'
scm {
url = 'https://github.com/MinecraftForge/coremods'
connection = 'scm:git:git://github.com/MinecraftForge/coremods.git'
developerConnection = 'scm:git:[email protected]:MinecraftForge/coremods.git'
}
issueManagement {
system = 'github'
url = 'https://github.com/MinecraftForge/coremods/issues'
}
licenses {
license {
name = 'LGPLv2.1'
url = 'https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt'
}
}
developers {
developer {
id = 'cpw'
name = 'cpw'
}
}
}
}
}
repositories {
maven {
credentials {
username project.properties.forgeMavenUser?:'fake'
password project.properties.forgeMavenPassword?:'news'
}
url "http://files.minecraftforge.net/maven/manage/upload"
}
}
}