@@ -35,9 +35,30 @@ task clean(type: Delete) {
3535gradle. projectsEvaluated {
3636 project(" :video_player_android" ) {
3737 tasks. withType(JavaCompile ) {
38- // TODO(stuartmorgan): Enable this. See
39- // https://github.com/flutter/flutter/issues/91868
40- // options.compilerArgs << "-Xlint:all" << "-Werror"
38+ options. compilerArgs << " -Xlint:all" << " -Werror"
39+
40+ // Workaround for several warnings when building
41+ // that the above turns into errors, coming from
42+ // org.checkerframework.checker.nullness.qual and
43+ // com.google.errorprone.annotations:
44+ //
45+ // warning: Cannot find annotation method 'value()' in type
46+ // 'EnsuresNonNull': class file for
47+ // org.checkerframework.checker.nullness.qual.EnsuresNonNull not found
48+ //
49+ // warning: Cannot find annotation method 'replacement()' in type
50+ // 'InlineMe': class file for
51+ // com.google.errorprone.annotations.InlineMe not found
52+ //
53+ // The dependency version are taken from:
54+ // https://github.com/google/ExoPlayer/blob/r2.18.1/constants.gradle
55+ //
56+ // For future reference the dependencies are excluded here:
57+ // https://github.com/google/ExoPlayer/blob/r2.18.1/library/common/build.gradle#L33-L34
58+ dependencies {
59+ implementation " org.checkerframework:checker-qual:3.13.0"
60+ implementation " com.google.errorprone:error_prone_annotations:2.10.0"
61+ }
4162 }
4263 }
4364}
0 commit comments