-
Notifications
You must be signed in to change notification settings - Fork 43
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
Windows Support, limited to translation only #345
Comments
@advayDev1: Regarding "additional tasks disabled": if I disable all known OS X specific tasks, the "build gradle" still fails... I could disable these tasks: but the plugin fails with this error: FAILURE: Build failed with an exception. I can not disable the task "compileDebugTestJ2objcExecutableTestJ2objcObjc"... Maybe it is possible to disable it, but I don't know how. Another issue is the skipping of task j2objcCycleFinder which should also work on Windows... |
// Disables testing
j2objcTestDebug { enabled = false }
j2objcTestRelease { enabled = false }
// Disables compiling/linking of all j2objc sources/libraries/executables
tasks.all { Task task ->
if ((task.name =~ /^.*((J|j)2objc(Executable|StaticLibrary|SharedLibrary|Objc))$/).matches()) {
task.enabled = false
}
} |
@brunobowden - re your point from the PR, j2objc still does not include Windows as a supported platform: http://j2objc.org/#requirements - in that sense I don't see it as different from the PR you just submitted (requirement is Mac, but there's a FAQ for Windows). also, i'm not opposed to adding a config flag for say 'translationOnlyMode' or similar that disables everything but j2objc translate (which is useful regardless of Windows). i'm also not opposed to fixing regular defects in our Java re: cross-platform correctness (i.e. like PR #343 ). what I think we should not do is add Windows-specific code (like a 'Windows mode' that automatically disables non-translation) or formally support Windows until/unless j2objc does as well. |
I agree that everything should be as platform independent as possible. I am also against "Windows mode". If I have gained the voting rights, I vote for 'translationOnlyMode' flag... :-) With your help I created a configuration for "gradle build" which works under Windows: // Disable all OS X specific tasks
j2objcPackLibrariesDebug { enabled = false }
j2objcAssembleDebug { enabled = false }
j2objcTestDebug { enabled = false }
j2objcPackLibrariesRelease { enabled = false }
j2objcAssembleRelease { enabled = false }
j2objcTestRelease { enabled = false }
tasks.all { Task task ->
if ((task.name =~ /^.*((J|j)2objc(Executable|StaticLibrary|SharedLibrary|Objc))$/).matches()) {
task.enabled = false
}
} Ideally all those tasks would be disabled with the proposed "translationOnlyMode" flag. |
So you've confirmed that works on Windows? Btw, I've posted a question to the j2objc community here: I'd like to hear others' use-cases for doing this - please add yours' too if you'd like! |
@advayDev1 Regarding j2objcCycleFinder: I have enabled it with "j2objcCycleFinder { enabled = true }" and it works. But I had to set cycleFinderExpectedCycles to 34. Did the expected number of erroneous matches with jre_emul library change in latest J2ObjC version? Is there a way to make the default value of "cycleFinderExpectedCycles" dependent on the J2ObjC version? |
@gocursor - Please open a new issue re: cycle finder expected cycles; it should be unrelated to Windows/translation-only. I'll respond on that new issue. |
I am confirming that the above configuration works on Windows! Here is the "gradle build" output:
|
Thanks, filed separate #347 to support translation-only mode. |
Thank you! :-) |
for the limited translation functionality only, this is fixed. |
j2objc-gradle plugin should also run on Windows - just cycle finder and translation to ObjectiveC as mentioned on http://j2objc.org/docs/Getting-Started.html#how-do-i-run-on-windows-or-linux (both Gradle and j2objc can run on Windows).
Prefered way of using whould be inside "gradle build" task, so it can be used within multi-project gradle structure. Currently "gradle build" fails on Windows, because OS X specific tasks can not be disabled.
The text was updated successfully, but these errors were encountered: