From 1da67a0dc669bb3751db069b2964c3b4d1d95e73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Sat, 6 Sep 2014 17:06:31 +0200 Subject: [PATCH] Build script cleanup and improvements. --- README.md | 10 +++++----- build.gradle | 19 ++++++++++++++----- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 8929e22d1..7e1335aa5 100644 --- a/README.md +++ b/README.md @@ -45,14 +45,14 @@ repositories { maven { url = "http://maven.cil.li/" } } dependencies { - compile group: 'li.cil.oc', name: 'OpenComputers', version: 'MC1.6.4-1.3.3.554', classifier: 'api' + compile "li.cil.oc:OpenComputers:MC1.6.4-1.3.+:api" } ``` Adjust the version number accordingly to the version you'd like to build against. -To run the mod in your development environment, download the [`deobf` JAR from the build server][deobf-jar] and drop it into your dev env's `eclipse/mods` folder. +To run the mod in your development environment, download the [`dev` JAR from the build server][dev-jar] and drop it into your dev env's `eclipse/mods` folder. -Alternatively, leave out the `api` classifier and you can build against the deobf JAR directly. This way you don't have to add it to your mods folder, but you will have to add `-Dfml.coreMods.load=li.cil.oc.common.launch.TransformerLoader` to the VM options in your run configuration. +Alternatively, leave out the `api` classifier and you can build against the dev JAR directly. This way you don't have to add it to your mods folder, but you will have to add `-Dfml.coreMods.load=li.cil.oc.common.launch.TransformerLoader` to the VM options in your run configuration. If you have any questions, please do not hesitate to ask, either in the [forums][] or in the [IRC][irc]! @@ -69,13 +69,13 @@ to setup the workspace, including assets and such, then `gradlew idea` to create an IntellJ IDEA project. -Open the project and you will be asked to import the Gradle project (check your Event Log if you missed the pop-up). Do so. This will configure additionally referenced libraries - at this point CodeChickenLib and ForgeMultipart. Since CCL adn such will download stuff again and you'll get conflicts otherwise, go into the project settings and mark CCL, FMP and NEI if you have it in your mods folder as "provided" (instead of the default, "compile"). +Open the project and you will be asked to *import the Gradle project* (check your Event Log if you missed the pop-up). **Do so**. This will configure additionally referenced libraries. [api]: https://github.com/MightyPirates/OpenComputers/tree/master/src/main/java/li/cil/oc/api [code conventions]: https://github.com/MightyPirates/OpenComputers/wiki/CodeConventions -[deobf-jar]: http://oc.cil.li/index.php?/page/latest.php?type=deobf +[dev-jar]: http://oc.cil.li/index.php?/page/latest.php?type=dev [forums]: http://oc.cil.li/ [irc]: http://webchat.esper.net/?channels=#oc [issues]: https://github.com/MightyPirates/OpenComputers/issues?state=open diff --git a/build.gradle b/build.gradle index 21668cd5d..84c985536 100644 --- a/build.gradle +++ b/build.gradle @@ -45,13 +45,22 @@ repositories { } } -dependencies { - compile "codechicken:CodeChickenLib:${config.minecraft.version}-${config.ccl.version}:dev" - compile "codechicken:ForgeMultipart:${config.minecraft.version}-${config.fmp.version}:dev" - compile "codechicken:NotEnoughItems:${config.minecraft.version}-${config.nei.version}:dev" - compile "codechicken:WR-CBE:${config.minecraft.version}-${config.wrcbe.version}:dev" +// From http://stackoverflow.com/questions/10405970/how-do-i-define-a-compile-time-only-classpath-in-gradle +configurations { + provided } +dependencies { + provided "codechicken:CodeChickenLib:${config.minecraft.version}-${config.ccl.version}:dev" + provided "codechicken:ForgeMultipart:${config.minecraft.version}-${config.fmp.version}:dev" + provided "codechicken:NotEnoughItems:${config.minecraft.version}-${config.nei.version}:dev" + provided "codechicken:WR-CBE:${config.minecraft.version}-${config.wrcbe.version}:dev" +} + +sourceSets.main.compileClasspath += configurations.provided +idea.module.scopes.PROVIDED.plus += configurations.provided +eclipse.classpath.plusConfigurations += configurations.provided + minecraft { version = "${config.minecraft.version}-${config.forge.version}"