Enables UnknownNullness lint check
Adds all existing UnknownNullness warnings to lint-baseline.xml
Using the flag -PcheckUnknownNullness checks only UnknownNullness errors
without using the baseline, so it is easy to see what the errors are.
Also enables UnknownNullness and other kotlin interop inspections in
Studio, to make it easier to notice and fix these.
Bug: b/132358934
Test: ./gradlew lintDebug
Change-Id: I7e6ea1a2e3a1b32b9de02b037e06ce8515ff1ad0
diff --git a/studiow b/studiow
index be984c6..4660020 100755
--- a/studiow
+++ b/studiow
@@ -156,11 +156,16 @@
fi
}
+# ANDROID_LINT_NULLNESS_IGNORE_DEPRECATED environment variable prevents Studio from showing IDE
+# inspection warnings for nullability issues, if the context is deprecated
+# This environment variable is consumed by InteroperabilityDetector.kt
+
function runStudioLinux() {
studioPath="${studioUnzippedPath}/android-studio/bin/studio.sh"
echo "$studioPath &"
env STUDIO_PROPERTIES="${projectDir}/development/studio/idea.properties" \
STUDIO_VM_OPTIONS="${projectDir}/development/studio/studio.vmoptions" \
+ ANDROID_LINT_NULLNESS_IGNORE_DEPRECATED="true" \
"${studioPath}" "${projectDir}" &
}
@@ -169,6 +174,7 @@
echo "open ${appPath}"
env STUDIO_PROPERTIES="${projectDir}/development/studio/idea.properties" \
STUDIO_VM_OPTIONS="${projectDir}/development/studio/studio.vmoptions" \
+ ANDROID_LINT_NULLNESS_IGNORE_DEPRECATED="true" \
open -a "${appPath}" "${projectDir}"
}