###前提・実現したいこと
MinecraftのModを開発しています。
環境
Java 1.8
Gradle 2.14
IntelliJ IDEA Community 2017.2.5
Minecraft Forge 1.12-14.21.1.2426
###発生している問題・エラーメッセージ
Gradleを利用しているのですが、特定のライブラリを依存関係から外したいのですがやり方が分かりません。
具体的にはIntelliJ IDEAのプロジェクトビューのExternal LibrariesからforgeSrcを外したいです。
###該当のソースコード
build.gradleは下記の状態です。
Gradle
1buildscript { 2 repositories { 3 jcenter() 4 maven { url = "http://files.minecraftforge.net/maven" } 5 } 6 dependencies { 7 classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' 8 } 9} 10apply plugin: 'java' 11apply plugin: 'net.minecraftforge.gradle.forge' 12//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. 13 14 15version = "1.0" 16group = "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html 17archivesBaseName = "modid" 18 19sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. 20compileJava { 21 sourceCompatibility = targetCompatibility = '1.8' 22} 23 24minecraft { 25 version = "1.12-14.21.1.2426" 26 runDir = "run" 27 28 // the mappings can be changed at any time, and must be in the following format. 29 // snapshot_YYYYMMDD snapshot are built nightly. 30 // stable_# stables are built at the discretion of the MCP team. 31 // Use non-default mappings at your own risk. they may not always work. 32 // simply re-run your setup task after changing the mappings to update your workspace. 33 mappings = "snapshot_20170624" 34 // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. 35} 36 37dependencies { 38 // you may put jars on which you depend on in ./libs 39 // or you may define them like so.. 40 //compile "some.group:artifact:version:classifier" 41 //compile "some.group:artifact:version" 42 43 // real examples 44 //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env 45 //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env 46 47 // the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime. 48 //provided 'com.mod-buildcraft:buildcraft:6.0.8:dev' 49 50 // the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided, 51 // except that these dependencies get remapped to your current MCP mappings 52 //deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev' 53 //deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev' 54 55 // for more info... 56 // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html 57 // http://www.gradle.org/docs/current/userguide/dependency_management.html 58 59 compile 'org.javassist:javassist:3.18.+' 60 61} 62 63processResources { 64 // this will ensure that this task is redone when the versions change. 65 inputs.property "version", project.version 66 inputs.property "mcversion", project.minecraft.version 67 68 // replace stuff in mcmod.info, nothing else 69 from(sourceSets.main.resources.srcDirs) { 70 include 'mcmod.info' 71 72 // replace version and mcversion 73 expand 'version':project.version, 'mcversion':project.minecraft.version 74 } 75 76 // copy everything else except the mcmod.info 77 from(sourceSets.main.resources.srcDirs) { 78 exclude 'mcmod.info' 79 } 80}
###試したこと
Gradleへの知識が浅くどこから手を付けてよいかも分からず、「gradle 依存関係 削除」と言ったキーワードで調べてみた程度です。
大変心苦しいのですが回答してもらえれば幸いです。
よろしくお願いします。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2017/11/11 00:46