Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/oppia/oppia-android into o…
Browse files Browse the repository at this point in the history
…ppia#4419

� Conflicts:
�	app/src/main/java/org/oppia/android/app/application/alphakenya/AlphaKenyaApplicationComponent.kt
�	app/src/main/java/org/oppia/android/app/application/alphakenya/BUILD.bazel
�	domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterAlphaKenyaModule.kt
�	utility/src/main/java/org/oppia/android/util/logging/BUILD.bazel
�	utility/src/main/java/org/oppia/android/util/logging/KenyaAlphaEventTypeToHumanReadableNameConverterImpl.kt
�	utility/src/test/java/org/oppia/android/util/logging/BUILD.bazel
  • Loading branch information
XichengSpencer committed Jun 18, 2024
2 parents cf295b9 + bde4eaf commit fcb57ef
Show file tree
Hide file tree
Showing 765 changed files with 21,835 additions and 24,373 deletions.
17 changes: 13 additions & 4 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
# Configurations for arguments that should automatically be added to Bazel commands.
# Configurations to ensure that Android-specific classes build correctly.
build --android_databinding_use_v3_4_args \
--experimental_android_databinding_v2 \
--java_header_compilation=false \
--noincremental_dexing \
--define=android_standalone_dexing_tool=d8_compat_dx \
--android_databinding_use_androidx

# Ensure that all builds use the same JDK for building & running (for better hermeticity and fewer
# inconsistencies across environment configurations).
build --java_runtime_version=remotejdk_11 --tool_java_runtime_version=remotejdk_11

# Ensure all built Java files treat warnings as errors (similar to the Kotlin configuration) to help
# reduce code smell & potential bugs during development.
build --javacopt="-Werror"

# Note that this doesn't stop 'Werror' from being passed above, but that shouldn't affect most of
# the Oppia Android-specific build.
build:ignore_build_warnings --//tools/kotlin:warn_mode=warning

# Show all test output by default (for better debugging).
test --test_output=all
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0.0
6.5.0
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ WORKSPACE @oppia/android-app-infrastructure-reviewers
.bazelrc @oppia/android-app-infrastructure-reviewers
.bazelversion @oppia/android-app-infrastructure-reviewers
/tools/android/ @oppia/android-app-infrastructure-reviewers
/tools/kotlin/ @oppia/android-app-infrastructure-reviewers

# Configurations for Bazel-built Android App Bundles.
/bundle_config.pb.json @oppia/android-dev-workflow-reviewers
Expand Down
29 changes: 8 additions & 21 deletions .github/actions/set-up-android-bazel-build-environment/action.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Contains common operations to set up a hermetic Android + Bazel build environment for Oppia
# Android CI workflows. Action prerequisites:
# - JDK 9 must be installed & set as the default version via JAVA_HOME
# - Bazel must be installed, in the path, and be version 4.0.0
# - JDK 11 must be installed & set as the default version via JAVA_HOME
# - Bazel must be installed, in the path, and be version 6.5.0

# TODO(#1861): Revert SDK pinning for improved CI performance once Bazel is sufficiently stable that
# we can rely on the automatic SDK provided by GitHub's CI environment.
Expand All @@ -19,20 +19,20 @@ runs:
$JAVA_HOME/bin/java -version
# Verify that the correct version of Java is installed.
java -version 2>&1 | grep -q -E "1.9|9.0"
java -version 2>&1 | grep -q -E "11.0"
HAS_CORRECT_JAVA_VERSION=$(echo $?)
if [[ "$HAS_CORRECT_JAVA_VERSION" == 1 ]] ; then
echo "Expected Java 9 to be installed"
echo "Expected Java 11 to be installed"
exit 1
fi
shell: bash

- name: Verify Bazel version
run: |
bazel --version | grep -q 4.0.0
bazel --version | grep -q 6.5.0
HAS_CORRECT_BAZEL_VERSION=$(echo $?)
if [[ "$HAS_CORRECT_JAVA_VERSION" == 1 ]] ; then
echo "Expected Bazel 4.0.0 to be installed"
echo "Expected Bazel 6.5.0 to be installed"
exit 1
fi
shell: bash
Expand Down Expand Up @@ -77,26 +77,13 @@ runs:
$ANDROID_HOME/cmdline-tools/tools/bin/sdkmanager --install "platforms;android-33"
shell: bash

