net.sourceforge.streamsupport:android-cfuture21-hack

An unsupported hackish attempt to provide CompletableFuture on Android API level 21 to level 23 in conjunction with google/desugar_jdk_libs and Android Gradle Plugin 4.x

License

License

Categories

Categories

Net
GroupId

GroupId

net.sourceforge.streamsupport
ArtifactId

ArtifactId

android-cfuture21-hack
Last Version

Last Version

1.0.5
Release Date

Release Date

Type

Type

pom.sha512
Description

Description

net.sourceforge.streamsupport:android-cfuture21-hack
An unsupported hackish attempt to provide CompletableFuture on Android API level 21 to level 23 in conjunction with google/desugar_jdk_libs and Android Gradle Plugin 4.x
Project URL

Project URL

http://github.com/retrostreams/android-cfuture21-hack/
Source Code Management

Source Code Management

https://github.com/retrostreams/android-cfuture21-hack

Download android-cfuture21-hack

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

Maven Central javadoc.io

android-cfuture21-hack

An unsupported hackish attempt to provide CompletableFuture on Android API level 21 to level 23 in conjunction with google/desugar_jdk_libs and Android Gradle Plugin 4.x

Android Studio will display an error "Call requires API level 24 (current min is 21)". This error is just a warning that can be ignored. If you want to get rid of the error, just add @SuppressLint("NewApi") to your code.

Use at your own risk. This hack won't get support in any way!

app/build.gradle:

apply plugin: 'com.android.application'


android {

    defaultConfig {
        ...
        minSdkVersion 21 // has to be >= 21 and < 24, if you have 24+ this hack is not needed
        ...
    }

    compileOptions {
        coreLibraryDesugaringEnabled true
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.10'
    implementation 'net.sourceforge.streamsupport:android-cfuture21-hack:1.0.5'
}

LICENSE

GNU General Public License, version 2, with the Classpath Exception (and CC0 1.0 for JSR-166 derived code)

Versions

Version
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0