{"action":"closed","issue":{"url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/issues/59","labels_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/issues/59/comments","events_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/issues/59/events","html_url":"https://github.com/j2objc-contrib/j2objc-gradle/issues/59","id":75943986,"number":59,"title":"Support generated-from-java and hand-migrated ObjC together","user":{"login":"advayDev1","id":11729521,"avatar_url":"https://avatars.githubusercontent.com/u/11729521?v=3","gravatar_id":"","url":"https://api.github.com/users/advayDev1","html_url":"https://github.com/advayDev1","followers_url":"https://api.github.com/users/advayDev1/followers","following_url":"https://api.github.com/users/advayDev1/following{/other_user}","gists_url":"https://api.github.com/users/advayDev1/gists{/gist_id}","starred_url":"https://api.github.com/users/advayDev1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/advayDev1/subscriptions","organizations_url":"https://api.github.com/users/advayDev1/orgs","repos_url":"https://api.github.com/users/advayDev1/repos","events_url":"https://api.github.com/users/advayDev1/events{/privacy}","received_events_url":"https://api.github.com/users/advayDev1/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":{"login":"advayDev1","id":11729521,"avatar_url":"https://avatars.githubusercontent.com/u/11729521?v=3","gravatar_id":"","url":"https://api.github.com/users/advayDev1","html_url":"https://github.com/advayDev1","followers_url":"https://api.github.com/users/advayDev1/followers","following_url":"https://api.github.com/users/advayDev1/following{/other_user}","gists_url":"https://api.github.com/users/advayDev1/gists{/gist_id}","starred_url":"https://api.github.com/users/advayDev1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/advayDev1/subscriptions","organizations_url":"https://api.github.com/users/advayDev1/orgs","repos_url":"https://api.github.com/users/advayDev1/repos","events_url":"https://api.github.com/users/advayDev1/events{/privacy}","received_events_url":"https://api.github.com/users/advayDev1/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/milestones/3","html_url":"https://github.com/j2objc-contrib/j2objc-gradle/milestones/Beta%20Release","labels_url":"https://api.github.com/repos/j2objc-contrib/j2objc-gradle/milestones/3/labels","id":1162580,"number":3,"title":"Beta Release","description":null,"creator":{"login":"advayDev1","id":11729521,"avatar_url":"https://avatars.githubusercontent.com/u/11729521?v=3","gravatar_id":"","url":"https://api.github.com/users/advayDev1","html_url":"https://github.com/advayDev1","followers_url":"https://api.github.com/users/advayDev1/followers","following_url":"https://api.github.com/users/advayDev1/following{/other_user}","gists_url":"https://api.github.com/users/advayDev1/gists{/gist_id}","starred_url":"https://api.github.com/users/advayDev1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/advayDev1/subscriptions","organizations_url":"https://api.github.com/users/advayDev1/orgs","repos_url":"https://api.github.com/users/advayDev1/repos","events_url":"https://api.github.com/users/advayDev1/events{/privacy}","received_events_url":"https://api.github.com/users/advayDev1/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":7,"state":"open","created_at":"2015-06-12T19:01:13Z","updated_at":"2015-06-17T00:28:40Z","due_on":null,"closed_at":null},"comments":10,"created_at":"2015-05-13T10:55:22Z","updated_at":"2015-06-17T00:28:40Z","closed_at":"2015-06-17T00:28:40Z","body":"@brunobowden  continuing our discussion from #56 \r\n\r\nhow have you been tackling it?\r\n\r\nbtw, the way I'm doing this right now (until we can finish #51), is:\r\n1. j2objc plugin attached to each of my individual Java projects (let this be JP), each with --build-closure.\r\n  a) translateExcludeClass for entire classes that just don't make any sense in ObjC land and no one depends on.\r\n  b) for libraries I don't control or want to muck too much with, I create a sparse parallel Java source tree which stubs out the methods not compatible with ObjC land.  then I add this sparse source tree to the translateSourcepath, while also keeping the original library's jar on the classpath.  (or if I have both the original and mine as sources, put them both in the sourcepath, with my overlay first)\r\n2. a seperate gradle build project (that depends on all of the above ones) with a single task that copies all of the j2objcCopy output directories from projects in list JP into a single output directory.  They are copied in reverse order of the gradle project dependencies (i.e. if :appx depends on :libx, :appx's j2objcCopy destDir is copied into the final objc directory, and then :libx's destDir is copied on top of it.  this prevents any ill effect from '--build-closure', since the project that 'owns' that source is guaranteed to have the final overwrite for its translated ObjC files).\r\n3. finally I overlay hand-written objc files in a sparse source tree on top of the output of (2).\r\n\r\nI find this to be a somewhat cleaner approach than putting a bunch of OCNI in my code, and it isn't possible for libraries I don't control anyway.\r\n"}}