Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] add lint using current baseline as starting point (#9318)
Browse files Browse the repository at this point in the history
  • Loading branch information
Guardiola31337 authored Jul 21, 2017
1 parent fb8d40a commit b83d797
Show file tree
Hide file tree
Showing 13 changed files with 4,108 additions and 1 deletion.
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,18 @@ test-code-android:
android-checkstyle: platform/android/configuration.gradle
cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=none checkstyle

.PHONY: android-lint-sdk
android-lint-sdk: platform/android/configuration.gradle
cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=none :MapboxGLAndroidSDK:lint

.PHONY: android-lint-test-app
android-lint-test-app: platform/android/configuration.gradle
cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=none :MapboxGLAndroidSDKTestApp:lint

.PHONY: android-lint-wear-app
android-lint-wear-app: platform/android/configuration.gradle
cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=none :MapboxGLAndroidSDKWearTestApp:lint

.PHONY: android-javadoc
android-javadoc: platform/android/configuration.gradle
cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=none :MapboxGLAndroidSDK:javadocrelease
Expand Down
32 changes: 32 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ jobs:
LIBSYSCONFCPUS: 4
JOBS: 4
BUILDTYPE: Debug
IS_LOCAL_DEVELOPMENT: false
steps:
- checkout
- *generate-cache-key
Expand All @@ -175,6 +176,18 @@ jobs:
- run:
name: Check Java code style
command: make android-checkstyle
- run:
name: Check Android modules for potential bugs (Lint SDK)
command: |
make android-lint-sdk
- run:
name: Check Android modules for potential bugs (Lint Test App)
command: |
make android-lint-test-app
- run:
name: Check Android modules for potential bugs (Lint Wear Test App)
command: |
make android-lint-wear-app
- run:
name: Build Test APK
command: |
Expand Down Expand Up @@ -213,6 +226,24 @@ jobs:
- store_artifacts:
path: platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk
destination: .
- store_artifacts:
path: platform/android/MapboxGLAndroidSDK/build/reports/lint-results.html
- store_artifacts:
path: platform/android/MapboxGLAndroidSDK/build/reports/lint-results.xml
- store_artifacts:
path: platform/android/MapboxGLAndroidSDK/lint-baseline.xml
- store_artifacts:
path: platform/android/MapboxGLAndroidSDKTestApp/build/reports/lint-results.html
- store_artifacts:
path: platform/android/MapboxGLAndroidSDKTestApp/build/reports/lint-results.xml
- store_artifacts:
path: platform/android/MapboxGLAndroidSDKTestApp/lint-baseline.xml
- store_artifacts:
path: platform/android/MapboxGLAndroidSDKWearTestApp/build/reports/lint-results.html
- store_artifacts:
path: platform/android/MapboxGLAndroidSDKWearTestApp/build/reports/lint-results.xml
- store_artifacts:
path: platform/android/MapboxGLAndroidSDKWearTestApp/lint-baseline.xml

# ------------------------------------------------------------------------------
android-release-all:
Expand All @@ -223,6 +254,7 @@ jobs:
LIBSYSCONFCPUS: 4
JOBS: 4
BUILDTYPE: Release
IS_LOCAL_DEVELOPMENT: false
steps:
- checkout
- *generate-cache-key
Expand Down
2 changes: 2 additions & 0 deletions platform/android/MapboxGLAndroidSDK/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
lint-baseline.xml
lint/lint-baseline-local.xml
2 changes: 2 additions & 0 deletions platform/android/MapboxGLAndroidSDK/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ android {
}

lintOptions {
baseline file("lint-baseline.xml")
checkAllWarnings true
warningsAsErrors true
}
Expand Down Expand Up @@ -152,3 +153,4 @@ apply from: 'gradle-javadoc.gradle'
apply from: 'gradle-publish.gradle'
apply from: 'gradle-checkstyle.gradle'
apply from: 'gradle-tests-staticblockremover.gradle'
apply from: '../gradle-lint.gradle'
Loading

0 comments on commit b83d797

Please sign in to comment.