FG2 MDK is not functional because it seems to be trying to patch??? #235

Closed
cpw opened this Issue Aug 15, 2015 · 2 comments

Projects

None yet

2 participants

@cpw
Member
cpw commented Aug 15, 2015

Output from my testing env.

./gradlew setupDecompWorkspace
Assuming custom forge version!
****************************
 Powered By MCP:             
 http://modcoderpack.com/    
 Searge, ProfMobius, Fesh0r, 
 R4wk, ZeuX, IngisKahn, bspkrs
 MCP Data version : 9.10
****************************
:deobfCompileDummyTask
:deobfProvidedDummyTask
:getVersionJson
:extractUserdev
:extractMcpData SKIPPED
:extractMcpMappings
Download http://files.minecraftforge.net/maven/de/oceanlabs/mcp/mcp_snapshot/20141130-1.8/mcp_snapshot-20141130-1.8.zip
:genSrgs
:downloadClient SKIPPED
:downloadServer SKIPPED
:splitServerJar SKIPPED
:mergeJars SKIPPED
:deobfMcSRG
Applying SpecialSource...
Applying Exceptor...
:getFernFlower SKIPPED
:decompileMc
:fixMcSources
:applySourcePatches
Patching failed: src-base/minecraft/net/minecraft/block/Block.java Cannot find hunk target
  1: Cannot find hunk target @ 0
  2: Cannot find hunk target @ 0
  3: Cannot find hunk target @ 0
  4: Cannot find hunk target @ 0
  5: Cannot find hunk target @ 0
  6: Cannot find hunk target @ 0
  7: Cannot find hunk target @ 0
  8: Cannot find hunk target @ 0
  9: Cannot find hunk target @ 0
  10: Cannot find hunk target @ 0
  11: Cannot find hunk target @ 0
  12: Cannot find hunk target @ 0
  13: Cannot find hunk target @ 0
  13/13 failed
----------------------------------------------------------------------
--------*snip*: all the hunks failed ---------------------------------
----------------------------------------------------------------------
Patching failed: src-base/minecraft/net/minecraftforge/fml/relauncher/Side.java Cannot find hunk target
  1: Cannot find hunk target @ 0
  1/1 failed
Patching failed: src-base/minecraft/net/minecraftforge/fml/relauncher/SideOnly.java Cannot find hunk target
  1: Cannot find hunk target @ 0
  2: Cannot find hunk target @ 0
  2/2 failed
:applySourcePatches FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':applySourcePatches'.
> com.cloudbees.diff.PatchException: Cannot find hunk target

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 2 mins 31.09 secs

The build.gradle (same as MDK but including repository for local FG2 Forge):


// For those who want the bleeding edge
buildscript {
    repositories {
        jcenter()
        maven {
            name = "forge"
            url = "file:///home/cpw/projects/MC/MinecraftForge/repo"
        }
    }
}
//apply plugin: 'net.minecraftforge.gradle.forge'

// for people who want stable
plugins {
    id "net.minecraftforge.gradle.forge" version "2.0.0"
}

version = "1.0"
group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "modid"
repositories {
jcenter()
maven {
    name = "forge"
    url = "file:///home/cpw/projects/MC/MinecraftForge/repo"
}
}

minecraft {
    version = "1.8-11.14.3.0-fg2"
    runDir = "eclipse"

    // the mappings can be changed at any time, and must be in the following format.
    // snapshot_YYYYMMDD   snapshot are built nightly.
    // stable_#            stables are built at the discretion of the MCP team.
    // Use non-default mappings at your own risk. they may not allways work.
    // simply re-run your setup task after changing the mappings to update your workspace.
    mappings = "snapshot_20141130"
}

dependencies {
    // you may put jars on which you depend on in ./libs
    // or you may define them like so..
    //compile "some.group:artifact:version:classifier"
    //compile "some.group:artifact:version"

    // real examples
    //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev'  // adds buildcraft to the dev env
    //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env

    // the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
    //provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'

    // the deobf configurations:  'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
    // except that these dependencies get remapped to your current MCP mappings
    //deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
    //deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'

    // for more info...
    // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
    // http://www.gradle.org/docs/current/userguide/dependency_management.html

}

processResources
{
    // this will ensure that this task is redone when the versions change.
    inputs.property "version", project.version
    inputs.property "mcversion", project.minecraft.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
    }

    // copy everything else, thats not the mcmod.info
    from(sourceSets.main.resources.srcDirs) {
        exclude 'mcmod.info'
    }
}
@cpw cpw added a commit to MinecraftForge/MinecraftForge that referenced this issue Aug 15, 2015
@cpw cpw Fix packaging the gradle wrapper properly. There is still a problem with
the MDK- it fails to run setupDecompWorkspace.

Filed an issue at ForgeGradle, since this seems to be something FG2 shouldn't
be doing, but is?

MinecraftForge/ForgeGradle#235
7e600c0
@cpw
Member
cpw commented Aug 21, 2015

ea2380e fixed this issue..

@cpw cpw closed this Aug 21, 2015
@AbrarSyed
Member

ah, thanks for testing that for me.. hadnt gotten a chance to yet :)

@AbrarSyed AbrarSyed added a commit that referenced this issue Feb 29, 2016
@AbrarSyed AbrarSyed temporary hack for #235 7f19173
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment