PokeGOAPI-Java icon indicating copy to clipboard operation
PokeGOAPI-Java copied to clipboard

[QUESTION] How to build "PokeGOAPI-library-all-0.X.X.jar" in Windows 10 OS ?

Open Tommy-Emmanuel opened this issue 8 years ago • 1 comments

Description: Build "PokeGOAPI-library-all-0.X.X.jar" fail when I build source in Windows 10 OS Appear error "The filename or extension is too long"

Steps to reproduce:

  1. Clone the repo and cd into the folder
  2. git submodule update --init
  3. gradlew :library:build

Expected behavior: Have the api jar in library/build/libs/PokeGOAPI-library-all-0.X.X.jar

Actual behavior: Build fail, appear error "The filename or extension is too long"

Stacktrace (If it's a crash): gradlew :library:build Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details You are using Gradle 3.0: This version of the protobuf plugin works with Gradle version 2.12+ The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead. :library:extractIncludeProto :library:extractProto UP-TO-DATE :library:generateProto FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':library:generateProto'.

java.io.IOException: Cannot run program "C:\Users\USER.gradle\caches\modules-2\files-2.1\com.google.protobuf\protoc\3.0.0-beta-3\71e76cad4f9b30aab172c44035d343c5bab47815\protoc-3.0.0-beta-3-windows-x86_64.exe": CreateProcess error=206, The filename or extension is too long

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

Version: 0.79.4

Tommy-Emmanuel avatar Nov 16 '17 13:11 Tommy-Emmanuel

Related to https://github.com/google/protobuf-gradle-plugin/pull/174. This happens due to the command line length limit on Windows, and how protobuf passes all proto locations through in one call.

Gegy avatar Nov 16 '17 13:11 Gegy