Jump to content

[1.8.9] Problem building with API


TehStoneMan

Recommended Posts

I am trying to update one of my mods to 1.8.9, and part of the update includes an API that wasn't present in previous builds, but it keeps failing with a package not found error.

 

Error log:

This set of MCP mappings was designed for MC 1.8.8. Use at your own peril.
#################################################
         ForgeGradle 2.1-SNAPSHOT-75bb646
  https://github.com/MinecraftForge/ForgeGradle
#################################################
               Powered by MCP unknown
             http://modcoderpack.com
         by: Searge, ProfMobius, Fesh0r,
         R4wk, ZeuX, IngisKahn, bspkrs
#################################################
:deobfCompileDummyTask
:deobfProvidedDummyTask
:sourceApiJava UP-TO-DATE
:compileApiJava
C:\Minecraft Dev\CashCraft\build\sources\api\java\io\github\tehstoneman\cashcraft\api\IEcomomy.java:3: error: package io.github.tehstoneman.cashcraft.economy does not exist
import io.github.tehstoneman.cashcraft.economy.PlayerWallet;
                                              ^
C:\Minecraft Dev\CashCraft\build\sources\api\java\io\github\tehstoneman\cashcraft\api\IEcomomy.java:31: error: cannot find symbol
        public PlayerWallet getWallet( EntityPlayer player );
               ^
  symbol:   class PlayerWallet
  location: interface IEcomomy
2 errors
:compileApiJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileApiJava'.
> Compilation failed; see the compiler error output for details.

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

 

It seems that for some reason, during the build process, it copies the API source files into the build folder, but not the rest of the source.

 

build.gradle:

buildscript
{
    repositories
    {
        jcenter()
        maven
        {
            name = "forge"
            url = "http://files.minecraftforge.net/maven"
		//url "https://plugins.gradle.org/m2"
        }
    }
    dependencies
    {
        classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
    }
}

apply plugin: "net.minecraftforge.gradle.forge"

archivesBaseName = "CashCraft"
group = "io.github.tehstoneman.cashcraft" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
version = "mc1.8.9-2.0.0"

// java version
sourceCompatibility = 1.7
targetCompatibility = 1.7

minecraft
{
    version = "1.8.9-11.15.1.1722"
if( file('../run').exists() )
{
	runDir = "../run/assets"
}
else
{
	runDir = "assets"
}

mappings = "stable_20"
}

sourceSets
{
    main
    {
        //java { srcDirs = ["src/main/java","src/api/java"] }
        java
        {
        	srcDir "src/main/java"
        }
        resources
        {
        	srcDir "src/main/resources"
        }
    }
    api
    {
        java
        {
        	srcDir "src/api/java"
        }
    }
}

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'
        exclude '*.xcf'
        exclude '*.wav'
    }
}

 

Can anybody help?

Link to comment
Share on other sites

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.