Skip to content

Commit

Permalink
Fix part of #59: Adding Bazel build to CI checks [BLOCKED: #1634] (#1688
Browse files Browse the repository at this point in the history
)

* Fixed the duplicate google-services.json issue

* Created Issue and added TODO

* Translated ViewBindingAdapter

* Added minSDK back

* Alphabetized dependencies

* Fixed firebase target

* Trying to fix StateRetreiverTest

* Binding Adapter files are building with Gradle!

* Fixed ktlint violation

* Revert "Deleted kotlin binding adapters"

This reverts commit 84037cb.

* Revert "Translated GuidelineBindingAdapter"

This reverts commit ce92d0a.

* Revert "Translated StateAssemblerMarginBindingAdapters"

This reverts commit 88c9492.

* Revert "Translated StateAssemblerPaddingBindingAdapters"

This reverts commit d66af07.

* Git mv on DrawableBindingAdapters

* Translated DrawableBindingAdapters

* Deleted java files

* Translated EditTextBA and GuidelineBA

* Translated ImageViewBA

* Added missing semicolon

* Translated MarginBindingAdapters

* Translated State AssemblerMarginBA

* Translated StateAssemblerPaddingBA

* Translated TextViewBA

* Revert "Translated TextViewBA"

This reverts commit 849549d.

* Changed targetSdk to 28

* Revert "Revert "Translated TextViewBA""

This reverts commit 6cfa75d.

* Fixed formatting issues and changed NotNull to NonNull

* Refactored GuidelineBindingAdapter to be GuidelineBindingAdapters

* Fixed some double space errors and other typos

* Added missing ViewBindingAdapter

* Deleted extra spaces and fixed more nit issues

* Made all classes final

* Added top level documentation

* Reformatted some comments to fit java style

* Reformatted imports

* Created Issue and added TODOs for re-restricitng access

* Added min and target SDK to domain manifest

* Added documentation comment

* Deleted unused domain_tests library

* Revert "Deleted unused domain_tests library"

This reverts commit 65e71cc.

* Removed unused domain)tests library

* Annotations and helpers library builds

* Listeners library builds

* View models build

* Views now build

* Added documentation comments

* Started removing binding dependencies from views

* Removed fragment imports used only for comments in order to build view files

* Pulled binding dependenvy out of ConceptCardViewModel

* Edited R import statements for Bazel to build

* Fixed more errors, view_model builds

* Worked through more errors

* Added a dependency

* View library builds

* Ordered BUILD file for better merging

* Both databinding adapters and recyclerview adapters are building

* Starting writing databinding resources library

* Removed unused listeners

* Added missing comments

* Formatted files and added missing @nonnull annotations

* Fixed ktlint errors

* Revert "Formatted files and added missing @nonnull annotations"

This reverts commit 84b6125.

* Added genrule for viewmodel files

* Added view genrule

* Both Bazel and Gradle are building

* Fixed ktlint errors

* Delete vcs.xml

* Renamed files, deleted unused files, and added some documentation

* Improved implementation of some functions in ViewBindingShimImpl and added documentation

* Fixed ktlint errors

* Put genrules in a loop, created issue to remove genrules post-gradle and added TODO

* Added more documentation, created an issue to remove shim files, added TODO

* Fixed Gradle build error

* Added documentation, created an issue, added a TODO

* Formatted single line comments

* Fixing more nits

* Fixed more nits.

* Fixed getTimeAgo() function

* Suppressed warning in bindToRecyclerViewAdapter

* Builds in both Bazel and Gradle

* Added comments to BUILD file

* Fixed profile_chooser_profile_view error

* Fixed profile_chooser_add_view

* Fixed walthrough_final_fragment error

* Fixed profile_chooser_fragment error

* Fixed walthrough_activity error

* Fixed onboarding_fragment error

* Fixed audio_fragment error

* Fixed unused presnter errors, databining resources now build

* Builds with Gradle

* Fixed WalkthroughWelcomeFragmentPresenter to not contain unnecessary methods bc of interface

* Removed unnecessary method from WalkthroughActivity

* Removed the need for ProfileChooserListener, added comments to WalkthroughListeners

* Genrule is working

* Simplified genrule

* Alphabetized lists in app module BUILD

* Quick cleanup, added missing documentation

* App library is building with Bazel

* Added Retrofit+Gson dependency for NetworkModule to build with Gradle

* Binary builds

* Started debugging runtime errors

* Fixed domain BUILD

* Added genrule comments, simplified gnerule targets in lists

* Fixed QuestionPlayerFragmentPresenter and StateFragmentPresenter

* Fixed QuestionPlayerViewModel & FRagmentPresenter as well as StateViewModel & FragmentPresenter

* Fixed some nits

* Fixed ktlint errors

* Added assets

* First test builds and passes

* Fixed DragDrop ViewBinding implementations, added modules to TestComponent

* Fix ktlint errors

* Fixed nits in TextViewBA

* Fixed Audio + Language test appearance bug

* Fixed ktlint errors

* Fixed ktlint error in FAQSingleActivityPresenter

* Fixed ktlin errors

* Cleaned up app BUILD file a bit

* Testing module tests now pass, all domain tests pass except StateRetreiver

* Removed unused dependencies, aplhabetized dependencies

* Fixed list formation

* Cleaned up BUILD

