Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Nullability Annotations to Java Classes] Enable and Configure UnknownNullness Android Lint Check #2823

Merged
merged 4 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions config/lint/lint.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<!-- INTEROPERABILITY -->
<issue id="UnknownNullness" severity="informational"/>
</lint>
9 changes: 5 additions & 4 deletions example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ android {
}
}

lint {
warning 'InvalidPackage'
}

testOptions {
// Don't use the test orchestrator yet, some of our connected testsare sharing state to reduce network
// pressure on the API (authentication/fetch profile/fetch sites).
Expand All @@ -63,6 +59,11 @@ android {
}
}

lint {
lintConfig file("${project.rootDir}/config/lint/lint.xml")
enable += 'UnknownNullness'
}

buildFeatures {
buildConfig true
viewBinding true
Expand Down
6 changes: 6 additions & 0 deletions fluxc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,19 @@ android {
}
consumerProguardFiles 'proguard-rules.pro'
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

lint {
lintConfig file("${project.rootDir}/config/lint/lint.xml")
enable += 'UnknownNullness'
}

testOptions {
unitTests.includeAndroidResources = true
}
Expand Down
15 changes: 0 additions & 15 deletions fluxc/lint.xml

This file was deleted.

6 changes: 6 additions & 0 deletions plugins/woocommerce/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,19 @@ android {
}
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

lint {
lintConfig file("${project.rootDir}/config/lint/lint.xml")
enable += 'UnknownNullness'
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
Expand Down