chiuki / gce2retrofit

Google Cloud Endpoint (GCE) to Retrofit
Apache License 2.0
100 stars 14 forks source link

Ignore .DS_store files on Mac #10

Closed ZakTaccardi closed 9 years ago

ZakTaccardi commented 9 years ago
Execution failed for task ':app:gce2retrofit-debug'.
> java.io.FileNotFoundException: /Users/zak/dev/git/SeabeeMobile-android/app/src/main/gce2retrofit/.DS_Store/discovery.json (Not a directory)

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

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:gce2retrofit-debug'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
        at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
        at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:310)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
        at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
Caused by: org.gradle.api.UncheckedIOException: java.io.FileNotFoundException: /Users/zak/dev/git/SeabeeMobile-android/app/src/main/gce2retrofit/.DS_Store/discovery.json (Not a directory)
        at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:43)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:78)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:243)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:219)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.execute(AnnotationProcessingTaskFactory.java:230)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:208)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
        ... 14 more
Caused by: java.io.FileNotFoundException: /Users/zak/dev/git/SeabeeMobile-android/app/src/main/gce2retrofit/.DS_Store/discovery.json (Not a directory)
        at com.sqisland.gce2retrofit.GradleTask.execute(GradleTask.groovy:31)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
        ... 20 more
ZakTaccardi commented 9 years ago

manually deleting the .DS_Store file works for a little, but the damn file regenerates itself.

chiuki commented 9 years ago

Thanks for the bug report! Looks like I need to skip .DS_Store when I list the directories under src/main/gce2retrofit. I guess I should just ignore all directories starting with a .? https://github.com/chiuki/gce2retrofit/blob/master/gce2retrofit/src/main/groovy/com/sqisland/gce2retrofit/GradleTask.groovy#L29

ZakTaccardi commented 9 years ago

Sounds like a great solution to me!