Skip to content

Commit

Permalink
Merge branch 'main' of github.com:KovalevAndrey/appyx into shared-ele…
Browse files Browse the repository at this point in the history
…ment-prototype-copy
  • Loading branch information
KovalevAndrey committed Jan 7, 2025
2 parents 9909b89 + cc59b35 commit f7d86d3
Show file tree
Hide file tree
Showing 68 changed files with 395 additions and 2,670 deletions.
21 changes: 5 additions & 16 deletions .github/workflows/build.yml → .github/workflows/build_1.x.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Build
name: Build_1.x

on:
push:
branches:
- 1.x
- 2.x
pull_request:
branches:
- 1.x
workflow_dispatch:

env:
Expand Down Expand Up @@ -119,26 +120,14 @@ jobs:
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: |
adb uninstall "com.bumble.appyx.core.test"
adb uninstall "com.bumble.appyx.interop.ribs.test"
adb shell pm list packages -3 | cut -f 2 -d ":" | while read package; do if [ "$package" = "com.bumble.appyx.sample.navigation.compose.test" ] || [ "$package" = "com.bumble.appyx.core.test" ] || [ "$package" = "com.bumble.appyx.interop.ribs.test" ] || [ "$package" = "com.bumble.appyx.sample.navigtion.compose.test" ]; then adb uninstall $package; fi; done
adb logcat > logcat.out &
./gradlew connectedCheck
- name: Upload failed instrumentation artifacts
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: instrumentation-failures
path: |
**/build/reports
logcat.out
check-documentation:
name: Check documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- run: pip install mkdocs-material
- run: mkdocs build --strict
163 changes: 163 additions & 0 deletions .github/workflows/build_2.x.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
name: Build_2.x

on:
push:
branches:
- 2.x
pull_request:
branches:
- 2.x
workflow_dispatch:

env:
MAIN_BRANCH: ${{ github.ref == 'refs/heads/1.x' || github.ref == 'refs/heads/2.x' }}

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- uses: gradle/wrapper-validation-action@v2
- uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: ${{ env.MAIN_BRANCH != 'true' }}
- name: Build
run: >
./gradlew
buildNonMkdocs
projectHealth
mergeLintSarif
mergeDetektSarif
:plugins:buildPlugins
--continue
- name: Deploy snapshot
if: env.MAIN_BRANCH == 'true' && github.repository == 'bumble-tech/appyx'
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
run: >
./gradlew
publishAllPublicationsToSonatypeSnapshotRepository
-Psnapshot=true
--no-parallel
-Psigning.password=${{ secrets.SIGNING_PASSWORD }}
-Psonatype.username=${{ secrets.SONATYPE_USERNAME }}
-Psonatype.password=${{ secrets.SONATYPE_PASSWORD }}
- uses: github/codeql-action/upload-sarif@v3
if: success() || failure()
with:
sarif_file: build/lint-merged.sarif
category: lint
- uses: github/codeql-action/upload-sarif@v3
if: success() || failure()
with:
sarif_file: build/detekt-merged.sarif
category: detekt
- name: Upload failure artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: reports
path: |
**/build/reports/
!**/build/reports/dependency-analysis/
publication-verification:
name: Publication verification
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- uses: gradle/wrapper-validation-action@v2
- uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: ${{ env.MAIN_BRANCH != 'true' }}
- name: Check publication setup
run: >
./gradlew
publishAllPublicationsToOSSRHRepository
publishAllPublicationsToSonatypeSnapshotRepository
--dry-run
--no-parallel
- name: Publish locally
run: ./gradlew publishToMavenLocal -Psigning.required=false --no-parallel --continue

instrumentation-tests:
name: Instrumentation tests
runs-on: macOS-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- uses: gradle/wrapper-validation-action@v2
- uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: ${{ env.MAIN_BRANCH != 'true' }}
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Package Debug Android Test
# Flags from https://github.com/android/nowinandroid/blob/main/.github/workflows/Build.yaml
run: ./gradlew packageDebugAndroidTest
- name: Instrumentation tests
# Flags from https://github.com/android/nowinandroid/blob/main/.github/workflows/Build.yaml
run: >
adb logcat > logcat.out &
./gradlew cleanManagedDevices --unused-only &&
./gradlew uiTestsDeviceDebugAndroidTest
-Dorg.gradle.workers.max=1
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
-Dorg.gradle.jvmargs=-Xmx2048m
- name: Upload failed instrumentation artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: instrumentation-failures
path: |
**/build/reports
logcat.out
screenshot-tests:
name: Screenshot tests
runs-on: macOS-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- uses: gradle/wrapper-validation-action@v2
- uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: ${{ env.MAIN_BRANCH != 'true' }}
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Screenshot tests
# Flags from https://github.com/android/nowinandroid/blob/main/.github/workflows/Build.yaml
run: >
adb logcat > logcat.out &
./gradlew cleanManagedDevices --unused-only &&
./gradlew screenshotTestsCompareBaseline
-Dorg.gradle.workers.max=1
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
- name: Upload failed screenshot artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: screenshot-failures
path: |
**/build/reports
**/build/outputs/managed_device_android_test_additional_output
logcat.out
33 changes: 33 additions & 0 deletions .github/workflows/check_documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Check Documentation

on:
pull_request:
branches:
- documentation
types: [opened, synchronize, reopened]

jobs:
check-documentation:
name: Check documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- uses: gradle/wrapper-validation-action@v2
- uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: ${{ env.MAIN_BRANCH != 'true' }}
- name: Generate distributions
run: ./gradlew wasmJsBrowserDistributionMkdocs --continue
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- run: pip install mkdocs-material
- run: pip install mkdocs-macros-plugin
- run: pip install mkdocs-redirects
- run: pip install mkdocs-include-markdown-plugin
- run: pip install pillow cairosvg
- run: mkdocs build --strict
31 changes: 31 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Deploy mkdocs to GitHub Pages

on:
push:
branches:
- documentation
workflow_dispatch:

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- uses: gradle/wrapper-validation-action@v2
- uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: ${{ env.MAIN_BRANCH != 'true' }}
- run: pip install mkdocs-material
- run: pip install mkdocs-macros-plugin
- run: pip install mkdocs-redirects
- run: pip install mkdocs-include-markdown-plugin
- run: pip install pillow cairosvg
- run: mkdocs gh-deploy --force
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*.iml
.gradle
.idea
.kotlin
/local.properties
/.idea/caches
/.idea/libraries
Expand Down
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@

## Pending changes

- [#701](https://github.com/bumble-tech/appyx/pull/701)**Added**: Shared element transition and movable content support
- [#719](https://github.com/bumble-tech/appyx/pull/719)**Updated**: Jetpack Compose to 1.7.6
- [#720](https://github.com/bumble-tech/appyx/pull/720)**Added**: Shared element transition and movable content support

## 1.5.1

- [#705](https://github.com/bumble-tech/appyx/pull/705)**Fixed**: ChildAware extension functions now allow Any type as a parameter
- [#716](https://github.com/bumble-tech/appyx/pull/716)**Updated**: Kotlin (2.0.20), Compose Compiler (now implicit from Kotlin), Coroutines (1.9.0-RC.2), AGP (8.5.2), numerous Androidx libs
- [#718](https://github.com/bumble-tech/appyx/pull/718)**Added**: Introduced global plugins for all nodes and added [GlobalNodeLifecycleAware] which is contains the node in the callback.

<div style="text-align: center"><small>18 Nov 2024</small></div>

---

Expand Down
31 changes: 27 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import com.android.Version
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile

buildscript {
repositories {
Expand All @@ -17,6 +21,7 @@ plugins {
id("com.autonomousapps.dependency-analysis") version libs.versions.dependencyAnalysis.get()
id("release-dependencies-diff-compare")
id("release-dependencies-diff-create") apply false
alias(libs.plugins.compose.compiler) apply false
}

dependencyAnalysis {
Expand Down Expand Up @@ -85,12 +90,30 @@ tasks.register("clean", Delete::class) {
delete(rootProject.buildDir)
}

// TODO: Enable K2 in a later PR
tasks.withType(KotlinJvmCompile::class.java).configureEach {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_11)
apiVersion.set(KotlinVersion.KOTLIN_1_9)
languageVersion.set(KotlinVersion.KOTLIN_1_9)
}
}

allprojects {
configurations.all {
resolutionStrategy.dependencySubstitution {
substitute(module("com.bumble.appyx:customisations"))
.using(project(":libraries:customisations"))
.because("RIBs uses Appyx customisations as external dependency")
resolutionStrategy {
failOnNonReproducibleResolution()
dependencySubstitution {
substitute(module("com.bumble.appyx:customisations"))
.using(project(":libraries:customisations"))
.because("RIBs uses Appyx customisations as external dependency")
}
eachDependency {
when (requested.group) {
// Version 1.0 and 1.1 are included which cause ':libraries:core' espresso tests to fail
"androidx.tracing" -> useVersion(libs.versions.androidx.tracing.get())
}
}
}
}
}
Expand Down
Loading

0 comments on commit f7d86d3

Please sign in to comment.