Having issues with build the flutter app

I’m building the flutter app and encounter the issue with building it. I have the following issue Fix this issue by adding the following to /Users/marynaplp/Armature_Trepanier/mobile/android/app/build.gradle:
android {
compileSdkVersion 33

}

warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
error: warnings found and -Werror specified

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:connectivity:compileReleaseJavaWithJavac’.

Compilation failed; see the compiler error output for details.

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

May be someone of you could help me to resolve it. My build.gradle file:
buildscript {
ext.kotlin_version = ‘1.6.10’
repositories {
google()
jcenter()
}
dependencies {
classpath ‘com.android.tools.build:gradle:4.1.0’
classpath “org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version”
}
// ext {
// Update the Android Gradle plugin version
// androidGradlePluginVersion = ‘7.0.0’
// }
}
allprojects {
repositories {
google()
jcenter()
}
}

rootProject.buildDir = ‘…/build’
subprojects {
project.buildDir = “${rootProject.buildDir}/${project.name}”
project.evaluationDependsOn(‘:app’)
}

task clean(type: Delete) {
delete rootProject.buildDir
}

This says that you are targeting an older version of Java than is fully supported by what you are using. This is only a warning, but due to the -Werror argument, the compiler is also treating warnings as errors. The specific configuration for these is not in what you’ve shared.