Skip to content

Commit

Permalink
Merge pull request #28 from SlimeVoid/MC1.7.2
Browse files Browse the repository at this point in the history
Mc1.7.2
  • Loading branch information
Tarig0 committed Jun 24, 2014
2 parents 1ff8f0d + ab83074 commit a6ba17f
Show file tree
Hide file tree
Showing 56 changed files with 4,183 additions and 3,695 deletions.
14 changes: 0 additions & 14 deletions .classpath

This file was deleted.

17 changes: 14 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/bin
/jars
/lib
# gradle stuff
build
.gradle
upload.bat

# eclipse stuff
.classpath
.project
.settings
eclipse
bin

# run configuration
run
27 changes: 0 additions & 27 deletions .project

This file was deleted.

281 changes: 0 additions & 281 deletions .settings/org.eclipse.jdt.core.prefs

This file was deleted.

3 changes: 0 additions & 3 deletions .settings/org.eclipse.jdt.ui.prefs

This file was deleted.

3 changes: 3 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off
call %CD%\setup.bat
call %CD%\gradlew.bat build
154 changes: 154 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
buildscript {
repositories {
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'
}
}

repositories {
maven {
name 'slimevoid'
url 'http://hyda.slimevoid.net/maven/repos'
}
}

apply plugin: 'maven'
apply plugin: 'forge'
apply plugin: 'eclipse'

def slimevoidVersion = '2.0.4.5'
def forge = '10.12.1.1060'
def mc = '1.7.2-' + forge
def pack = 'dynamictransport'
def github = 'DynamicTransport'
version = '0.1.0.2'
group = 'net.slimevoid'
archivesBaseName = 'DynamicTransport'

dependencies {
compile 'net.slimevoid:SlimevoidLibrary:' + slimevoidVersion + ':dev'
}

minecraft {
version = mc
assetDir = 'eclipse/assets'

replaceIn 'net/slimevoid/' + pack + '/core/lib/CoreLib.java'
replace '@VERSION@', project.version
replace 'MOD_DEPENDENCIES', 'BLANK_DEPENDENCIES'
replace 'ACTUAL_DEPENDENCIES ', 'MOD_DEPENDENCIES'
replace '@FORGEVERSION@', forge
replace '@SLIMEVERSION@', slimevoidVersion
}

processResources {
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'

// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
}

// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}

task sourceJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}

task deobfJar(type: Jar) {
from sourceSets.main.output
classifier = 'dev'
}

build.dependsOn sourceJar,deobfJar

configurations {
deployJars
}

dependencies {
deployJars 'org.apache.maven.wagon:wagon-ssh:2.2'
}

artifacts {
archives sourceJar
archives deobfJar
}

uploadArchives {
dependsOn 'reobf'
repositories.mavenDeployer {
configuration = configurations.deployJars
if (project.hasProperty("slimevoidUsername")) {
repository(url: 'scp://hyda.slimevoid.net/home/maven/www/repos') {
authentication(userName: slimevoidUsername, password: slimevoidPassword)
}
} else {
repository(url: 'file://localhost/' + project.file('build/repo').getAbsolutePath())
}
pom {
groupId = project.group
version = project.version
artifactId = project.archivesBaseName
}
pom.project {
name project.archivesBaseName
packaging 'jar'
description archivesBaseName
url 'https://github.com/Slimevoid/' + github

scm {
url 'https://github.com/Slimevoid/' + github
connection 'scm:git:git://github.com/Slimevoid/' + github + '.git'
developerConnection 'scm:git:git@Slimevoid/' + github + '.git'
}

issueManagement {
system 'github'
url 'https://github.com/Slimevoid/' + github + '/issues'
}

licenses {
license {
name 'Lesser General Public Licence'
url 'https://raw.github.com/Slimevoid/' + github + '/master/LICENSE'
distribution 'repo'
}
}

developers {
developer {
id 'Eurymachus'
name 'Eurymachus'
roles { role 'developer' }
}
developer {
id 'Slimevoid'
name 'Slimevoid Dev Team'
roles { role 'developer' }
}
developer {
id 'Tarig'
name 'Tarig0'
roles { role 'developer' }
}
}
}
}
}
144 changes: 72 additions & 72 deletions DynamicTransport.bat → files/DynamicTransport.bat
Original file line number Diff line number Diff line change
@@ -1,73 +1,73 @@
@echo off

set programdir=%CD%\..\..
set repodir=%programdir%\Git
set packagedir=%programdir%\Packages
set forgedir=%programdir%\Forge
set fmldir=%forgedir%\fml
set mcpdir=%forgedir%\mcp
set dynamictrans=%repodir%\DynamicTransport\src\main
set slimelib=%repodir%\SlimevoidLibrary\src\main\java
cd %mcpdir%

if not exist %slimelib% GOTO :DTFAIL
if exist %dynamictrans% GOTO :DYNAMICT
GOTO :DTFAIL

:DYNAMICT
if exist %mcpdir%\src GOTO :COPYSRC
GOTO :DTFAIL