* Fixed nits

* Fixing some nits

* Refactored file names

* Altered walkthrough welcome fragment

* Renamed wasProfileEverBeenAddedValue to hasProfileEverBeenAddedValue

* Fixed ktlint error

* Removed unused dependencies and alphabetized them

* Deleted unused methods in ImageViewBA

* Removed data attribute from domain library

* Excluded DataBinderMapperImpl from Gradle build

* Most tests build and pass

* Started getting sharedTests to run

* All tests now build

* Fixed ktlint errors

* Fixed ktlint error

* Added missing TODOs

* Fixed merge errors

* Fixed nits

* Removed unnecessary field in StateFragmentAccessibilityTest

* Fixed StateFragmentAccessibilityTestFixed StateFragmentAccessibilityTestFixed StateFragmentAccessibilityTestFixed StateFragmentAccessibilityTestFixed StateFragmentAccessibilityTestFixed StateFragmentAccessibilityTestFixed StateFragmentAccessibilityTestFixed StateFragmentAccessibilityTestFixed StateFragmentAccessibilityTest

* Injected context in AppVersionViewModel

* Used lambda function to resolve issues with QuestionPlayerVM and QuestionPlayerFragmentPresenter

* Fixed small errors

* Fixed ktlint errors

* Removed Moshi dependency from NetworkModule

* Fixed ktlint error

* Fixing listener file naming

* Fixed NetworkModule issue by removing it from ApplicationComponent temporarily

* Restored NetworkModule, fixed some nits

* Fixed typo, deleted unused file, removed retrofit gradle dependencies

* Removed NetworkModule from test files, fixed nits, fixed enable_data_binding in oppia_android_test

* Fixing nits

* Fixed more nits

* Fixed StateFragmentPresenter and view model, fixed some nits

* Fixed ktlint errors

* Altered for loop to append directly to DATABINDING_ADAPTERS

* Created issue and added TODO for ApplicationComponent and NetworkModule

* Added TODOs to test files with NetworkModule removed, added documentation to DataBinderMapperImple, fixed nits

* Added documentations, fixed nits

* Fixed nits

* Fixed ktlint error

* Added documentation, fixed nits

* Added a few nits

* Removed unused imports

* Fixed nits

* Created issue, added TODO, updated docs

* Starting to put genrules into a macro

* Fixed documentation

* Added comment about binding adapters in Java

* Created test_with_resources and applied it to tests

* Fixed nits, created a PackageManagerHelper file

* Fixed nits

* Update app/src/main/java/org/oppia/app/utility/PackageManagerHelper.kt

Co-authored-by: Ben Henning <[email protected]>

* Fixed inject issue and nits

* Fixed typo

* Changed filename, included new file in Annotations library

* Fixed lint error

* Added bazel_build_app task to main.yml

* Test out GITHUB_WORKSPACE and HOME

* Using env PATH variables

* Added $GITHUB_WORKSPACE to android_tools command

* Fixed typo in build command

* Change from my repo to oppia's bazel repo

Co-authored-by: Ben Henning <[email protected]>

* Change Setup to Set up

Co-authored-by: Ben Henning <[email protected]>

* Collapse creating tmp/android_tools into extract android_tools

Co-authored-by: Ben Henning <[email protected]>

* Changed apk path to be absolute

* Made cp use absolute path

* Updated cp command

* Update main.yml

* Update main.yml

Co-authored-by: Ben Henning <[email protected]>
  • Loading branch information
miaboloix and BenHenning committed Aug 22, 2020
1 parent 3093921 commit e334605
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,42 @@ jobs:
with:
name: app reports
path: app/build/test-results


bazel_build_app:
name: Build Binary with Bazel
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04]
steps:
- uses: actions/checkout@v2
- name: Set up bazel
uses: jwlawson/actions-setup-bazel@v1
with:
bazel-version: '3.4.1'
- name: Clone Oppia Bazel
run: git clone https://github.com/oppia/bazel.git $HOME/oppia-bazel
- name: Set up JDK 9
uses: actions/setup-java@v1
with:
java-version: 9
- name: Extract Android Tools
run: |
mkdir -p $GITHUB_WORKSPACE/tmp/android_tools
cd $HOME/oppia-bazel
unzip bazel-tools.zip
tar -xf $HOME/oppia-bazel/android_tools.tar.gz -C $GITHUB_WORKSPACE/tmp/android_tools
- name: Unzip Bazel Binary and Build Oppia
run: |
cd $HOME/oppia-bazel
unzip bazel-build.zip
cd $GITHUB_WORKSPACE
chmod a+x $HOME/oppia-bazel/bazel
$HOME/oppia-bazel/bazel build //:oppia --android_databinding_use_v3_4_args --experimental_android_databinding_v2 --override_repository=android_tools=$GITHUB_WORKSPACE/tmp/android_tools --java_header_compilation=false --noincremental_dexing --define=android_standalone_dexing_tool=d8_compat_dx
cp $GITHUB_WORKSPACE/bazel-bin/oppia.apk /home/runner/work/oppia-android/oppia-android/
- uses: actions/upload-artifact@v2
with:
name: oppia-bazel-apk
path: /home/runner/work/oppia-android/oppia-android/oppia.apk
- uses: actions/checkout@v2

0 comments on commit e334605

Please sign in to comment.