j2objc-contrib / j2objc-gradle

This plugin is no longer actively maintained. J2ObjC Gradle Plugin: enables Java source to be part of an iOS application's build so you can write an app's non-UI code (such as application logic and data models) in Java, which is then shared by Android apps (natively Java) and iOS apps (using J2ObjC), all as part of your usual Android Gradle build.
https://github.com/j2objc-contrib/j2objc-gradle
Apache License 2.0
139 stars 43 forks source link

Update j2objc to 1.0.0 #595

Open zasadnyy opened 8 years ago

zasadnyy commented 8 years ago

Since j2objc 1.0.0 was released gradle plugin dependency requirement should be upgraded as well.

https://github.com/google/j2objc/releases/tag/1.0.0

brunobowden commented 8 years ago

This is definitely an issue... there's a number of changes in the 1.0.0 release that we'll need to make changes for.

adil-hussain-84 commented 8 years ago

So I can't use the J2ObjC Gradle plugin right now with J2ObjC version 1.0.0? The README should be updated then because it says "J2ObjC 0.9.8.2.1 or higher" for minimum requirements of the plugin.

brunobowden commented 8 years ago

I'm busy at a conference this week. I will update it come Feb 21. If anyone can send a PR in the interim, I will review and approve it. On Thu, Feb 11, 2016 at 3:25 AM Adil Hussain notifications@github.com wrote:

So I can't use the J2ObjC Gradle plugin right now with J2ObjC version 1.0.0? The README https://github.com/j2objc-contrib/j2objc-gradle/blob/master/README.md should be updated then because it says "J2ObjC 0.9.8.2.1 or higher" for minimum requirements of the plugin.

— Reply to this email directly or view it on GitHub https://github.com/j2objc-contrib/j2objc-gradle/issues/595#issuecomment-182815515 .

adil-hussain-84 commented 8 years ago

Hey Bruno, I've created the pull request here: https://github.com/j2objc-contrib/j2objc-gradle/pull/598

efirestone commented 8 years ago

Any updates on this? We'd love to have the latest 1.0.X features without having to manually implement the build process.

brunobowden commented 8 years ago

My apologies as I've been busy at TED and other events. I will look at this tomorrow.

On Tue, Mar 15, 2016 at 2:19 PM efirestone notifications@github.com wrote:

Any updates on this? We'd love to have the latest 1.0.X features without having to manually implement the build process.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/j2objc-contrib/j2objc-gradle/issues/595#issuecomment-197024383

efirestone commented 8 years ago

No big deal actually. Working around this using skipJ2objcVerification true for now and everything seems ok.

adil-hussain-84 commented 8 years ago

@efirestone I can't see how you got this working. I have a simple SharedCode module that imports some classes from the Guava library and makes use of them. This works and builds with the 0.9.8.2.1 release of the J2ObjC library. However, when I try build it with the 1.0.0 release I get errors of the following nature:

/Users/Adil/Library/J2ObjC/j2objc-1.0.0/include/J2ObjC_header.h:25:17: error: cannot create __weak reference in file using manual reference counting
id JreStrAppend(__weak id *lhs, const char *types, ...);

Did you encounter any such errors and, if so, how did you overcome them?

adil-hussain-84 commented 8 years ago

Turns out this has been fixed in the 1.0.1 release of the J2ObjC library and all occurrences of __weak and have been replaced with __unsafe_unretained. Still curious to know how you got it to work @efirestone...

efirestone commented 8 years ago

We're not using Guava, so that's likely the difference. JRE core in 1.0.1 and 1.0.2 seem to work without issues.

halfhp commented 8 years ago

It's been a while...any movement on this one?

mithepner commented 8 years ago

Looks like there's an open pull request to upgrade to 1.0.2 https://github.com/j2objc-contrib/j2objc-gradle/pull/618