:COPYSRC
if not exist "%mcpdir%\src-work" GOTO :CREATESRC
GOTO :DTFAIL

:CREATESRC
mkdir "%mcpdir%\src-work"
xcopy "%mcpdir%\src\*.*" "%mcpdir%\src-work\" /S
if exist "%mcpdir%\src-work" GOTO :COPYDT
GOTO :DTFAIL

:COPYDT
xcopy "%slimelib%\*.*" "%mcpdir%\src\minecraft\" /S
xcopy "%dynamictrans%\java\*.*" "%mcpdir%\src\minecraft\" /S
pause
call %mcpdir%\recompile.bat
call %mcpdir%\reobfuscate.bat
echo Recompile and Reobf Completed Successfully
pause

:REPACKAGE
if not exist "%mcpdir%\reobf" GOTO :DTFAIL
if exist "%packagedir%\DynamicTransport" (
del "%packagedir%\DynamicTransport\*.*" /S /Q
rmdir "%packagedir%\DynamicTransport" /S /Q
)
mkdir "%packagedir%\DynamicTransport\com\slimevoid\dynamictransport"
xcopy "%mcpdir%\reobf\minecraft\com\slimevoid\dynamictransport\*.*" "%packagedir%\DynamicTransport\com\slimevoid\dynamictransport\" /S
xcopy "%dynamictrans%\resources\*.*" "%packagedir%\DynamicTransport\" /S
echo "Dynamic Transport Packaged Successfully
pause
ren "%mcpdir%\src" src-old
echo Recompiled Source folder renamed
pause
ren "%mcpdir%\src-work" src
echo Original Source folder restored
pause
del "%mcpdir%\src-old" /S /Q
del "%mcpdir%\reobf" /S /Q
if exist "%mcpdir%\src-old" rmdir "%mcpdir%\src-old" /S /Q
if exist "%mcpdir%\reobf" rmdir "%mcpdir%\reobf" /S /Q
echo Folder structure reset
GOTO :DTCOMPLETE

:DTFAIL
echo Could not compile dynamictrans
GOTO :DTEND

:DTCOMPLETE
echo Dynamic Transport completed compile successfully
GOTO :DTEND

:DTEND
@echo off

set programdir=%CD%\..\..
set repodir=%programdir%\Git
set packagedir=%programdir%\Packages
set forgedir=%programdir%\Forge
set fmldir=%forgedir%\fml
set mcpdir=%forgedir%\mcp
set dynamictrans=%repodir%\DynamicTransport\src\main
set slimelib=%repodir%\SlimevoidLibrary\src\main\java
cd %mcpdir%

if not exist %slimelib% GOTO :DTFAIL
if exist %dynamictrans% GOTO :DYNAMICT
GOTO :DTFAIL

:DYNAMICT
if exist %mcpdir%\src GOTO :COPYSRC
GOTO :DTFAIL

:COPYSRC
if not exist "%mcpdir%\src-work" GOTO :CREATESRC
GOTO :DTFAIL

:CREATESRC
mkdir "%mcpdir%\src-work"
xcopy "%mcpdir%\src\*.*" "%mcpdir%\src-work\" /S
if exist "%mcpdir%\src-work" GOTO :COPYDT
GOTO :DTFAIL

:COPYDT
xcopy "%slimelib%\*.*" "%mcpdir%\src\minecraft\" /S
xcopy "%dynamictrans%\java\*.*" "%mcpdir%\src\minecraft\" /S
pause
call %mcpdir%\recompile.bat
call %mcpdir%\reobfuscate.bat
echo Recompile and Reobf Completed Successfully
pause

:REPACKAGE
if not exist "%mcpdir%\reobf" GOTO :DTFAIL
if exist "%packagedir%\DynamicTransport" (
del "%packagedir%\DynamicTransport\*.*" /S /Q
rmdir "%packagedir%\DynamicTransport" /S /Q
)
mkdir "%packagedir%\DynamicTransport\com\slimevoid\dynamictransport"
xcopy "%mcpdir%\reobf\minecraft\com\slimevoid\dynamictransport\*.*" "%packagedir%\DynamicTransport\com\slimevoid\dynamictransport\" /S
xcopy "%dynamictrans%\resources\*.*" "%packagedir%\DynamicTransport\" /S
echo "Dynamic Transport Packaged Successfully
pause
ren "%mcpdir%\src" src-old
echo Recompiled Source folder renamed
pause
ren "%mcpdir%\src-work" src
echo Original Source folder restored
pause
del "%mcpdir%\src-old" /S /Q
del "%mcpdir%\reobf" /S /Q
if exist "%mcpdir%\src-old" rmdir "%mcpdir%\src-old" /S /Q
if exist "%mcpdir%\reobf" rmdir "%mcpdir%\reobf" /S /Q
echo Folder structure reset
GOTO :DTCOMPLETE

:DTFAIL
echo Could not compile dynamictrans
GOTO :DTEND

:DTCOMPLETE
echo Dynamic Transport completed compile successfully
GOTO :DTEND

:DTEND
pause
Loading

0 comments on commit a6ba17f

Please sign in to comment.