Skip to content

JCTools as Shaded Dependency #1735

@benjchristensen

Description

@benjchristensen

Now that JCTools is available on Maven Central (http://search.maven.org/#search%7Cga%7C1%7Cjctools) we should consider depending on it directly instead of copy/pasting as we have done so far: https://github.com/ReactiveX/RxJava/tree/1.x/src/main/java/rx/internal/util/unsafe (note the README that provides background and details).

There are a few considerations:

  1. RxJava is a "zero dependency" project so the dependency will need to be shaded (package names changed to be inside RxJava) so that it becomes part of the RxJava jar.

  2. Byte size of pulling in code from JCTools that we don't need. This affects Android particularly.

  3. Use of JCTools must all be done behind a conditional check UnsafeAccess.isUnsafeAvailable() otherwise RxJava will not work on platforms without sun.misc.Unsafe.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions