badoo / MVICore

MVI framework with events, time-travel, and more
https://badoo.github.io/MVICore/
Other
1.27k stars 90 forks source link

Changed to Java 8 compatibility to fix build #160

Closed LachlanMcKee closed 2 years ago

LachlanMcKee commented 2 years ago

Fixes a regression in the build (caught by github actions) where the running AndroidTests was failing due to an issue with desugaring:

  • What went wrong: Execution failed for task ':mvicore-demo:mvicore-demo-feature2:mergeExtDexDebugAndroidTest'.

    Could not resolve all files for configuration ':mvicore-demo:mvicore-demo-feature2:debugAndroidTestRuntimeClasspath'. Failed to transform lifecycle-common-java8-2.2.0.jar (androidx.lifecycle:lifecycle-common-java8:2.2.0) to match attributes {artifactType=android-dex, dexing-enable-desugaring=false, dexing-incremental-transform=false, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}. Execution failed for DexingNoClasspathTransform: /Users/runner/.gradle/caches/modules-2/files-2.1/androidx.lifecycle/lifecycle-common-java8/2.2.0/cd3478503da69b1a7e0319bd2d1389943db9b364/lifecycle-common-java8-2.2.0.jar. Error while dexing. The dependency contains Java 8 bytecode. Please enable desugaring by adding the following to build.gradle android { compileOptions { sourceCompatibility 1.8 targetCompatibility 1.8 } } See https://developer.android.com/studio/write/java8-support.html for details. Alternatively, increase the minSdkVersion to 24 or above.