- name: Install build tools 29.0.2
- name: Install build tools 32.0.0
run: |
$ANDROID_HOME/cmdline-tools/tools/bin/sdkmanager --install "build-tools;29.0.2"
shell: bash

- name: Configure Bazel to use JDK 9 for building
run: |
echo "build --java_language_version=9" >> $HOME/.bazelrc
$ANDROID_HOME/cmdline-tools/tools/bin/sdkmanager --install "build-tools;32.0.0"
shell: bash

- name: Configure Bazel to use specific sandbox tmpfs
run: |
echo "build --enable_platform_specific_config" >> $HOME/.bazelrc
echo "build:linux --sandbox_tmpfs_path=/tmp" >> $HOME/.bazelrc
shell: bash

- name: Set up Oppia Bazel Android Tools
run: |
mkdir $HOME/opensource
cd $HOME/opensource
git clone https://github.com/oppia/oppia-bazel-tools
echo build --override_repository=android_tools="$(cd "$(dirname "$HOME/opensource/oppia-bazel-tools")"; pwd)/$(basename "$HOME/opensource/oppia-bazel-tools")" >> $HOME/.bazelrc
shell: bash
30 changes: 15 additions & 15 deletions .github/workflows/build_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 9
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 9
java-version: 11

- name: Set up Bazel
uses: abhinavsingh/setup-bazel@v3
with:
version: 4.0.0
version: 6.5.0

- name: Set up build environment
uses: ./.github/actions/set-up-android-bazel-build-environment
Expand Down Expand Up @@ -168,15 +168,15 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 9
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 9
java-version: 11

- name: Set up Bazel
uses: abhinavsingh/setup-bazel@v3
with:
version: 4.0.0
version: 6.5.0

- name: Set up build environment
uses: ./.github/actions/set-up-android-bazel-build-environment
Expand Down Expand Up @@ -302,15 +302,15 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 9
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 9
java-version: 11

- name: Set up Bazel
uses: abhinavsingh/setup-bazel@v3
with:
version: 4.0.0
version: 6.5.0

- name: Set up build environment
uses: ./.github/actions/set-up-android-bazel-build-environment
Expand Down Expand Up @@ -449,15 +449,15 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 9
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 9
java-version: 11

- name: Set up Bazel
uses: abhinavsingh/setup-bazel@v3
with:
version: 4.0.0
version: 6.5.0

- name: Set up build environment
uses: ./.github/actions/set-up-android-bazel-build-environment
Expand Down Expand Up @@ -570,15 +570,15 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 9
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 9
java-version: 11

- name: Set up Bazel
uses: abhinavsingh/setup-bazel@v3
with:
version: 4.0.0
version: 6.5.0

- name: Set up build environment
uses: ./.github/actions/set-up-android-bazel-build-environment
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/issue_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Bazel
uses: abhinavsingh/setup-bazel@v3
with:
version: 4.0.0
version: 6.5.0

- name: TODO Issue Resolved Check
id: todoIssueResolvedCheck
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/static_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,10 @@ jobs:
- name: Create oppia android tools directory
run: mkdir -p $HOME/oppia-android-tools

# Java 11 is specifically needed for Checkstyle.
- name: Set up JDK 1.11
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 1.11
java-version: 11

- name: Download Checkstyle
run: |
Expand Down Expand Up @@ -104,7 +103,7 @@ jobs:
- name: Set up Bazel
uses: abhinavsingh/setup-bazel@v3
with:
version: 4.0.0
version: 6.5.0

- uses: actions/cache@v2
id: scripts_cache
Expand Down Expand Up @@ -196,7 +195,7 @@ jobs:
- name: Set up Bazel
uses: abhinavsingh/setup-bazel@v3
with:
version: 4.0.0
version: 6.5.0

- name: Maven Repin Check
if: always()
Expand Down
Loading

0 comments on commit fcb57ef

Please sign in to comment.