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

Fix #1736: Add Bazel Linter #2048

Merged
merged 30 commits into from
Feb 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
d33a90b
bazel lint fix
anandwana001 Oct 27, 2020
a01bdbb
bazel lint fix
anandwana001 Oct 27, 2020
f0d55be
rules_android
anandwana001 Oct 27, 2020
6753a03
app package visibility modify
anandwana001 Nov 13, 2020
8806c0a
exporting app manifest file
anandwana001 Nov 13, 2020
1668680
target path fix
anandwana001 Nov 13, 2020
9c4a207
merge develop
anandwana001 Dec 18, 2020
b5d2416
nit formatting
anandwana001 Jan 4, 2021
afe258e
nit change
anandwana001 Jan 4, 2021
fde338d
nit fix
anandwana001 Jan 4, 2021
1a70341
updating visiblity
anandwana001 Jan 5, 2021
f42db09
updating visiblity
anandwana001 Jan 5, 2021
10d4d0b
shifting crashlytics and removing from app module
anandwana001 Jan 5, 2021
f5ea647
nit fix
anandwana001 Jan 5, 2021
ef4d153
nit fix
anandwana001 Jan 5, 2021
093a001
update linter command
anandwana001 Jan 5, 2021
03ac051
Merge branch 'develop' of https://github.com/oppia/oppia-android into…
anandwana001 Jan 5, 2021
240a5ca
adding pre push
anandwana001 Jan 5, 2021
e10ac3c
using script in github workflow
anandwana001 Jan 9, 2021
222ae74
revert
anandwana001 Jan 9, 2021
1d6f2b3
merge and revert bazel pre-push
anandwana001 Jan 18, 2021
96b3d29
undo change
anandwana001 Jan 18, 2021
5ac90e8
Merge branch 'develop' of https://github.com/oppia/oppia-android into…
anandwana001 Jan 25, 2021
fc70b42
Merge branch 'develop' of https://github.com/oppia/oppia-android into…
anandwana001 Feb 4, 2021
14c596c
nit fix
anandwana001 Feb 4, 2021
fac0210
merge and resolve conflicts
anandwana001 Feb 11, 2021
d40e412
adding scripts
anandwana001 Feb 11, 2021
b4d8be8
putting buildifier error
anandwana001 Feb 11, 2021
0b92e55
fixing buildifier error
anandwana001 Feb 11, 2021
fad6866
Merge branch 'develop' of https://github.com/oppia/oppia-android into…
anandwana001 Feb 13, 2021
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
11 changes: 10 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- develop

# This workflow has the following jobs:
# linters: Java, Kotlin, Protobuf
# linters: Java, Kotlin, Protobuf, Bazel
# robolectric_tests: Robolectric tests for all modules except the app module
# app_tests: Non-flaky Robolectric tests for the app module
jobs:
Expand Down Expand Up @@ -52,6 +52,11 @@ jobs:
curl -sSL https://github.com/bufbuild/buf/releases/download/$BUFVERSION/buf-$(uname -s)-$(uname -m) > buf
chmod a+x buf

- name: Download Buildifier
run: |
cd $HOME/oppia-android-tools
bash /home/runner/work/oppia-android/oppia-android/scripts/buildifier_download.sh

- name: Java lint check
run: |
bash /home/runner/work/oppia-android/oppia-android/scripts/checkstyle_lint_check.sh $HOME
Expand All @@ -63,6 +68,10 @@ jobs:
- name: Protobuf lint check
run: $HOME/oppia-android-tools/buf check lint --input=model/src/main/proto --input-config buf.yaml && echo "Protobuf lint check completed successfully"

- name: Bazel lint check
run: |
bash /home/runner/work/oppia-android/oppia-android/scripts/buildifier_lint_check.sh $HOME

robolectric_tests:
name: Robolectric Tests (Non-App Modules)
runs-on: ${{ matrix.os }}
Expand Down
4 changes: 2 additions & 2 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ android_binary(
manifest = "//app:src/main/AndroidManifest.xml",
manifest_values = {
"applicationId": "org.oppia.android",
"versionCode": "0",
"versionName": "0.1-alpha",
"minSdkVersion": "19",
"targetSdkVersion": "29",
"versionCode": "0",
"versionName": "0.1-alpha",
},
multidex = "native", # TODO(#1875): Re-enable legacy for optimized release builds.
deps = [
Expand Down
13 changes: 5 additions & 8 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
This file lists and imports all external dependencies needed to build Oppia Android.
"""

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:jvm.bzl", "jvm_maven_import_external")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("//third_party:versions.bzl", "HTTP_DEPENDENCY_VERSIONS", "get_maven_dependencies")

# Android SDK configuration. For more details, see:
Expand Down Expand Up @@ -41,12 +40,10 @@ kotlin_repositories()

kt_register_toolchains()

"""
The proto_compiler and proto_java_toolchain bindings load the protos rules needed for the model
module while helping us avoid the unnecessary compilation of protoc. Referecences:
- https://github.com/google/startup-os/blob/5f30a62/WORKSPACE#L179-L187
- https://github.com/bazelbuild/bazel/issues/7095
"""
# The proto_compiler and proto_java_toolchain bindings load the protos rules needed for the model
# module while helping us avoid the unnecessary compilation of protoc. Referecences:
# - https://github.com/google/startup-os/blob/5f30a62/WORKSPACE#L179-L187
# - https://github.com/bazelbuild/bazel/issues/7095

bind(
name = "proto_compiler",
Expand Down
Loading