GRADLEW ne fonctionne plus



  • Salut !

    Ce soir je ressaye tranquillement de faire un petit gradlew build d'un de mes projets et ça ne fonctionne pas… La même chose pour tous mes autres projets et même des gradlew setupDecompWorkspace, je ne comprends pas pourquoi ça ne fonctionne plus, des idées ?

    Merci d'avance

    :::
    D:\DossierBenjamin\InstallationsNouveauPC\Code\AltisCraft.fr\Client>gradlew build --stacktrace

    FAILURE: Build failed with an exception.

    • Where:
      Build file 'D:\DossierBenjamin\InstallationsNouveauPC\Code\AltisCraft.fr\Client\build.gradle' line: 19

    • What went wrong:
      A problem occurred evaluating root project 'Client'.

    com.google.gson.stream.MalformedJsonException: Unterminated string at line 31122 column 23

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

    • Exception is:
      org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'Client'.
      at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:54)
      at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:187)
      at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:39)
      at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:26)
      at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:34)
      at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:55)
      at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:470)
      at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:79)
      at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:31)
      at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:128)
      at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:105)
      at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:85)
      at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:81)
      at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
      at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
      at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:39)
      at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:29)
      at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
      at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
      at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
      at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
      at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
      at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
      at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
      at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
      at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
      at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
      at org.gradle.launcher.Main.doAction(Main.java:33)
      at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
      at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
      at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
      at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
      at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
      at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
      at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:56)
      Caused by: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated string at line 31122 column 23
      at com.google.gson.Gson.fromJson(Gson.java:818)
      at com.google.gson.Gson.fromJson(Gson.java:768)
      at com.google.gson.Gson.fromJson(Gson.java:717)
      at com.google.gson.Gson.fromJson(Gson.java:689)
      at net.minecraftforge.gradle.user.patch.UserPatchBasePlugin.setVersionInfoJson(UserPatchBasePlugin.java:145)
      at net.minecraftforge.gradle.user.patch.UserPatchBasePlugin.applyPlugin(UserPatchBasePlugin.java:46)
      at net.minecraftforge.gradle.common.BasePlugin.apply(BasePlugin.java:154)
      at net.minecraftforge.gradle.common.BasePlugin.apply(BasePlugin.java:49)
      at org.gradle.api.internal.plugins.DefaultPluginContainer.providePlugin(DefaultPluginContainer.java:110)
      at org.gradle.api.internal.plugins.DefaultPluginContainer.addPluginInternal(DefaultPluginContainer.java:69)
      at org.gradle.api.internal.plugins.DefaultPluginContainer.apply(DefaultPluginContainer.java:35)
      at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.applyPlugin(DefaultObjectConfigurationAction.java:117)
      at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.access$200(DefaultObjectConfigurationAction.java:36)
      at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$3.run(DefaultObjectConfigurationAction.java:85)
      at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.execute(DefaultObjectConfigurationAction.java:130)
      at org.gradle.api.internal.project.AbstractPluginAware.apply(AbstractPluginAware.java:41)
      at org.gradle.api.Project$apply$0.call(Unknown Source)
      at org.gradle.api.internal.project.ProjectScript.apply(ProjectScript.groovy:34)
      at org.gradle.api.Script$apply$0.callCurrent(Unknown Source)
      at build_rvln4g4qh2udqv7psq1ui511g.run(D:\DossierBenjamin\InstallationsNouveauPC\Code\AltisCraft.fr\Client\build.gradle:19)
      at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:52)
      ... 34 more
      Caused by: com.google.gson.stream.MalformedJsonException: Unterminated string at line 31122 column 23
      at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1505)
      at com.google.gson.stream.JsonReader.skipQuotedValue(JsonReader.java:1100)
      at com.google.gson.stream.JsonReader.skipValue(JsonReader.java:1229)
      at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:170)
      at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
      at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:187)
      at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145)
      at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
      at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172)
      at com.google.gson.Gson.fromJson(Gson.java:803)
      ... 54 more

    BUILD FAILED

    Total time: 6.123 secs
    :::

    Ligne du gradlew.build: apply plugin: 'forge'


  • Administrateurs

    Salut,
    Apparemment il y a un json mal formé, par contre impossible de savoir lequel.
    Sûrement un problème du côté de forge, faudrait essayer à nouveau plus tard.



  • Ca fonctionne pour un projet 1.10, tu penses que ça pourrai venir des données sur mon pc et non quelque chose en ligne ? 😕



  • Bonsoir !

    Normalement ce n'est pas apply plugin: 'forge', mais apply plugin: 'net.minecraftforge.gradle.forge'. Enfin, c'est ce que j'ai de mon côté et cela marche. 🙂


  • Administrateurs

    Ah oui bien vu, apply plugin:'forge' c'est pour la 1.8 et +.



  • J'ai retéléchargé le src par défaut de forge et la ligne était bien comme la mienne et quand je change j'ai ça:

    C:\Users\Asus\Desktop\f>gradlew setupDecompWorkspace

    FAILURE: Build failed with an exception.

    • Where:
      Build file 'C:\Users\Asus\Desktop\f\build.gradle' line: 18

    • What went wrong:
      A problem occurred evaluating root project 'f'.

    Plugin with id 'net.minecraftforge.gradle.forge' not found.

    • 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: 3.467 secs


  • Administrateurs

    Envoies ton fichier build.gradle



  • Même en recréant un workspace de base ça ne fonctionne pas (fichier gradlew par défaut):

    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= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
    archivesBaseName = "modid"

    minecraft {
    version = "1.7.10-10.13.4.1558-1.7.10"
    runDir = "eclipse"
    }

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


  • Administrateurs

    Je viens de faire un setup sans soucis sur mon pc. (version 10.13.4.1614 par contre).



  • 😕 Ok merci de ton aide je vais chercher de mon côté


  • Administrateurs

    Salut, d'après les logs que tu as fourni le json qui pose problème se trouve être appelé ici



  • Mhh merci mais ça signifirait quoi ? ^^

    EDIT: Je n'ai rien fait et problème résolu…