Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/actions/buildnative/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ runs:
shell: bash
run: |
if [[ "$RUNNER_ARCH" == "ARM64" ]]; then
echo "JAVA_HOME_11=$JAVA_HOME_11_ARM64" >> $GITHUB_ENV
echo "JAVA_HOME_21=$JAVA_HOME_21_ARM64" >> $GITHUB_ENV
else
echo "JAVA_HOME_11=$JAVA_HOME_11_X64" >> $GITHUB_ENV
echo "JAVA_HOME_21=$JAVA_HOME_21_X64" >> $GITHUB_ENV
fi

- uses: actions/cache@6f8efc29b200d32929f49075959781ed54ec270c # v3.5.0
Expand Down
16 changes: 4 additions & 12 deletions .github/actions/environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ runs:
shell: bash
run: sudo xcode-select --switch /Applications/Xcode_26.2.app

# Java 17 is needed for Android SDK setup step
- name: Install Java 17
# Java 21 is needed by .NET Android
- name: Install Java 21
if: ${{ !matrix.container }}
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: ${{ runner.os == 'Windows' && runner.arch == 'ARM64' && 'microsoft' || 'temurin' }}
java-version: '17'
distribution: temurin
java-version: '21'

- name: Setup Android SDK
if: ${{ !matrix.container }}
Expand All @@ -66,14 +66,6 @@ runs:
packages: platform-tools platforms;android-35 platforms;android-36 build-tools;36.0.0
log-accepted-android-sdk-licenses: false

# Java 11 is needed by .NET Android
- name: Install Java 11
if: ${{ !matrix.container }}
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: ${{ runner.os == 'Windows' && runner.arch == 'ARM64' && 'microsoft' || 'temurin' }}
java-version: '11'

- name: Install Mono (macOS)
if: runner.os == 'macOS'
shell: bash
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/device-tests-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,11 @@ jobs:
- name: Setup Environment
uses: ./.github/actions/environment

- name: Select Java 17
- name: Select Java 21
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: ${{ runner.os == 'Windows' && runner.arch == 'ARM64' && 'microsoft' || 'temurin' }}
java-version: '17'
distribution: temurin
java-version: '21'

- name: Checkout github-workflows
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand Down
10 changes: 5 additions & 5 deletions lib/sentry-android-supplemental/build.cmd
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@echo off
setlocal

rem this should point at JDK 11 (required for Android)
if "%JAVA_HOME_11%" == "" set JAVA_HOME_11=C:\Program Files\Microsoft\jdk-11.0.15.10-hotspot
rem this should point at JDK 21 (required for Android)
if "%JAVA_HOME_21%" == "" set JAVA_HOME_21=C:\Program Files\Eclipse Adoptium\jdk-21

echo Starting Java Build
echo Using Java SDK at %JAVA_HOME_11%
echo Using Java SDK at %JAVA_HOME_21%
pushd %~dp0

rem clear and recreate the output directories
Expand All @@ -15,11 +15,11 @@ mkdir obj
mkdir bin

rem compile the Java file(s)
"%JAVA_HOME_11%\bin\javac" -verbose -d ./obj *.java
"%JAVA_HOME_21%\bin\javac" -verbose -d ./obj *.java

rem build the Jar
cd obj
"%JAVA_HOME_11%\bin\jar" -cvf ..\bin\sentry-android-supplemental.jar *
"%JAVA_HOME_21%\bin\jar" -cvf ..\bin\sentry-android-supplemental.jar *

popd
echo Java Build Complete
12 changes: 6 additions & 6 deletions lib/sentry-android-supplemental/build.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/bash

# this should point at JDK 11 (required for Android)
if [ -z "${JAVA_HOME_11}" ]; then
echo "Error: 'JAVA_HOME_11' is not set. Please set 'JAVA_HOME_11' to the path of JDK 11 (required for Android)." >&2
# this should point at JDK 21 (required for Android)
if [ -z "${JAVA_HOME_21}" ]; then
echo "Error: 'JAVA_HOME_21' is not set. Please set 'JAVA_HOME_21' to the path of JDK 21 (required for Android)." >&2
exit 1
fi

echo "Starting Java Build"
echo "Using Java SDK at $JAVA_HOME_11"
echo "Using Java SDK at $JAVA_HOME_21"
pushd "$(dirname "$0")" > /dev/null

# create the output directories if they don't exist
Expand All @@ -18,11 +18,11 @@ mkdir -p bin
find obj bin -mindepth 1 -delete

# compile the Java file(s)
"$JAVA_HOME_11/bin/javac" -verbose -d ./obj *.java
"$JAVA_HOME_21/bin/javac" -verbose -d ./obj *.java

# build the Jar
cd obj
"$JAVA_HOME_11/bin/jar" -cvf ../bin/sentry-android-supplemental.jar *
"$JAVA_HOME_21/bin/jar" -cvf ../bin/sentry-android-supplemental.jar *

popd > /dev/null
echo "Java Build Complete"
Loading