{"action":"created","issue":{"url":"https://api.github.com/repos/brunobowden/j2objc-gradle/issues/16","labels_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/issues/16/comments","events_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/issues/16/events","html_url":"https://github.com/brunobowden/j2objc-gradle/issues/16","id":63530627,"number":16,"title":"j2objcTranslate Task caches old files","user":{"login":"confile","id":64265,"avatar_url":"https://avatars.githubusercontent.com/u/64265?v=3","gravatar_id":"","url":"https://api.github.com/users/confile","html_url":"https://github.com/confile","followers_url":"https://api.github.com/users/confile/followers","following_url":"https://api.github.com/users/confile/following{/other_user}","gists_url":"https://api.github.com/users/confile/gists{/gist_id}","starred_url":"https://api.github.com/users/confile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/confile/subscriptions","organizations_url":"https://api.github.com/users/confile/orgs","repos_url":"https://api.github.com/users/confile/repos","events_url":"https://api.github.com/users/confile/events{/privacy}","received_events_url":"https://api.github.com/users/confile/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-22T13:09:41Z","updated_at":"2015-03-31T18:06:23Z","closed_at":null,"body":"I tried to use google AutoFactory (https://github.com/google/auto/tree/master/factory) here is the file I translated: \r\n\r\n```\r\n@AutoFactory(className=\"SomeClassFactory\")\r\npublic class SomeClass {\r\n\r\n\tpublic final String type;\r\n\tpublic final String name;\r\n\r\n\tpublic SomeClass(@Provided String type, String name) {\r\n\t\tthis.type = type;\r\n\t\tthis.name = name;\r\n\t}\r\n\t\r\n}\r\n```\r\n\r\nAnd here is my build gradle file: \r\n```\r\napply plugin: 'java'\r\napply plugin: 'apt'\r\napply plugin: 'eclipse'\r\napply from: 'j2objc.gradle'\r\n\r\nsourceCompatibility = 1.7\r\nversion = '1.0'\r\n\r\neclipse {\r\n\tclasspath {\r\n\t   downloadSources=true\r\n\t   downloadJavadoc=true\r\n\t}\r\n}\r\n\r\nbuildscript {\r\n\trepositories {\r\n\t\tmavenCentral()\r\n\t\tjcenter()\r\n\t\tmaven {\r\n\t\t\turl \"https://oss.sonatype.org/content/repositories/snapshots/\"\r\n\t\t}\r\n\t}\r\n\tdependencies {\r\n\t\tclasspath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.6'\r\n\t\tclasspath 'com.jimdo.gradle:gradle-apt-plugin:0.5-SNAPSHOT'\r\n\t}\r\n}\r\n\r\nsourceSets {\r\n\tapt{\r\n\t\tjava{\r\n\t\t\tsrcDir 'build/source/apt'\r\n\t\t}\r\n\t}\r\n}\r\n\r\ndependencies {\r\n\tapt 'com.google.auto.factory:auto-factory:0.1-beta1'\r\n\t\r\n\tcompile 'com.google.guava:guava:14.0.1'\r\n\tcompile 'javax.inject:javax.inject:1'\r\n\t\r\n\tcompile name: 'j2objc_annotations'\r\n\tcompile 'com.google.auto.factory:auto-factory:0.1-beta1'\r\n\tcompile 'com.google.auto.factory:auto-factory:0.1-beta1:sources'\r\n}\r\n\r\nrepositories {\r\n\tflatDir {\r\n\t\tdirs 'lib'\r\n\t}\r\n}\r\n\r\ntask createWrapper(type: Wrapper) {\r\n\tgradleVersion = '2.2.1'\r\n}\r\n\r\nj2objcConfig {\r\n  generatedSourceDir \"${projectDir}/build/source/apt\"\r\n j2objcHome \"/Applications/J2Objc/j2objc-0.9.6\"\r\n destDir \"${projectDir}/../number-incrementer-ios/Classes\"\r\n \r\ntranslateFlags \"\"\"--no-package-directories --prefixes prefixes.properties -use-arc\r\n\t\t-classpath ${projectDir}/lib/auto-factory-0.1-beta1.jar:${projectDir}/lib/auto-service-1.0-rc1.jar:${projectDir}/lib/javax.inject-1.jar:${projectDir}/lib/guava-16.0.jar:${projectDir}/lib/javawriter-2.4.0.jar:${projectDir}/lib/dagger-1.2.0.jar\"\"\"\r\n\r\ncompileFlags \"-ObjC -ljre_emul\"\r\n\r\ntranslateJ2objcLibs \"jsr305-3.0.0.jar\"\r\n\r\nfilenameCollisionCheck = true\r\n\ttestExecutedCheck = false\r\n\tcycleFinder = false\r\n\tcycleFinderFlags \"--whitelist /Applications/J2Objc/j2objc-sorce/jre_emul/cycle_whitelist.txt --sourcefilelist /Applications/J2Objc/j2objc-sorce/jre_emul/build_result/java_sources.mf\"\r\n}\t\r\n```\r\n\r\nWhen I do ``gradle j2objcTranslate``the first time it works without any errors. Then I created new java classes and deleted the ``SomeClass.java``file. SomeClass is not referenced in any other file. When I do ``gradle j2objcTranslate`` again all the files are translated correctly but there are errors: \r\n\r\n```\r\ntranslating /Users/mg/Documents/Grails/GGTS3.6.2/TestJ2Objc/src/main/java/com/example/incrementer/shared/SomeClassB.java\r\ntranslating /Users/mg/Documents/Grails/GGTS3.6.2/TestJ2Objc/src/main/java/com/example/incrementer/shared/Test.java\r\ntranslating /Users/mg/Documents/Grails/GGTS3.6.2/TestJ2Objc/src/main/java/com/example/incrementer/shared/TestImpl.java\r\ntranslating /Users/mg/Documents/Grails/GGTS3.6.2/TestJ2Objc/src/main/java/com/example/incrementer/shared/dagger/ApplicationModule.java\r\ntranslating /tmp/annotation_processing/com/example/incrementer/shared/SomeClassFactory.java\r\nerror: /tmp/annotation_processing/com/example/incrementer/shared/SomeClassFactory.java:13: SomeClass cannot be resolved to a type\r\nerror: /tmp/annotation_processing/com/example/incrementer/shared/SomeClassFactory.java:14: SomeClass cannot be resolved to a type\r\ntranslating /tmp/annotation_processing/com/example/incrementer/shared/SomeClassFactoryA.java\r\nerror: /tmp/annotation_processing/com/example/incrementer/shared/SomeClassFactoryA.java:10: SomeClassA cannot be resolved to a type\r\nTranslated 4 files: 4 errors, 0 warnings\r\nerror: /tmp/annotation_processing/com/example/incrementer/shared/SomeClassFactoryA.java:11: SomeClassA cannot be resolved to a type\r\nTranslated 0 methods as functions\r\n:j2objcTranslate FAILED\r\n\r\nFAILURE: Build failed with an exception.\r\n``` \r\nIt tries to translate files that does not exist anymore like the following: \r\n```\r\n/tmp/annotation_processing/com/example/incrementer/shared/SomeClassFactory.java\r\n```\r\n\r\nThe old files must be stored in a cache somewhere.\r\nDo you have any idea what is going on here?"},"comment":{"url":"https://api.github.com/repos/brunobowden/j2objc-gradle/issues/comments/88191828","html_url":"https://github.com/brunobowden/j2objc-gradle/issues/16#issuecomment-88191828","issue_url":"https://api.github.com/repos/brunobowden/j2objc-gradle/issues/16","id":88191828,"user":{"login":"brunobowden","id":679339,"avatar_url":"https://avatars.githubusercontent.com/u/679339?v=3","gravatar_id":"","url":"https://api.github.com/users/brunobowden","html_url":"https://github.com/brunobowden","followers_url":"https://api.github.com/users/brunobowden/followers","following_url":"https://api.github.com/users/brunobowden/following{/other_user}","gists_url":"https://api.github.com/users/brunobowden/gists{/gist_id}","starred_url":"https://api.github.com/users/brunobowden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brunobowden/subscriptions","organizations_url":"https://api.github.com/users/brunobowden/orgs","repos_url":"https://api.github.com/users/brunobowden/repos","events_url":"https://api.github.com/users/brunobowden/events{/privacy}","received_events_url":"https://api.github.com/users/brunobowden/received_events","type":"User","site_admin":false},"created_at":"2015-03-31T18:06:22Z","updated_at":"2015-03-31T18:06:22Z","body":"How does this cause a problem? Is it an issue with the gradle script or the\nunderlying tools?\n\nOn Tue, Mar 31, 2015 at 11:04 AM Confile <notifications@github.com> wrote:\n\n> I tried to delete:\n>\n> /tmp/annotation_processing/com/example/incrementer/shared/SomeClassFactory.java\n>\n> but after the j2objcTranslate task I got a new temp file being created:\n>\n> /var/folders/xh/1xkfq26532j97q23qw5pdhs40000gn/T/annotation_processing/com/example/incrementer/shared/SomeClassBFactory.java\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/brunobowden/j2objc-gradle/issues/16#issuecomment-88191093>\n> .\n>\n"}}