KotlinAudio icon indicating copy to clipboard operation
KotlinAudio copied to clipboard

Linter Errors

Open jspizziri opened this issue 2 years ago • 1 comments

Running the following:

git clone [email protected]:doublesymmetry/KotlinAudio.git
cd KotlinAudio
./gradlew -x test build publishToMavenLocal

Results in a linter error:

Task :kotlin-audio:lintDebug FAILED
Wrote HTML report to file:///Users/gav/Repos/KotlinAudio/kotlin-audio/build/reports/lint-results-debug.html
Lint found 3 errors and 9 warnings. First failure:
/Users/gav/Repos/KotlinAudio/kotlin-audio/src/main/java/com/doublesymmetry/kotlinaudio/notification/NotificationManager.kt:159: Error: Call requires API level 24 (current min is 21): java.lang.Iterable#forEach [NewApi]
                config.buttons.forEach { button ->
                               ~~~~~~~

Lint found errors in the project; aborting build.

Fix the issues identified by lint, or add the following to your build script to proceed with errors:

...
android {
    lintOptions {
        abortOnError false
    }
}
...

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':kotlin-audio:lintDebug'.
> A failure occurred while executing com.android.build.gradle.internal.lint.AndroidLintTask$AndroidLintLauncherWorkAction
> There was a failure while executing work items
> A failure occurred while executing com.android.build.gradle.internal.lint.AndroidLintWorkAction
> Lint found errors in the project; aborting build.

* 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.

* Get more help at https://help.gradle.org

BUILD FAILED in 2m 11s
142 actionable tasks: 142 executed
gav@gavs-mbp KotlinAudio %

jspizziri avatar Sep 21 '22 15:09 jspizziri

There's a temporary workaround for this for RNTP projects which is simply:

git clone [email protected]:doublesymmetry/KotlinAudio.git
cd KotlinAudio
./gradlew publishToMavenLocal

jspizziri avatar Sep 21 '22 15:09 jspizziri