Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.8.9 update and gradle tweaks #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
26 changes: 26 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# default
* text eol=auto

# git
.gitattributes text eol=lf
.gitignore text eol=lf

# sources
*.java text eol=lf

# resources
*.lang text eol=lf
*.cfg text eol=lf
*.info text eol=lf
*.mcmeta text eol=lf
*.md text eol=lf
*.xml text eol=lf

# scripts
*.bat text eol=crlf
*.gradle text eol=lf
*.properties text eol=lf

# binaries
*.png binary
*.jar binary
32 changes: 23 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
/.settings/
/bin/
/release/
/build/
/.gradle/
/run/
.project
.classpath
build.properties.old
## gradle
/.gradle
/build

## ForgeGradle
/run

## eclipse
/.settings
/.metadata
/.classpath
/.project
/bin

## intellij
/out
/.idea
/*.iml
/*.ipr
/*.iws

## custom
/release
78 changes: 39 additions & 39 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,44 +1,37 @@
buildscript {
repositories {
mavenCentral()
jcenter()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
name = 'forge'
url = 'http://files.minecraftforge.net/maven'
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
name = 'sonatype'
url = 'https://oss.sonatype.org/content/repositories/snapshots/'
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
classpath 'com.matthewprenger:CurseGradle:1.0-SNAPSHOT'
}
}

apply plugin: "forge"
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'com.matthewprenger.cursegradle'

compileJava.options.encoding = 'UTF-8'

// define the properties file
ext.configFile = file "build.properties"

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
}

group = config.group_name
version = config.mod_version
archivesBaseName = "[${config.minecraft_version}]${config.mod_id}"
group = project.group_name
version = project.mod_version
archivesBaseName = "[${project.minecraft_version}]${project.mod_id}"

minecraft {
version = config.minecraft_version + "-" + config.forge_version // grab latest forge
mappings = config.mappings_version
runDir = "run"
replace '@MOD_VERSION@', config.mod_version
replace '@MINECRAFT_VERSION@', config.minecraft_version
version = project.minecraft_version + '-' + project.forge_version // grab latest forge
mappings = project.mappings_version
runDir = 'run'
replace '@MOD_VERSION@', project.mod_version
replace '@MINECRAFT_VERSION@', project.minecraft_version
}

processResources {
Expand All @@ -49,9 +42,9 @@ processResources {

// replaces
expand ([
'mod_version': config.mod_version,
'forge_version': config.forge_version,
'minecraft_version': config.minecraft_version,
'mod_version': project.mod_version,
'forge_version': project.forge_version,
'minecraft_version': project.minecraft_version,
])
}

Expand All @@ -64,22 +57,29 @@ processResources {

// change the name of my obfuscated jar
jar {
appendix = config.appendix
appendix = project.appendix
}

// add a source jar
task sourceJar(type: Jar) {
from sourceSets.main.allSource
sourceJar {
appendix = 'src'
}

// because the normal output has been made to be obfuscated
task deobfJar(type: Jar) {
from sourceSets.main.output
appendix = 'deobf'
classifier = ''
}

artifacts {
archives sourceJar
archives deobfJar
}
}

if (project.hasProperty('api_key_curse') && project.hasProperty('extra_curse_id')) {
tasks.curseforge.dependsOn signJars
curseforge {
apiKey = project.api_key_curse

project {
id = project.extra_curse_id
changelog = ''
releaseType = project.hasProperty('extra_curse_releasetype') ? project.extra_curse_releasetype : 'release'

addArtifact sourceJar
}
}
}
7 changes: 0 additions & 7 deletions build.properties

This file was deleted.

10 changes: 10 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
minecraft_version=1.8.9
forge_version=11.15.0.1719
mappings_version=snapshot_20160125
mod_version=1.8.9.1
mod_id=bspkrsCore
group_name=bspkrscore
appendix=universal

# extra_curse_id=-1
# extra_curse_releasetype=release
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Jul 02 15:54:47 CDT 2014
#Tue Feb 02 17:03:16 CET 2016
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-2.9-bin.zip
10 changes: 3 additions & 7 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ case "`uname`" in
;;
esac

# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
Expand All @@ -61,9 +56,9 @@ while [ -h "$PRG" ] ; do
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >&-
cd "$SAVED" >/dev/null

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

Expand Down Expand Up @@ -114,6 +109,7 @@ fi
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`

# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
Expand Down
61 changes: 0 additions & 61 deletions src/main/java/bspkrs/bspkrscore/fml/BSCClientTicker.java

This file was deleted.

5 changes: 1 addition & 4 deletions src/main/java/bspkrs/bspkrscore/fml/ClientProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,5 @@ public class ClientProxy extends CommonProxy
{
@Override
protected void registerGameTickHandler()
{
if (BSCClientTicker.allowUpdateCheck)
new BSCClientTicker();
}
{}
}
81 changes: 0 additions & 81 deletions src/main/java/bspkrs/bspkrscore/fml/CommandBS.java

This file was deleted.

Loading