Skip to content

Commit

Permalink
Merge branch 'release/v1.2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
mshdabiola committed Nov 29, 2024
2 parents b65836f + ee0546f commit c8fe77b
Show file tree
Hide file tree
Showing 212 changed files with 53,469 additions and 6,989 deletions.
70 changes: 33 additions & 37 deletions .github/workflows/Build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ jobs:
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
java-version: 21

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
Expand Down Expand Up @@ -111,9 +111,13 @@ jobs:
disable_globbing: true
commit_message: "🤖 Updates screenshots"

# Run local tests after screenshot tests to avoid wrong UP-TO-DATE. TODO: Ignore screenshots.
- name: Run local tests and create report
if: always()
run: ./gradlew jvmTest
# Replace task exclusions with `-Pandroidx.baselineprofile.skipgeneration` when
# https://android-review.googlesource.com/c/platform/frameworks/support/+/2602790 landed in a
# release build

- name: Build all build type and flavor permutations
run: ./gradlew assembleFossReliant :benchmarks:assembleFossReliant
Expand Down Expand Up @@ -148,6 +152,31 @@ jobs:
- name: Check badging
run: ./gradlew checkFossReliantReleaseBadging

- name: Generate coverage reports for Jvm
run: ./gradlew koverXmlReportJvm; ./gradlew koverHtmlReportJvm #koverHtmlReportJvm

# - name: Add coverage report to PR
# id: kover
# uses: mi-kas/kover-report@v1
# with:
# path: |
# ${{ github.workspace }}/modules/analytics/build/reports/kover/reportJvm.xml
#
# title: Code Coverage
# update-comment: true
# min-coverage-overall: 40
# min-coverage-changed-files: 60
# token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload local coverage reports (XML + HTML) (only API 30)
uses: actions/upload-artifact@v4
with:
name: coverage-reports
if-no-files-found: error
compression-level: 1
overwrite: false
path: '**/build/reports/kover/'

androidTest:
runs-on: ubuntu-latest
timeout-minutes: 55
Expand Down Expand Up @@ -187,7 +216,7 @@ jobs:
java-version: 17

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
Expand All @@ -203,42 +232,9 @@ jobs:
heap-size: 600M
script: ./gradlew connectedFossReliantDebugAndroidTest --daemon

- name: Run local tests (including Roborazzi) for the combined coverage report (only API 30)
if: matrix.api-level == 30
# There is no need to verify Roborazzi tests to generate coverage.
run: ./gradlew testFossReliantDebugUnitTest -Proborazzi.test.verify=false # Add Prod if we ever add JVM tests for prod

# Add `createProdDebugUnitTestCoverageReport` if we ever add JVM tests for prod
- name: Generate coverage reports for Debug variants (only API 30)
if: matrix.api-level == 30
run: ./gradlew createFossReliantDebugCombinedCoverageReport

- name: Upload test reports
if: always()
uses: actions/upload-artifact@v4
with:
name: test-reports-${{ matrix.api-level }}
path: '**/build/reports/androidTests'

- name: Display local test coverage (only API 30)
if: matrix.api-level == 30
id: jacoco
uses: madrapps/jacoco-report@v1.6.1
with:
title: Combined test coverage report
min-coverage-overall: 40
min-coverage-changed-files: 60
paths: |
${{ github.workspace }}/**/build/reports/jacoco/**/*Report.xml
token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload local coverage reports (XML + HTML) (only API 30)
if: matrix.api-level == 30
uses: actions/upload-artifact@v4
with:
name: coverage-reports
if-no-files-found: error
compression-level: 1
overwrite: false
path: '**/build/reports/jacoco/'

Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v2
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 17
distribution: 'zulu'
java-version: 21

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
Expand All @@ -28,7 +28,7 @@ jobs:
run: ./gradlew createReleaseDistributable

- name: Run Conveyor
uses: hydraulic-software/conveyor/actions/build@v14.3
uses: hydraulic-software/conveyor/actions/build@v15.1
env:
TOKEN: ${{ secrets.TOKEN }}
with:
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/deploy_foss_to_github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ jobs:
runs-on: ubuntu-latest
steps:
# 1
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
java-version: 21
# 2

- name: Setup Android SDK
Expand All @@ -26,7 +27,7 @@ jobs:
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager --licenses || true

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/deploy_play_to_github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ jobs:
runs-on: ubuntu-latest
steps:
# 1
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
java-version: 21
# 2

- name: Setup Android SDK
Expand All @@ -26,7 +27,7 @@ jobs:
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager --licenses || true

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4
with:
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/generate_baselineprofile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ jobs:
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
java-version: 21

