-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
@SafeVarargs and Android #992
Comments
Looks like it was added in API 19 ( On 27 March 2014 09:41, Ben Christensen notifications@github.com wrote:
|
It seems to work, even when running on an ICS (api 14) device, though the I'm not sure how linking it against one defined in a jar using java 7 will On 27 March 2014 10:41, Dylan Sale dylan.sale@gmail.com wrote:
|
That's great news. If I provide a jar built with Java 7 can you test linking to a jar? |
Sure thing |
See ReactiveX#992 for discussion.
I have no other obvious place to place a binary so am using Dropbox: https://www.dropbox.com/s/fkt7vlox946pig0/rxjava-core-0.17.3-SNAPSHOT.jar This file was built using OpenJDK 1.7.0_45 with @SafeVarargs |
It seems to work, though it gets a bunch of warnings while building: Warning:Gradle: : rx/Subscriber.class(rx:Subscriber.class): major version |
Hmm, I'm seeing some odd behaviour with it saying missing symbols in the |
Looks like KitKat (api 19) supports jdk 7 but you need to setup some http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Using-sourceCompatibility-1.7 |
Did anyone try to build their Android project with JDK 6? We're still using JDK 6. Unfortunately my team is on a tight release schedule right now so I don't have time to look into this before next week. Generally though, this will trigger a compile time check yes? If that's the case, the only problem I can think of off the top of my head is that the dexer might be unable to resolve the annotation when processing the RxJava JAR. Keep in mind that the dex file contains everything, including direct and transitive dependencies. |
I was building with JDK 6. |
Thanks for playing with that ... I'll spend some more time on this. It's not okay to have version 51 if people expect version 50. What's the roadmap for Android dev being moved onto version 51 (JDK 7) and no longer requiring version 50 (JDK 6)? |
Closing out ... failed experiment, and I found |
I'm not sure when JDK 7 development will become the norm but it is I'm on Mac however and getting a version of JDK 7 is not proving easy. |
What do you mean by this? It's available via Oracle: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html -> http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-macosx-x64.dmg |
The download "completes" about 20mb in for me. I'm not sure why. |
Oh how fun. |
I have JDK 6 and 7 installed on my Mac back to back (I occasionally switch The problem I guess is one of adoption. At SoundCloud we're still stuck |
Understood. My intention is for RxJava 1.0 to remain on Java 6. This |
There is one feature of Java 7 I would really like to use ... but Android is holding it back ... it's
@SafeVarargs
to solve #686 "From Overloads".Folks from the Android side ... what happens if we build code that uses @SafeVarargs? Does it break you, or does the runtime just ignore it?
The reason I wonder is because it's an annotation, so I'm wondering if the annotation actually affects bytecode or if it just isn't seen at runtime if running on Java 6.
Is there some kind of Android "test suite" we can run against a Jar to validate the byte code is all valid?
The text was updated successfully, but these errors were encountered: