forked from cpw/inventorysorter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
165 lines (145 loc) · 4.72 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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
buildscript {
repositories {
jcenter()
mavenCentral()
maven {
name = 'forge'
url = 'http://files.minecraftforge.net/maven'
}
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
}
}
plugins {
id 'com.matthewprenger.cursegradle' version '1.4.0'
id 'se.bjurr.gitchangelog.git-changelog-gradle-plugin' version '1.64'
id 'org.ajoberstar.reckon' version '0.11.0'
id 'org.ajoberstar.grgit' version '3.1.1'
id 'com.github.ben-manes.versions' version '0.25.0'
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'idea'
apply plugin: 'maven-publish'
group= 'cpw.mods'
archivesBaseName = 'inventorysorter'
reckon {
scopeFromProp()
stageFromProp('ms', 'final')
}
minecraft {
mappings channel: MCP_CHANNEL, version: MCP_MAPPINGS
runs {
client {
workingDirectory project.file('run')
// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
// Recommended logging level for the console
property 'forge.logging.console.level', 'info'
property 'forge.logging.noansi', 'false'
ideaModule "${project.name}.main"
}
server {
workingDirectory project.file('run')
// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'
// Recommended logging level for the console
property 'forge.logging.console.level', 'info'
property 'forge.logging.noansi', 'false'
ideaModule "${project.name}.main"
}
data {
workingDirectory project.file('run')
property 'forge.logging.markers', 'SCAN'
property 'forge.logging.console.level', 'debug'
property 'forge.logging.noansi', 'false'
ideaModule "${project.name}.main"
}
}
}
repositories {
maven {
// location of the maven that hosts JEI files
name = "Progwml6 maven"
url = "https://dvs1.progwml6.com/files/maven/"
}
maven {
// location of a maven mirror for JEI files, as a fallback
name = "ModMaven"
url = "https://modmaven.k-4u.nl"
}
}
dependencies {
minecraft "net.minecraftforge:forge:${MC_VERSION}-${FORGE_VERSION}"
compileOnly fg.deobf("mezz.jei:jei-${MC_VERSION}:${JEI_VERSION}:api")
runtimeOnly fg.deobf("mezz.jei:jei-${MC_VERSION}:${JEI_VERSION}")
}
task makeChangelog(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) {
file = file('CHANGELOG.md')
untaggedName = "Current release ${version}"
fromRef = project.findProperty('changelogStart') ?: '13.0'
templateContent = """
# Inventory sorter changelog history
## Version ${version} for Minecraft ${MC_VERSION}
{{#tags}}
* {{name}}
{{#commits}}
* {{{messageTitle}}}
{{/commits}}
{{/tags}}
"""
}
curseforge {
apiKey = project.hasProperty('curseforge_apikey') ? project.curseforge_apikey : '0'
project {
id = '240633'
changelog = file('CHANGELOG.md')
changelogType = 'markdown'
releaseType = project.findProperty('releaseType') ?: 'alpha'
}
options {
javaVersionAutoDetect = true // defaults to true
javaIntegration = true // defaults to true
forgeGradleIntegration = true // defaults to true
}
}
afterEvaluate {
tasks.curseforge240633.dependsOn.remove(reobfJar)
tasks.curseforge240633.dependsOn.remove(jar)
tasks.curseforge240633.dependsOn.add(makeChangelog)
}
jar {
manifest {
attributes([
"Specification-Title": 'inventorysorter',
"Specification-Vendor": 'cpwmods',
"Specification-Version": '1', // We are version 1 of ourselves
"Implementation-Title": project.name,
"Implementation-Version": "${version}",
"Implementation-Vendor" :'cpwmods',
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
appendix MC_VERSION
}
def reobfFile = file("$buildDir/reobfJar/output.jar")
def reobfArtifact = artifacts.add('default', reobfFile) {
type 'jar'
builtBy 'reobfJar'
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact reobfArtifact
}
}
repositories {
maven {
credentials {
username project.properties.cpwMavenUser?:'spam'
password project.properties.cpwMavenPassword?:'bums'
}
url 'http://files.minecraftforge.net/maven/manage/upload'
}
}
}