Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
184 changes: 111 additions & 73 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,100 +1,138 @@
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
// maven {
// url "https://www.cursemaven.com"
// }
jcenter()
mavenCentral()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}

}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:3.+'
}
}
// this adds support for grabbing bspkrscore from curse
plugins {
id "com.wynprice.cursemaven" version "2.1.1"
}

apply plugin: 'net.minecraftforge.gradle'
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
apply plugin: 'eclipse'
apply plugin: 'maven-publish'

apply plugin: "forge"
version = '1.12.2.a01'
group = 'floatingruins' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = '[1.12.2]FloatingRuins'

// define the properties file
ext.configFile = file "build.properties"
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.

configFile.withReader {
// read config. it shall from now on be referenced as simply config or as project.config
def prop = new Properties()
prop.load(it)
project.ext.config = new ConfigSlurper().parse prop
}
// TODO: this does not work. will need to add deobf to ivy repo, or convert to github call. currently have to manually add bspkrsCore as dep
//repositories {
// ivy {
// url "http://bspk.rs/MC"
// layout "pattern", {
// artifact "[module]/deobf/%5B1.12.2%5D[module]-deobf-[revision].[ext]"
// artifact "[module]/deobf/[1.12.2][module]-deobf-[revision].[ext]"
// }
// }
//}

minecraft {
// The mappings can be changed at any time, and must be in the following format.
// snapshot_YYYYMMDD Snapshot are built nightly.
// stable_# Stables are built at the discretion of the MCP team.
// Use non-default mappings at your own risk. they may not always work.
// Simply re-run your setup task after changing the mappings to update your workspace.
//mappings channel: 'snapshot', version: '20171003-1.12'
mappings channel: 'snapshot', version: '20171003-1.12'

repositories {
ivy {
url "http://bspk.rs/MC"
layout "pattern", {
artifact "[module]/deobf/%5B${config.minecraft_version}%5D[module]-deobf-[revision].[ext]"
artifact "[module]/deobf/[${config.minecraft_version}][module]-deobf-[revision].[ext]"
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.

// accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')

// Default run configurations.
// These can be tweaked, removed, or duplicated as needed.
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', 'debug'
}

server {

// 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', 'debug'
}
}
}

dependencies {
compile name: 'bspkrsCore', version: "${config.bscore_version}", ext: 'jar'
}
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
// that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
minecraft 'net.minecraftforge:forge:1.12.2-14.23.5.2854'

group = config.group_name
version = "${config.minecraft_version}.${config.mod_version}"
archivesBaseName = "[${config.minecraft_version}]${config.mod_id}"
// You may put jars on which you depend on in ./libs or you may define them like so..
// compile "some.group:artifact:version:classifier"
// compile "some.group:artifact:version"

minecraft {
version = config.minecraft_version + "-" + config.forge_version // grab latest forge
mappings = config.mappings_version
runDir = "run"
replace '@MOD_VERSION@', "${config.minecraft_version}.${config.mod_version}"
replace '@BSCORE_VERSION@', config.bscore_version
}
// Real examples
// compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
// compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
compile "curse.maven:bspkrscore-59218:2996325"

// The 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
// provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'

processResources {
// replace stuff in the files we want.
from(sourceSets.main.resources.srcDirs) {
include '**/*.info'
include '**/*.properties'

// replaces
expand ([
'mod_version': version,
'bscore_version': config.bscore_version,
'bscore_jar': "[${config.minecraft_version}]bspkrsCore-universal-${config.bscore_version}.jar",
'pattern': "\\\\[.+?\\\\](\\\\w+).*?([\\\\d\\\\.]+)[-\\\\w]*\\\\.[^\\\\d]+",
'forge_version': config.forge_version,
'minecraft_version': config.minecraft_version
])
}
// These dependencies get remapped to your current MCP mappings
// deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev'

// For more info...
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
// http://www.gradle.org/docs/current/userguide/dependency_management.html

// copy everything else, thats we didnt do before
from(sourceSets.main.resources.srcDirs) {
exclude '**/*.info'
exclude '**/*.properties'
}
}

// change the name of my obfuscated jar
// Example for how to get properties into the manifest for reading by the runtime..
jar {
appendix = config.appendix
manifest {
attributes([
"Specification-Title": "examplemod",
"Specification-Vendor": "examplemodsareus",
"Specification-Version": "1", // We are version 1 of ourselves
"Implementation-Title": project.name,
"Implementation-Version": "${version}",
"Implementation-Vendor" :"examplemodsareus",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}

// add a source jar
task sourceJar(type: Jar) {
from sourceSets.main.allSource
appendix = 'src'
}
// Example configuration to allow publishing using the maven-publish task
// This is the preferred method to reobfuscate your jar file
jar.finalizedBy('reobfJar')
// However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing
//publish.dependsOn('reobfJar')

// because the normal output has been made to be obfuscated
task deobfJar(type: Jar) {
from sourceSets.main.output
appendix = 'deobf'
publishing {
publications {
mavenJava(MavenPublication) {
artifact jar
}
}
repositories {
maven {
url "file:///${project.projectDir}/mcmodsrepo"
}
}
}

artifacts {
archives sourceJar
archives deobfJar
}
8 changes: 0 additions & 8 deletions build.properties

This file was deleted.

6 changes: 4 additions & 2 deletions change.log
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
1.12.2 - Mar-2021
- 1.12.2 update
1.8.r01 - 06-Mar-2015
- 1.8 update
- removed retry attempts code (had potential to cause differing generation with the same seed on different world saves)
Expand Down Expand Up @@ -112,7 +114,7 @@
- updated for 1.3.1
- added version checking
1.2.5.d - 20-May-2012
- added code to reset the seed of the Random object passed in by ModLoader since it can't be guaranteed that another mod has not ed with it (I'm looking at YOU Better Dungeons...)
- added code to reset the seed of the Random object passed in by ModLoader since it can't be guaranteed that another mod has not ­ed with it (I'm looking at YOU Better Dungeons...)
1.2.3.c - 08-Mar-2012
- new config option for island radius variation
- changed the dungeon frame blocks from bricks to stone bricks (I likes them better)
Expand All @@ -121,4 +123,4 @@
- support for Jungle biome
- support for y>127
1.2.3.a - 05-Mar-2012
- initial 1.2.3 update
- initial 1.2.3 update
4 changes: 4 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
# This is required to provide enough memory for the Minecraft decompilation process.
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Wed Jul 02 15:54:47 CDT 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip
78 changes: 43 additions & 35 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading