Skip to content

Commit 8f869a5

Browse files
committed
Merge branch 'master-1.11.2' of https://github.com/MinecraftModDevelopmentMods/OreSpawn into master-1.11.2
2 parents 9d4c568 + 008b033 commit 8f869a5

File tree

71 files changed

+3566
-1203
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+3566
-1203
lines changed

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
language: java
2+
sudo: false
23
cache:
34
directories:
45
- $HOME/.gradle
56
notifications:
67
email: false
78
jdk:
89
- oraclejdk8
9-
install: ./gradlew setupCIWorkspace -S
10-
script: ./gradlew build -S
1110
before_install:
1211
- chmod a+x gradlew
12+
install: ./gradlew setupCIWorkspace -S
13+
script: ./gradlew clean build -S

CHANGELOG.txt

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,18 @@
1-
Updated for latest Forge RB
1+
#Version 3.1.0:
2+
Minor Version number bumped because of major internal changes
3+
New Annotation-based plugin system
4+
New API for new plugin system
5+
Update JSON config format to version 1.1 to allow for new feature
6+
Implement BiomeDictionary support
7+
Implement Whitelisting and Blacklisting support for Biomes
8+
Ensure that resources stored in JAR's can be copied out to the config directory for loading and parsing
9+
Add the ability to specify parameters for the default feature generator to the addore command
10+
11+
#Version 3.0.0:
12+
Ported to 1.11.2
13+
Complete rewrite of internals for better stability
14+
Change of JSON config format (See Wiki for details!)
15+
Added ability to specify different types of ore generation
16+
Added ability to specify what block gets replaced
17+
Able to Import both OreSpawn 1 and OreSpawn 2 format config files
18+
Added an operator (permission level 4) command to force-dump current configuration

build.gradle

Lines changed: 135 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,44 @@
1+
def corePlugin = ''
2+
13
buildscript {
24
repositories {
35
jcenter()
46
maven {
5-
name = "forge"
6-
url = "http://files.minecraftforge.net/maven"
7+
name = 'forge'
8+
url = 'http://files.minecraftforge.net/maven'
9+
}
10+
maven {
11+
name = 'gradle'
12+
url 'https://plugins.gradle.org/m2/'
713
}
814
maven {
9-
name = "sonatype"
10-
url = "https://oss.sonatype.org/content/groups/public"
15+
name = 'sonatype'
16+
url = 'https://oss.sonatype.org/content/groups/public'
1117
}
1218
}
1319
dependencies {
14-
classpath "net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT"
15-
classpath "com.matthewprenger:CurseGradle:1.0-SNAPSHOT"
20+
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
21+
classpath 'gradle.plugin.com.matthewprenger:CurseGradle:1.0.9'
22+
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.5'
1623
}
1724
}
1825

19-
apply plugin: "net.minecraftforge.gradle.forge"
20-
apply plugin: "com.matthewprenger.cursegradle"
21-
apply plugin: "maven-publish"
26+
apply plugin: 'net.minecraftforge.gradle.forge'
27+
apply plugin: 'com.matthewprenger.cursegradle'
28+
apply plugin: 'maven-publish'
29+
apply plugin: 'org.sonarqube'
2230

2331
javadoc {
2432
failOnError = false
2533
}
2634

35+
description = 'OreSpawn'
2736
def mod_file = getModFile()
28-
def mc_version = "1.10.2"
37+
def mc_version = "1.11.2"
2938
def short_version = getVersion("VERSION", mod_file)
3039
version = mc_version + "-" + short_version
3140
if (System.getenv().BUILD_NUMBER) {
32-
version += "." + System.getenv().BUILD_NUMBER
41+
version += '.' + System.getenv().BUILD_NUMBER
3342
}
3443
group = "com.mcmoddev"
3544
archivesBaseName = "OreSpawn"
@@ -39,7 +48,7 @@ class Secrets {
3948
def data = null
4049

4150
def getProperty(String key) {
42-
return data ? data[key] : ""
51+
return data ? data[key] : ''
4352
}
4453
}
4554

@@ -49,7 +58,7 @@ def secretFile
4958
if (System.getenv().SECRET_FILE) {
5059
secretFile = file System.getenv().SECRET_FILE
5160
} else {
52-
secretFile = file "secret.json"
61+
secretFile = file 'secret.json'
5362
}
5463

5564
project.ext.secret = new Secrets()
@@ -60,37 +69,65 @@ if (secretFile.exists()) {
6069
}
6170

6271
minecraft {
63-
version = "1.10.2-12.18.3.2185"
72+
version = "1.11.2-13.20.0.2228"
6473
runDir = "run"
65-
mappings = "stable_29"
74+
mappings = "stable_32"
6675
// coreMod = ""
6776
makeObfSourceJar = false
6877
}
6978

7079
repositories {
71-
maven {
72-
name "DVS1 Maven FS"
73-
url "http://dvs1.progwml6.com/files/maven"
80+
maven { // Mantle, TCon, JEI
81+
name 'DVS1 Maven FS'
82+
url 'http://dvs1.progwml6.com/files/maven'
7483
}
75-
maven {
76-
name "Chickenbones Repo"
77-
url "http://chickenbones.net/maven/"
84+
maven { // CCL, CCC, NEI
85+
name 'Chickenbones Repo'
86+
url 'http://chickenbones.net/maven/'
7887
}
79-
maven {
80-
name "tterrag"
81-
url "http://maven.tterrag.com/"
88+
maven { // The One Probe
89+
name 'tterrag'
90+
url 'http://maven.tterrag.com/'
8291
}
8392
maven {
84-
name "MMD"
85-
url "https://maven.mcmoddev.com/"
93+
name 'MMD'
94+
url 'https://maven.mcmoddev.com/'
8695
}
87-
maven {
88-
name "amadornes"
89-
url "http://maven.amadornes.com/"
96+
maven { // MCMultipart
97+
name 'amadornes'
98+
url 'http://maven.amadornes.com/'
9099
}
91-
maven {
92-
name "epoxide"
93-
url "http://maven.epoxide.xyz"
100+
maven { // Tesla
101+
name 'epoxide'
102+
url 'http://maven.epoxide.org'
103+
}
104+
maven { // CraftTweaker, ZenScript
105+
name 'jared maven'
106+
url 'http://blamejared.com/maven'
107+
}
108+
maven { // IC2
109+
name 'industrialcraft'
110+
url 'http://maven.ic2.player.to'
111+
}
112+
maven { // WAILA/HWYLA
113+
name 'tehnut'
114+
url 'http://tehnut.info/maven'
115+
}
116+
maven { // CoFH
117+
name 'Covers Maven'
118+
url 'http://maven.covers1624.net'
119+
}
120+
maven {
121+
name = 'CurseForge'
122+
url = 'https://minecraft.curseforge.com/api/maven/'
123+
}
124+
maven {
125+
name 'opencomputers'
126+
url 'http://maven.cil.li/'
127+
}
128+
maven { // Mekanism, TAIGA
129+
name 'jitpack'
130+
url 'https://jitpack.io'
94131
}
95132
}
96133

@@ -99,53 +136,59 @@ dependencies {
99136
}
100137

101138
processResources {
102-
inputs.property "version", project.version
103-
inputs.property "mcversion", project.minecraft.version
139+
inputs.property 'version', project.version
140+
inputs.property 'mcversion', project.minecraft.version
104141

105142
from (sourceSets.main.resources.srcDirs) {
106-
include "mcmod.info"
107-
expand "version": short_version
143+
include 'mcmod.info'
144+
expand 'version': short_version, 'mcversion': project.minecraft.version
108145
}
109146

110147
from (sourceSets.main.resources.srcDirs) {
111-
exclude "mcmod.info"
148+
exclude 'mcmod.info'
112149
}
113150
}
114151

115152
jar {
116153
manifest {
117-
// attributes("FMLCorePluginContainsFMLMod": "true", "FMLCorePlugin": "")
154+
// attributes 'FMLCorePluginContainsFMLMod': 'true'
155+
// attributes 'FMLCorePlugin': corePlugin
156+
// attributes 'FMLAT' : ''
118157
}
119158
}
120159

121160
task apiJar(type: Jar, dependsOn: classes) {
122-
classifier = "api"
161+
classifier = 'api'
123162
from sourceSets.main.allSource
124-
exclude("mmd/orespawn/impl/**")
125-
exclude("mmd/orespawn/json/**")
126-
exclude("mmd/orespawn/world/**")
127-
exclude("mmd/orespawn/*.java")
163+
exclude('com/mcmoddev/orespawn/impl/**')
164+
exclude('com/mcmoddev/orespawn/impl/features/**')
165+
exclude('com/mcmoddev/orespawn/json/**')
166+
exclude('com/mcmoddev/orespawn/world/**')
167+
exclude('com/mcmoddev/orespawn/commands/**')
168+
exclude('com/mcmoddev/orespawn/data/**')
169+
exclude('com/mcmoddev/orespawn/*.java')
128170
}
129171

130172
task devJar(type: Jar) {
131-
classifier = "dev"
173+
classifier = 'dev'
132174
from sourceSets.main.output
133175
}
134176

135-
task sourcesJar(type: Jar, dependsOn: classes) {
136-
classifier = "sources"
137-
from sourceSets.main.allSource
177+
task deobfJar(type: Jar) {
178+
classifier = 'deobf'
179+
from sourceSets.main.output
138180
}
139181

140182
task javadocJar(type: Jar, dependsOn: javadoc) {
141-
classifier = "javadoc"
142-
from javadoc.destinationDir
183+
classifier = 'javadoc'
184+
from javadoc.getDestinationDir()
143185
}
144186

145187
artifacts {
146188
archives apiJar
147189
archives devJar
148-
archives sourcesJar
190+
archives deobfJar
191+
archives sourceJar
149192
archives javadocJar
150193
}
151194

@@ -156,17 +199,20 @@ publishing {
156199
artifactId project.archivesBaseName
157200
version project.version
158201
from components.java
159-
artifact sourcesJar {
160-
classifier "sources"
202+
artifact sourceJar {
203+
classifier 'sources'
161204
}
162205
artifact apiJar {
163-
classifier "api"
206+
classifier 'api'
164207
}
165208
artifact devJar {
166-
classifier "dev"
209+
classifier 'dev'
210+
}
211+
artifact deobfJar {
212+
classifier 'deobf'
167213
}
168214
artifact javadocJar {
169-
classifier "javadoc"
215+
classifier 'javadoc'
170216
}
171217
}
172218
}
@@ -187,65 +233,63 @@ curseforge {
187233
id = "245586"
188234
changelog = file("CHANGELOG.txt")
189235
releaseType = "alpha"
190-
addGameVersion("1.10.2")
236+
addGameVersion("1.11")
191237
def projName = "OreSpawn"
192238
def displayVersion = getVersion("VERSION", mod_file)
193239
if (System.getenv().BUILD_NUMBER) {
194-
displayVersion += "." + System.getenv().BUILD_NUMBER
240+
displayVersion += '.' + System.getenv().BUILD_NUMBER
195241
}
196242
mainArtifact(jar) {
197-
displayName = "$projName $displayVersion"
198-
// relations {
199-
// }
243+
displayName = "$project.description $displayVersion"
244+
// relations {
245+
// }
200246
}
201247
addArtifact(apiJar) {
202-
displayName = "$projName $displayVersion API"
248+
displayName = "$project.description $displayVersion API"
203249
}
204-
addArtifact(sourcesJar) {
205-
displayName = "$projName $displayVersion Sources"
250+
addArtifact(sourceJar) {
251+
displayName = "$project.description $displayVersion Sources"
206252
}
207-
addArtifact(devJar) {
208-
displayName = "$projName $displayVersion Development"
253+
addArtifact(deobfJar) {
254+
displayName = "$project.description $displayVersion Development"
209255
}
210256
addArtifact(javadocJar) {
211-
displayName = "$projName $displayVersion Javadoc"
257+
displayName = "$project.description $displayVersion Javadoc"
212258
}
213259
}
214260
}
215261

216-
String getModFile() {
217-
String path = "";
218-
FileTree tree = fileTree(dir: "src/main/java")
219-
tree.include "**/*.java"
220-
tree.visit { element ->
221-
if (element.file.isFile()) {
222-
element.file.eachLine { String s ->
223-
s = s.trim();
224-
if (s.startsWith("@Mod")) {
225-
path = "src/main/java/$element.relativePath"
226-
}
227-
}
228-
}
262+
sonarqube {
263+
properties {
264+
property 'sonar.host.url', secret.sonarHost
265+
property 'sonar.organization', secret.sonarOrganization
266+
property 'sonar.login', secret.sonarToken
267+
property 'sonar.projectName', project.archivesBaseName
268+
property 'sonar.projectKey', "$project.group:$project.archivesBaseName"
229269
}
230-
return path;
270+
}
271+
272+
String getModFile() {
273+
String path = 'src/main/java/com/mcmoddev/orespawn/data/Constants.java'
274+
return path
231275
}
232276

233277
String getVersion(String type, String mod_file) {
234-
String major = "0";
235-
String revision = "0";
236-
String patch = "0";
237-
String prefix = "public static final String $type = \"";
278+
String major = '0'
279+
String revision = '0'
280+
String patch = '0'
281+
String prefix = "public static final String $type = \""
238282
File file = file(mod_file)
239283
file.eachLine { String s ->
240-
s = s.trim();
284+
s = s.trim()
241285
if (s.startsWith(prefix)) {
242-
s = s.substring(prefix.length(), s.length() - 2);
243-
String[] pts = s.split("\\.");
286+
s = s.substring(prefix.length(), s.length() - 2)
287+
String[] pts = s.split("\\.")
244288

245-
major = pts[0];
246-
revision = pts[1];
247-
patch = pts[2];
289+
major = pts[0]
290+
revision = pts[1]
291+
patch = pts[2]
248292
}
249293
}
250-
return "$major.$revision.$patch";
294+
return "$major.$revision.$patch"
251295
}

0 commit comments

Comments
 (0)