Skip to content

Java 8 warning in Gradle due to missing compileOptions #161

@iaggocapitanio1

Description

@iaggocapitanio1

Package: in_app_review
Version: 2.0.10
Environment: Flutter Android (Gradle 8+)

Description
When compiling a Flutter app that depends on in_app_review, Gradle throws the following warning:

warning: [options] source value 8 is obsolete and will be removed in a future release warning: [options] target value 8 is obsolete and will be removed in a future release This is due to the plugin’s android/build.gradle missing an explicit compileOptions block.

Root Cause
Gradle defaults to Java 1.8 if no compileOptions are provided. Since Gradle 8+ deprecates Java 8, this causes a build warning, which may become a build failure in future versions.

Suggested Fix
Please add the following block to android/build.gradle

android { compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions