Jump to content

Recommended Posts

Posted

Hi, I'm really new to this modding thing, just spent the last 15 days coding and texturing my mod and now for some reason I'm not able to build it (Whenever I find a way to build it, it shows no textures or models) Here's my error and my build file, is there anything else I should post? Let me know, thanks!

 

Error:

 

C:\Users\Victor\Desktop\TheMod\AurorasBloom>gradlew build--debug

 

FAILURE: Build failed with an exception.

 

* Where:

Build file 'C:\Users\Victor\Desktop\TheMod\AurorasBloom\build.gradle' line: 43

 

* What went wrong:

A problem occurred evaluating root project 'AurorasBloom'.

> Cannot convert URL 'C:Users.Victor.Desktop.TheMod.AurorasBloom.src.main.resour

ces' to a file.

 

* 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: 6.173 secs

 

 

Build File:

 

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'

    }

}

 

apply plugin: 'forge'

 

version = "1.0"

group= "Ygniculus.AurorasBloom"

archivesBaseName = "ab"

 

sourceSets {

    main {

java { srcDirs = ["C:Users.Victor.Desktop.TheMod.AurorasBloom.src.main.resources] }

resources { srcDirs = ["C:Users.Victor.Desktop.TheMod.AurorasBloom.src.main.resources"] }

    }

}

 

minecraft {

    version = "1.8-11.14.3.1450"

    runDir = "eclipse"

}

 

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'

    }

}

 

 

I really wish I could get this to work, it was alot, ALOT of time spent =/ Thanks in advance, I've been searching the answer on the foruns for the past 4h and can't get it to work, sorry if I did anything wrong.

Posted

Don't use absolute paths in your build.gradle script (C:/Users/.../src/main/java), use relative paths (src/main/java). This way other people will be able to download your code from a site like GitHub and compile it themselves without having to put it in a specific location.

 

Anyway, you don't need to explicitly set the Java and resources paths if you're using the default ones (src/main/java and src/main/resources), you can delete the

sourceSets

block.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.