Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow mapping of Java source files. #455

Merged
merged 1 commit into from
Sep 16, 2015
Merged

Conversation

advayDev1
Copy link
Contributor

No description provided.

@confile
Copy link
Contributor

confile commented Sep 14, 2015

@advayDev1 whar is this good for compared with translateSourcepaths.

@advayDev1
Copy link
Contributor Author

I'm currently using it for the following:
I have a third-party library which almost meets my needs (and comes with a source jar).
I need to however alter some native implementations substantially. I map just those 3 files to brand new Java files.

translateSourcepaths works only if I was using this library in exactly one other project AND i was willing to use --build-closure. Instead I chose to build this third-party library using the new j2objcTranslation feature I added in #431. I've gotten rid of all --build-closure in all of my projects using the new dependency features and it speeds up my build by a factor about 5 when I change a single file (in the past build-closure meant everything had to be rebuilt)

@@ -45,7 +45,7 @@ class CycleFinderTask extends DefaultTask {
if (J2objcConfig.from(project).translatePattern != null) {
ret = allFiles.matching(J2objcConfig.from(project).translatePattern)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change ret => result, I think it's more legible.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, it seems like ret is a convention so shall we stick with that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep it is

@brunobowden
Copy link
Contributor

LGTM

Yet another example of why cycleFinder and translate should have a shared base class ;-)

advayDev1 added a commit that referenced this pull request Sep 16, 2015
Allow mapping of Java source files.
@advayDev1 advayDev1 merged commit 30ba084 into j2objc-contrib:master Sep 16, 2015
@advayDev1 advayDev1 deleted the mapSrc branch September 16, 2015 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants