Skip to content

Commit

Permalink
build: fix CI (#832)
Browse files Browse the repository at this point in the history
  • Loading branch information
timbru31 committed Aug 27, 2024
1 parent 58cfd40 commit 332c74d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/smoke-test-ubuntu-ionic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ jobs:
steps:
- uses: actions/checkout@v4.1.6

- name: set up JDK 11
- name: Setup JDK 11
uses: actions/setup-java@v4.2.1
with:
distribution: "temurin"
java-version: 11

- uses: actions/setup-node@v4.0.2
- name: Setup Node.js
uses: actions/setup-node@v4.0.2
with:
node-version: 18

Expand All @@ -35,6 +36,7 @@ jobs:
- name: Setup Project
run: |
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "build-tools;30.0.3"
npm i -g cordova @ionic/cli
ionic start lottie-smoke-test tabs --cordova --type angular --no-interactive --no-confirm
cd lottie-smoke-test
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/smoke-test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ jobs:
steps:
- uses: actions/checkout@v4.1.6

- name: set up JDK 11
- name: Setup JDK 11
uses: actions/setup-java@v4.2.1
with:
distribution: "temurin"
java-version: 11

- uses: actions/setup-node@v4.0.2
- name: Setup Node.js
uses: actions/setup-node@v4.0.2
with:
node-version: 18

Expand All @@ -32,6 +33,11 @@ jobs:
npm --version
java -version
- name: Setup Android Build Tools
shell: cmd
run: |
"%ANDROID_HOME%\cmdline-tools\latest\bin\sdkmanager" "build-tools;30.0.3"
- name: Setup Project
run: |
npm i -g cordova
Expand Down
13 changes: 6 additions & 7 deletions src/android/LottieSplashScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,11 @@ class LottieSplashScreen : CordovaPlugin() {

animationView.scaleType =
ImageView.ScaleType.valueOf(
preferences.getString(
"LottieScaleType",
"FIT_CENTER",
).uppercase(Locale.ENGLISH),
preferences
.getString(
"LottieScaleType",
"FIT_CENTER",
).uppercase(Locale.ENGLISH),
)

val color =
Expand Down Expand Up @@ -327,9 +328,7 @@ class LottieSplashScreen : CordovaPlugin() {
}
}

private fun convertPixelsToDp(px: Double): Int {
return (px * webView.context.resources.displayMetrics.density).toInt()
}
private fun convertPixelsToDp(px: Double): Int = (px * webView.context.resources.displayMetrics.density).toInt()

private fun dismissDialog(callbackContext: CallbackContext? = null) {
val fadeDuration = preferences.getInteger("LottieFadeOutDuration", 0)
Expand Down

0 comments on commit 332c74d

Please sign in to comment.