- name: Install GMD image for baseline profile generation
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager "system-images;android-33;aosp_atd;x86_64"
Expand All @@ -49,13 +49,14 @@ jobs:
-Pandroid.experimental.testOptions.managedDevices.maxConcurrentDevices=1

- name: Create Pull Request
uses: peter-evans/create-pull-request@v6.1.0
uses: peter-evans/create-pull-request@v7.0.5
with:
commit-message: Update baseline
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
author: ${{ github.actor }} <${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: generate-baseline
base: develop
delete-branch: true
title: 'Generate Baseline'
body: |
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/web.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Web CI

on:
push:
tags:
- 'w[0-9]+.[0-9]+.[0-9]+'

jobs:
build:

runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21

- name: kotlinUpgradeYarnLock
run: ./gradlew kotlinUpgradeYarnLock


- name: Build web app
run: ./gradlew wasmJsBrowserDistribution

# If main branch update, deploy to gh-pages
- name: Deploy
# if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@v4.6.9
with:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
BRANCH: gh-web # The branch the action should deploy to.
FOLDER: composeApp/build/dist/wasmJs/productionExecutable # The folder the action should deploy.
CLEAN: true # Automatically remove deleted files from the deploy branch
21 changes: 21 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Security Policy

## Supported Versions

Use this section to tell people about which versions of your project are
currently being supported with security updates.

| Version | Supported |
| ------- | ------------------ |
| 5.1.x | :white_check_mark: |
| 5.0.x | :x: |
| 4.0.x | :white_check_mark: |
| < 4.0 | :x: |

## Reporting a Vulnerability

Use this section to tell people how to report a vulnerability.

Tell them where to go, how often they can expect to get an update on a
reported vulnerability, what to expect if the vulnerability is accepted or
declined, etc.
34 changes: 17 additions & 17 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ plugins {

id("mshdabiola.android.application")
id("mshdabiola.android.application.compose")
id("mshdabiola.android.application.jacoco")
id("mshdabiola.android.application.flavor")
alias(libs.plugins.conveyor)
alias(libs.plugins.baselineprofile)
Expand Down Expand Up @@ -43,13 +42,8 @@ dependencies {
debugImplementation(libs.androidx.compose.ui.testManifest)


// testImplementation(projects.modules.testing)
// testImplementation(libs.androidx.work.testing)
androidTestImplementation(projects.modules.testing)
// androidTestImplementation("androidx.startup:startup-runtime:1.1.1")
// androidTestImplementation(libs.androidx.test.espresso.core)
androidTestImplementation(libs.androidx.navigation.testing)
// androidTestImplementation(libs.androidx.compose.ui.test)

baselineProfile(projects.benchmarks)

Expand Down Expand Up @@ -84,6 +78,7 @@ kotlin {

}
commonMain.dependencies {
//
implementation(libs.koin.core)

implementation(projects.modules.designsystem)
Expand All @@ -92,15 +87,19 @@ kotlin {
implementation(projects.modules.model)
implementation(projects.modules.analytics)


implementation(projects.features.main)
implementation(projects.features.detail)
implementation(projects.features.setting)

// Logger
implementation(libs.kermit)

implementation(libs.kermit.koin)

implementation(libs.androidx.compose.material3.adaptive)
implementation(libs.androidx.compose.material3.adaptive.layout)
implementation(libs.androidx.compose.material3.adaptive.navigation)


}

Expand All @@ -109,20 +108,14 @@ kotlin {
implementation(libs.kotlinx.coroutines.swing)

}
commonTest.dependencies {

jvmTest.dependencies {
implementation(projects.modules.testing)
}
// targets.all {
// compilations.all {
// compilerOptions.configure {
// freeCompilerArgs.add("-Xexpect-actual-classes")
// }
// }
// }

}
}


android {

sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
Expand Down Expand Up @@ -158,7 +151,7 @@ android {
// To publish on the Play store a private signing key is required, but to allow anyone
// who clones the code to sign and run the release variant, use the debug signing key.
// TODO: Abstract the signing configuration to a separate file to avoid hardcoding this.
// signingConfig = signingConfigs.getByName("debug")
// signingConfig = signingConfigs.getByName("debug")
// Ensure Baseline Profile is fresh for release builds.
baselineProfile.automaticGenerationDuringBuild = true
}
Expand Down Expand Up @@ -198,6 +191,7 @@ compose.desktop {
obfuscate.set(true)
version.set("7.4.2")
}

}


Expand All @@ -210,6 +204,12 @@ configurations.all {
}
}


configurations.configureEach {
exclude("androidx.window.core", "window-core")
}


baselineProfile {
// Don't build on every iteration of a full assemble.
// Instead enable generation directly for the release build variant.
Expand Down
Loading

0 comments on commit c8fe77b

Please sign in to comment.