Skip to content
This repository has been archived by the owner on Jul 1, 2018. It is now read-only.

Commit

Permalink
Clean Gradle, bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
SquidDev committed Feb 28, 2015
1 parent c47b367 commit 61dd42a
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 41 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[*.properties]
insert_final_newline = false
11 changes: 7 additions & 4 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ Miscellaneous things for ComputerCraft
- Whitelist globals (get the `debug` API).
- Blacklist turtle verbs - no more `turtle.inspect` if you don't like it.
- Change computer timeout
- Refuel using Redstone Flux
- Computer upgrades
- Refuel using Redstone Flux
- Computer upgrades - normal to advanced!
- Debug Wand - add the debug API to any computer
- LuaJC compiler - 2-5x performance increase

## Setting up
- Add ComputerCraft 1.65 `libs/`.
- Follow instructions on [the Forge repo](https://github.com/MinecraftForge/MinecraftForge) or just run: `./gradlew setupDecompWorkspace setupDevWorkspace`
- Add ComputerCraft 1.73 `libs/`.
- Follow instructions on [the Forge repo](https://github.com/MinecraftForge/MinecraftForge) or just run:
`./gradlew setupDecompWorkspace setupDevWorkspace`
27 changes: 20 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,26 @@ buildscript {

apply plugin: 'forge'

version = "0.1.2"
// Load the config file
ext.configFile = file "build.properties"
configFile.withReader {
// Load config. It shall from now be referenced as simply config or project.config
def prop = new Properties()
prop.load(it)
project.ext.config = new ConfigSlurper().parse prop
}

group = "squiddev.cctweaks"
archivesBaseName = "CCTweaks"
version = config.mc_version + "-" + config.mod_version


minecraft {
version = "1.7.10-10.13.2.1291"
version = config.mc_version + "-" + config.forge_version
runDir = "eclipse"

replace '${mod_version}', config.mod_version
replace '${mc_version}', config.mc_version
}

jar {
Expand All @@ -34,21 +47,21 @@ jar {
}

dependencies {
compile files('libs/ComputerCraft-1.73.jar')
compile files('libs/ComputerCraft-${config.cc_version}.jar')
}

processResources
{
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
inputs.property "mod_version", config.mod_version
inputs.property "mc_version", config.mc_version

// 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
// Replace mod_version and mc_version
expand 'mod_version': config.mod_version, 'mc_version': config.mc_version
}

// copy everything else, thats not the mcmod.info
Expand Down
4 changes: 4 additions & 0 deletions build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
mc_version=1.7.10
forge_version=10.13.2.1291
cc_version=1.73
mod_version=0.1.3
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import java.util.Map;

@IFMLLoadingPlugin.TransformerExclusions("squiddev.cctweaks.core.asm.")
@IFMLLoadingPlugin.MCVersion("1.7.10")
@IFMLLoadingPlugin.MCVersion("${mc_version}")
public class TweaksLoadingPlugin implements IFMLLoadingPlugin {
@Override
public String[] getASMTransformerClass() {
Expand Down Expand Up @@ -41,11 +41,10 @@ public static class CCTweaksDummyMod extends DummyModContainer {
public CCTweaksDummyMod() {
super(new ModMetadata());
ModMetadata md = getMetadata();
md.autogenerated = true;
md.name = md.modId = "<CCTweaks ASM>";
md.authorList = Arrays.asList("SquidDev");
md.modId = "<CCTweaks ASM>";
md.name = md.description = "CCTweaks ASM Transformer";
md.version = "0.1.1";
md.description = "CCTweaks ASM Transformer. Refer to the main CCTweaks mod for info.";
md.version = "${mod_version}";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
public final class ModInfo {
public static final String ID = "CCTweaks";
public static final String NAME = ID;
public static final String VERSION = "${version}";
public static final String VERSION = "${mod_version}";
public static final String RESOURCE_DOMAIN = ID.toLowerCase();
public static final String PROXY_CLIENT = "squiddev.cctweaks.client.ProxyClient";
public static final String PROXY_SERVER = "squiddev.cctweaks.core.proxy.ProxyServer";
Expand Down
16 changes: 0 additions & 16 deletions src/main/java/squiddev/cctweaks/core/utils/KeyboardUtils.java

This file was deleted.

13 changes: 5 additions & 8 deletions src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@
"modid": "CCTweaks",
"name": "CCTweaks",
"description": "Random tweaks to Computer Craft",
"version": "${version}",
"mcversion": "${mcversion}",
"url": "",
"updateUrl": "",
"authors": [
"version": "${mod_version}",
"mcversion": "${mc_version}",
"url": "https://github.com/SquidDev-CC/CC-Tweaks",
"credits": "Dan200, Forge team",
"authorList": [
"SquidDev"
],
"credits": "Dan200, Forge team",
"logoFile": "",
"screenshots": [],
"dependencies": [
"ComputerCraft"
]
Expand Down

0 comments on commit 61dd42a

Please sign in to comment.