Jump to content

Recommended Posts

Posted

Today, I can't build with "gradlew build". Here's the console output:

 

D:\minecraft\forge-1.7.2-10.12.2.1121-src>gradlew build --stacktrace

FAILURE: Build failed with an exception.

* Where:
Build file 'D:\minecraft\forge-1.7.2-10.12.2.1121-src\build.gradle' line: 18

* What went wrong:
A problem occurred evaluating root project 'forge-1.7.2-10.12.2.1121-src'.
> java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line
1 column 1

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

* Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating root project
'forge-1.7.2-10.12.2.1121-src'.
        at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptR
unnerImpl.run(DefaultScriptRunnerFactory.java:54)
        at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.
apply(DefaultScriptPluginFactory.java:152)
        at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildSc
riptProcessor.java:40)
        at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildSc
riptProcessor.java:26)
        at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.eva
luate(ConfigureActionsProjectEvaluator.java:34)
        at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(L
ifecycleProjectEvaluator.java:55)
        at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProj
ect.java:493)
        at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProj
ect.java:80)
        at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuil
dConfigurer.java:31)
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(Default
GradleLauncher.java:142)
        at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradle
Launcher.java:113)
        at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLaun
cher.java:81)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildCon
troller.run(InProcessBuildActionExecuter.java:64)
        at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.jav
a:33)
        at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.jav
a:24)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce
ssBuildActionExecuter.java:35)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce
ssBuildActionExecuter.java:26)
        at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
        at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.jav
a:171)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.
execute(CommandLineActionFactory.java:201)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.
execute(CommandLineActionFactory.java:174)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(
CommandLineActionFactory.java:170)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(
CommandLineActionFactory.java:139)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionRep
ortingAction.java:33)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionRep
ortingAction.java:22)
        at org.gradle.launcher.Main.doAction(Main.java:46)
        at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
        at org.gradle.launcher.Main.main(Main.java:37)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBoots
trap.java:50)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.j
ava:32)
        at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
        at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.ja
va:30)
        at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:55)
Caused by: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException:
Expected BEGIN_OBJECT but was STRING at line 1 column 1
        at com.google.gson.Gson.fromJson(Gson.java:815)
        at com.google.gson.Gson.fromJson(Gson.java:768)
        at com.google.gson.Gson.fromJson(Gson.java:717)
        at net.minecraftforge.gradle.common.BasePlugin.setVersionInfoJson(BasePl
ugin.java:170)
        at net.minecraftforge.gradle.common.BasePlugin.apply(BasePlugin.java:112
)
        at net.minecraftforge.gradle.common.BasePlugin.apply(BasePlugin.java:49)

        at org.gradle.api.internal.plugins.DefaultPluginContainer.providePlugin(
DefaultPluginContainer.java:104)
        at org.gradle.api.internal.plugins.DefaultPluginContainer.addPluginInter
nal(DefaultPluginContainer.java:68)
        at org.gradle.api.internal.plugins.DefaultPluginContainer.apply(DefaultP
luginContainer.java:34)
        at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.appl
yPlugin(DefaultObjectConfigurationAction.java:116)
        at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.acce
ss$200(DefaultObjectConfigurationAction.java:36)
        at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$3.ru
n(DefaultObjectConfigurationAction.java:85)
        at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.exec
ute(DefaultObjectConfigurationAction.java:129)
        at org.gradle.api.internal.project.AbstractPluginAware.apply(AbstractPlu
ginAware.java:41)
        at org.gradle.api.Project$apply.call(Unknown Source)
        at org.gradle.api.internal.project.ProjectScript.apply(ProjectScript.gro
ovy:34)
        at org.gradle.api.Script$apply.callCurrent(Unknown Source)
        at build_3jp9jdnktsp47fkn257mc3k0gq.run(D:\minecraft\forge-1.7.2-10.12.2
.1121-src\build.gradle:18)
        at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptR
unnerImpl.run(DefaultScriptRunnerFactory.java:52)
        ... 33 more
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING
at line 1 column 1
        at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:374)
        at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapT
ypeAdapterFactory.java:183)
        at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapT
ypeAdapterFactory.java:145)
        at com.google.gson.Gson.fromJson(Gson.java:803)
        ... 51 more


BUILD FAILED

Total time: 4.493 secs

 

And here's my build.gradle:

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 = "For-1.7.2"
group= "org.ssast.minecraft" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "ssastServerMod"

minecraft {
    version = "1.7.2-10.12.2.1121"
    assetDir = "eclipse/assets"
}

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

    // 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'
    }
}

 

Line 18: apply plugin: 'forge'

 

Edit:

Well, it works now.

Author of Tao Land Mod.

width=200 height=69http://taoland.herbix.me/images/1/14/TaoLandLogo.png[/img]

Also, author of RenderTo

----

I'm not an English native speaker. I just try my best.

Posted

I see the fact that you said it works now, but may I suggest you stop coding on 1.7.2 and update to the latest 1.7.10 forge.

 

I have updated them to 1.8. But my server is still on 1.7.2. That's the only reason I coding on 1.7.2 and I would update my server then.

Thanks for your suggestion after all.

Author of Tao Land Mod.

width=200 height=69http://taoland.herbix.me/images/1/14/TaoLandLogo.png[/img]

Also, author of RenderTo

----

I'm not an English native speaker. I just try my best.

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.