-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated Gradle dependencies and tools for sub-projects, including Che…
…ckstyle and Lint. Also fixed all Checkstyle and Lint complaints.
- Loading branch information
Showing
16 changed files
with
244 additions
and
265 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<lint> | ||
<!-- Error issues that should break builds --> | ||
<!-- Issues considered priority 8 or higher should be marked as "error" --> | ||
<issue id="HardcodedText" severity="error" /> | ||
<issue id="UnusedResources" severity="error"> | ||
<!--<ignore path="**/google-services/**" />--> | ||
<!--<ignore path="build.gradle" />--> | ||
<!--<ignore path="src/main/res/layout/preview_theme_editor.xml" />--> | ||
<!--<ignore path="src/main/res/values/strings_preview.xml" />--> | ||
</issue> | ||
|
||
<!-- Informational issues don't break builds --> | ||
<issue id="CustomViewStyleable" severity="informational" /> | ||
<!--<issue id="GradleDependency" severity="informational" />--> | ||
<!--<issue id="OldTargetApi" severity="informational" />--> | ||
</lint> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
android { | ||
lintOptions { | ||
lintConfig file("${project.rootDir}/code-quality/custom-lint.xml") | ||
htmlReport true | ||
abortOnError true | ||
// baseline file("lint-baseline.xml") | ||
// htmlOutput file("lint-report.html") | ||
// warningsAsErrors true | ||
// check[IDs of Issues to run] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// This should be executed under subprojects {} or allProjects {} functions. | ||
|
||
/** | ||
* Error-prone | ||
*/ | ||
apply plugin: 'net.ltgt.errorprone' | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
options.errorprone.disableWarningsInGeneratedCode = true | ||
} | ||
|
||
configurations.all { | ||
resolutionStrategy { | ||
eachDependency { details -> | ||
// Force all the error-prone dependencies to use the same version. | ||
if (details.requested.group == 'com.google.errorprone' && details.requested.name.startsWith('error_prone_')) { | ||
details.useVersion versions.errorProne | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
||
/** | ||
* Checkstyle | ||
*/ | ||
apply plugin: 'checkstyle' | ||
|
||
checkstyle { | ||
configFile rootProject.file('code-quality/checkstyle.xml') | ||
ignoreFailures false | ||
showViolations true | ||
} | ||
|
||
task checkstyle(type: Checkstyle) { | ||
configFile rootProject.file('code-quality/checkstyle.xml') | ||
source 'src/main/java' | ||
ignoreFailures false | ||
showViolations true | ||
include '**/*.java' | ||
|
||
// reports { | ||
// xml.enabled = true | ||
// } | ||
|
||
classpath = files() | ||
} | ||
|
||
afterEvaluate { | ||
if (project.tasks.getByName("check")) { | ||
check.dependsOn('checkstyle') | ||
} | ||
} | ||
|
||
/** | ||
* Tools dependencies | ||
*/ | ||
dependencies { | ||
errorprone "com.google.errorprone:error_prone_core:${versions.errorProne}" | ||
} |
Oops, something went wrong.