From 74df3766f9da2f49a6cf3fafaf177c4c19d69276 Mon Sep 17 00:00:00 2001 From: tonihei Date: Fri, 11 May 2018 07:05:48 -0700 Subject: [PATCH] Include checkerframework annotatons with compileOnly and remove lint exclusion The lint error suppression only works locally and not for external developers who still see the lint error and need to suppress it themselves. This changes 'implementation' to 'compileOnly' in gradle to prevent the dependency from being exported. Also removes the local lint suppression. Issue:#4234 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=196251407 --- checker-framework-lint.xml | 19 ------------------- library/core/build.gradle | 6 +----- library/dash/build.gradle | 6 +----- library/hls/build.gradle | 6 +----- library/smoothstreaming/build.gradle | 6 +----- 5 files changed, 4 insertions(+), 39 deletions(-) delete mode 100644 checker-framework-lint.xml diff --git a/checker-framework-lint.xml b/checker-framework-lint.xml deleted file mode 100644 index 1d45f9de05..0000000000 --- a/checker-framework-lint.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - diff --git a/library/core/build.gradle b/library/core/build.gradle index 52249220e0..d2fa5e25f8 100644 --- a/library/core/build.gradle +++ b/library/core/build.gradle @@ -42,15 +42,11 @@ android { // testCoverageEnabled = true // } } - - lintOptions { - lintConfig file("../../checker-framework-lint.xml") - } } dependencies { implementation 'com.android.support:support-annotations:' + supportLibraryVersion - implementation 'org.checkerframework:checker-qual:' + checkerframeworkVersion + compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion androidTestImplementation 'com.google.dexmaker:dexmaker:' + dexmakerVersion androidTestImplementation 'com.google.dexmaker:dexmaker-mockito:' + dexmakerVersion androidTestImplementation 'com.google.truth:truth:' + truthVersion diff --git a/library/dash/build.gradle b/library/dash/build.gradle index 81b247d047..867b288498 100644 --- a/library/dash/build.gradle +++ b/library/dash/build.gradle @@ -30,15 +30,11 @@ android { // testCoverageEnabled = true // } } - - lintOptions { - lintConfig file("../../checker-framework-lint.xml") - } } dependencies { implementation project(modulePrefix + 'library-core') - implementation 'org.checkerframework:checker-qual:' + checkerframeworkVersion + compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion implementation 'com.android.support:support-annotations:' + supportLibraryVersion testImplementation project(modulePrefix + 'testutils-robolectric') } diff --git a/library/hls/build.gradle b/library/hls/build.gradle index c599931a68..6aeb33e195 100644 --- a/library/hls/build.gradle +++ b/library/hls/build.gradle @@ -30,15 +30,11 @@ android { // testCoverageEnabled = true // } } - - lintOptions { - lintConfig file("../../checker-framework-lint.xml") - } } dependencies { implementation 'com.android.support:support-annotations:' + supportLibraryVersion - implementation 'org.checkerframework:checker-qual:' + checkerframeworkVersion + compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion implementation project(modulePrefix + 'library-core') testImplementation project(modulePrefix + 'testutils-robolectric') } diff --git a/library/smoothstreaming/build.gradle b/library/smoothstreaming/build.gradle index e71f9baa99..6f85d1572d 100644 --- a/library/smoothstreaming/build.gradle +++ b/library/smoothstreaming/build.gradle @@ -30,15 +30,11 @@ android { // testCoverageEnabled = true // } } - - lintOptions { - lintConfig file("../../checker-framework-lint.xml") - } } dependencies { implementation project(modulePrefix + 'library-core') - implementation 'org.checkerframework:checker-qual:' + checkerframeworkVersion + compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion implementation 'com.android.support:support-annotations:' + supportLibraryVersion testImplementation project(modulePrefix + 'testutils-robolectric') }