diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 536fc9cf6..dd377961e 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -10,7 +10,7 @@ _Provide a description of the implementation. A list of steps would be ideal._ ### ☑️ Checks - [ ] I updated the documentation, including readmes and wikis. If this is a breaking change, update [UPGRADING.md](../UPGRADING.md) to inform users how to proceed. If no updates are necessary, indicate so. - [ ] Tested with dark mode. -- [ ] Tested with API 23. +- [ ] Tested with API 21. ### :test_tube: How can I test this? _If it cannot be tested explain why._ diff --git a/.github/workflows/catalog.yml b/.github/workflows/catalog.yml index 39bcf77f5..13b79c534 100644 --- a/.github/workflows/catalog.yml +++ b/.github/workflows/catalog.yml @@ -8,16 +8,22 @@ jobs: catalog: runs-on: ubuntu-latest steps: - - name: Check pull request status - if: "!github.event.pull_request.merged == true" - run: 'echo "Skipping generation, pull request is not merged"' + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + distribution: 'temurin' + java-version: '17' - - name: Checkout repo - if: github.event.pull_request.merged == true - uses: actions/checkout@v2 + - name: Check pull request status + if: "!github.event.pull_request.merged == true" + run: 'echo "Skipping generation, pull request is not merged"' - - name: Publish catalog - if: github.event.pull_request.merged == true - env: - APPCENTER_API_TOKEN: ${{ secrets.APPCENTER_API_TOKEN }} - run: 'bash ./gradlew clean check appCenterAssembleAndUploadDebug -Dappcenter_app_name=Mistica' + - name: Checkout repo + if: github.event.pull_request.merged == true + uses: actions/checkout@v2 + + - name: Publish catalog + if: github.event.pull_request.merged == true + env: + APPCENTER_API_TOKEN: ${{ secrets.APPCENTER_API_TOKEN }} + run: 'bash ./gradlew clean check appCenterAssembleAndUploadDebug -Dappcenter_app_name=Mistica' diff --git a/.github/workflows/compare_screenshots.yml b/.github/workflows/compare_screenshots.yml index aeb5dba0c..9e5b1bdaa 100644 --- a/.github/workflows/compare_screenshots.yml +++ b/.github/workflows/compare_screenshots.yml @@ -10,6 +10,12 @@ jobs: runs-on: ubuntu-latest steps: + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + distribution: 'temurin' + java-version: '17' + - name: Checkout repo uses: actions/checkout@v3 diff --git a/.github/workflows/debug_catalog.yml b/.github/workflows/debug_catalog.yml index b87763d12..c5d155975 100644 --- a/.github/workflows/debug_catalog.yml +++ b/.github/workflows/debug_catalog.yml @@ -15,13 +15,19 @@ jobs: debug-catalog: runs-on: ubuntu-latest steps: + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + distribution: 'temurin' + java-version: '17' + - name: Checkout repo uses: actions/checkout@v3 - name: Publish catalog env: APPCENTER_API_TOKEN: ${{ secrets.APPCENTER_API_TOKEN }} - run: 'bash ./gradlew clean check appCenterAssembleAndUploadDebug -Dappcenter_app_name=Mistica-Catalog -Dappcenter_notify=false + run: 'bash ./gradlew clean appCenterAssembleAndUploadDebug -Dappcenter_app_name=Mistica-Catalog -Dappcenter_notify=false -Dappcenter_notes="Testing catalog for PR #${{ github.event.number }} ${{ github.sha }}"' - name: Get version ID diff --git a/.github/workflows/import-design-tokens.yml b/.github/workflows/import-design-tokens.yml index e68cd3e43..9473280e2 100644 --- a/.github/workflows/import-design-tokens.yml +++ b/.github/workflows/import-design-tokens.yml @@ -10,6 +10,12 @@ jobs: import-design-tokens: runs-on: ubuntu-latest steps: + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + distribution: 'temurin' + java-version: '17' + - uses: actions/checkout@v3 - name: Checkout mistica-design repo with the tokens diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3ba6c5c1e..83d44aee0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,6 +6,12 @@ jobs: promote: runs-on: ubuntu-latest steps: + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + distribution: 'temurin' + java-version: '17' + - name: Checkout repo uses: actions/checkout@v2 diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 721628a01..cc075908e 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -9,6 +9,12 @@ jobs: snapshot: runs-on: ubuntu-latest steps: + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + distribution: 'temurin' + java-version: '17' + - name: Checkout repo uses: actions/checkout@v2 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 43ed910e8..3a97306d6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,19 +8,23 @@ concurrency: jobs: tests: - runs-on: self-hosted-novum + runs-on: ubuntu-latest steps: - - name: Checkout repo - uses: actions/checkout@v2 - - - name: "Build Android project" - uses: docker://docker.tuenti.io/android/novum_android_api31:2 - with: - args: 'bash ./gradlew clean check assemble' + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + distribution: 'temurin' + java-version: '17' - - name: Upload Lint results - uses: github/codeql-action/upload-sarif@v2 - if: success() || failure() - with: - sarif_file: app/build/reports/lint-results-debug.sarif - category: lint \ No newline at end of file + - name: Checkout repo + uses: actions/checkout@v2 + + - name: "Build Android project" + run: 'bash ./gradlew clean check assemble' + + - name: Upload Lint results + uses: github/codeql-action/upload-sarif@v2 + if: success() || failure() + with: + sarif_file: app/build/reports/lint-results-debug.sarif + category: lint \ No newline at end of file diff --git a/.github/workflows/update_screenshot_baseline.yml b/.github/workflows/update_screenshot_baseline.yml index 500f96b23..3f04b537a 100644 --- a/.github/workflows/update_screenshot_baseline.yml +++ b/.github/workflows/update_screenshot_baseline.yml @@ -6,6 +6,12 @@ jobs: screenshots_baseline: runs-on: ubuntu-latest steps: + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + distribution: 'temurin' + java-version: '17' + - name: Checkout repo uses: actions/checkout@v2 diff --git a/app/build.gradle b/app/build.gradle index 291c82e4b..5c3e39b1c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,12 +8,13 @@ def appCenterProjects = new Properties() file("appcenter_projects.properties").withInputStream { appCenterProjects.load(it) } android { - compileSdkVersion 33 + compileSdk target_sdk_version + namespace "com.telefonica.mistica.app" defaultConfig { applicationId "com.telefonica.mistica.app" - minSdkVersion 21 - targetSdkVersion 33 + minSdkVersion min_sdk_version + targetSdkVersion target_sdk_version versionCode versionCodeDate() versionName "1.0.0" @@ -51,6 +52,18 @@ android { } } + buildFeatures { + buildConfig true + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + } + + kotlinOptions { + jvmTarget = '17' + } } static def versionCodeDate() { diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index fb9ecdbc7..7edd8d7be 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,7 +1,6 @@ + xmlns:tools="http://schemas.android.com/tools"> diff --git a/build.gradle b/build.gradle index 232c52a60..6833a7c94 100644 --- a/build.gradle +++ b/build.gradle @@ -1,13 +1,14 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext { - compose_ui_version = "1.3.3" - compose_core_version = '1.3.1' - compose_compiler_version = '1.4.7' - kotlin_version = "1.8.21" + min_sdk_version = 21 + target_sdk_version = 34 + compose_ui_version = "1.5.4" + compose_compiler_version = '1.5.7' + kotlin_version = "1.9.21" androidx_appcompat_version = "1.6.0" androidx_activity_compose_version = "1.6.0" - accompanist_version = "0.30.1" + accompanist_version = "0.32.0" coil_version = '2.2.2' constraintComposeVersion = '1.0.1' roborazzi_version = "1.7.0" @@ -19,7 +20,7 @@ buildscript { } } dependencies { - classpath "com.android.tools.build:gradle:7.4.2" + classpath "com.android.tools.build:gradle:8.1.4" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "gradle.plugin.com.betomorrow.gradle:appcenter-plugin:2.0.3" } diff --git a/catalog/build.gradle b/catalog/build.gradle index dbfa1dfe3..a30d22b5c 100644 --- a/catalog/build.gradle +++ b/catalog/build.gradle @@ -6,11 +6,12 @@ plugins { } android { - compileSdkVersion 33 + compileSdk target_sdk_version + namespace = "com.telefonica.mistica.catalog" defaultConfig { - minSdkVersion 21 - targetSdkVersion 33 + minSdkVersion min_sdk_version + targetSdkVersion target_sdk_version buildConfigField "String", "APPCENTER_KEY", "\"" + System.env.APPCENTER_KEY + "\"" vectorDrawables { @@ -18,7 +19,6 @@ android { } } - lintOptions { warningsAsErrors true } @@ -27,15 +27,25 @@ android { } buildFeatures { compose true + buildConfig true } composeOptions { kotlinCompilerExtensionVersion compose_compiler_version } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 + } + + kotlinOptions { + jvmTarget = '17' + } } task sourceJar(type: Jar) { from android.sourceSets.main.java.srcDirs - classifier "sources" + archiveClassifier = "sources" } dependencies { @@ -45,7 +55,7 @@ dependencies { implementation "androidx.constraintlayout:constraintlayout-compose:$constraintComposeVersion" implementation 'androidx.activity:activity-compose:1.4.0' implementation "androidx.navigation:navigation-compose:2.5.3" - implementation "androidx.compose.material:material:$compose_core_version" + implementation "androidx.compose.material:material:$compose_ui_version" implementation "androidx.compose.ui:ui:$compose_ui_version" implementation "androidx.compose.ui:ui-tooling-preview:$compose_ui_version" diff --git a/catalog/src/main/AndroidManifest.xml b/catalog/src/main/AndroidManifest.xml index 3095b375d..c1ce2e03d 100644 --- a/catalog/src/main/AndroidManifest.xml +++ b/catalog/src/main/AndroidManifest.xml @@ -1,6 +1,4 @@ - + - + + - + diff --git a/library/src/main/res/layout/sheet_layout.xml b/library/src/main/res/layout/sheet_layout.xml index da7085176..29b1f4579 100644 --- a/library/src/main/res/layout/sheet_layout.xml +++ b/library/src/main/res/layout/sheet_layout.xml @@ -26,6 +26,7 @@ android:paddingStart="16dp" android:paddingTop="20dp" android:paddingBottom="8dp" + tools:ignore="RtlSymmetry" tools:text="Title" android:textAppearance="@style/AppTheme.TextAppearance.Preset5" /> @@ -60,6 +61,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingStart="16dp" + tools:ignore="RtlSymmetry" tools:text="Subtitle" android:textAppearance="@style/AppTheme.TextAppearance.Preset3" /> @@ -70,6 +72,7 @@ android:layout_height="wrap_content" android:paddingStart="16dp" android:paddingTop="8dp" + tools:ignore="RtlSymmetry" tools:text="Description" android:textAppearance="@style/AppTheme.TextAppearance.Preset2" android:textColor="?colorTextSecondary" diff --git a/library/src/main/res/layout/sheet_list_row_action.xml b/library/src/main/res/layout/sheet_list_row_action.xml index 514dc3dbb..3a4184a5b 100644 --- a/library/src/main/res/layout/sheet_list_row_action.xml +++ b/library/src/main/res/layout/sheet_list_row_action.xml @@ -33,6 +33,7 @@ app:layout_constraintBottom_toBottomOf="parent" tools:text="Title" android:paddingEnd="16dp" + tools:ignore="RtlSymmetry" android:layout_marginStart="16dp" /> diff --git a/library/src/main/res/layout/sheet_list_row_informative.xml b/library/src/main/res/layout/sheet_list_row_informative.xml index 86f88cde8..2421205c5 100644 --- a/library/src/main/res/layout/sheet_list_row_informative.xml +++ b/library/src/main/res/layout/sheet_list_row_informative.xml @@ -67,6 +67,7 @@ tools:text="Title" android:layout_marginStart="8dp" android:paddingEnd="16dp" + tools:ignore="RtlSymmetry" />