From c5e553b8d87eeac77abab2181887b2ac5d03d7f6 Mon Sep 17 00:00:00 2001 From: Ewan Harris Date: Tue, 17 Sep 2024 22:35:20 +0100 Subject: [PATCH 1/3] ci: use newer artifact actions (#13991) * ci: use newer artifact actions * ci: remove unused backport action --- .github/actions/build-android/action.yml | 10 ++++---- .github/actions/build-ios/action.yml | 8 +++---- .github/actions/package/action.yml | 24 +++++++++---------- .github/workflows/backport.yml | 19 --------------- .github/workflows/build.yml | 18 +++++++------- .github/workflows/docs.yml | 8 +++---- .github/workflows/regen-builds.yml | 2 +- .github/workflows/regen-docs.yml | 6 ++--- .github/workflows/release.yml | 30 ++++++++++++------------ .github/workflows/sponsors.yaml | 4 ++-- maintainer-docs/ci-setup.md | 6 ++--- 11 files changed, 58 insertions(+), 77 deletions(-) delete mode 100644 .github/workflows/backport.yml diff --git a/.github/actions/build-android/action.yml b/.github/actions/build-android/action.yml index ac6d0389498..1915ee28320 100644 --- a/.github/actions/build-android/action.yml +++ b/.github/actions/build-android/action.yml @@ -20,13 +20,13 @@ runs: shell: bash - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ inputs.node-version }} cache: 'npm' - name: Setup Java - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'adopt' java-version: ${{ inputs.java-version }} @@ -36,7 +36,7 @@ runs: shell: bash - name: Cache Gradle packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.gradle/caches @@ -58,7 +58,7 @@ runs: ${{ runner.os }}-ccache- - name: Cache V8 - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: dist/android/libv8 key: libv8-${{ hashFiles('dist/android/libv8/**') }} @@ -84,7 +84,7 @@ runs: dist/tmp/common shell: bash - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: android-build retention-days: 1 diff --git a/.github/actions/build-ios/action.yml b/.github/actions/build-ios/action.yml index dfd37277f9b..facb2c2c713 100644 --- a/.github/actions/build-ios/action.yml +++ b/.github/actions/build-ios/action.yml @@ -9,10 +9,10 @@ inputs: runs: using: composite steps: - - name: Use Node.js 16.x - uses: actions/setup-node@v3 + - name: Use Node.js + uses: actions/setup-node@v4 with: - node-version: '16.x' + node-version: ${{ inputs.node-version }} cache: 'npm' - name: Install dependencies @@ -34,7 +34,7 @@ runs: iphone/TitaniumKit/build/TitaniumKit.xcframework shell: bash - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: ios-build retention-days: 1 diff --git a/.github/actions/package/action.yml b/.github/actions/package/action.yml index 71b593d5ac3..2b94b40f004 100644 --- a/.github/actions/package/action.yml +++ b/.github/actions/package/action.yml @@ -15,14 +15,14 @@ inputs: runs: using: composite steps: - - name: Use Node.js 16.x - uses: actions/setup-node@v3 + - name: Use Node.js + uses: actions/setup-node@v4 with: node-version: ${{ inputs.node-version }} cache: 'npm' - - name: Use JDK 11 - uses: actions/setup-java@v3 + - name: Use JDK + uses: actions/setup-java@v4 with: distribution: 'adopt' java-version: ${{ inputs.java-version }} @@ -32,7 +32,7 @@ runs: shell: bash - name: Cache Gradle packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.gradle/caches @@ -41,7 +41,7 @@ runs: restore-keys: | ${{ runner.os }}-gradle- - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: android-build @@ -49,7 +49,7 @@ runs: run: tar -xzvf android-build.tar.gz shell: bash - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: ios-build @@ -58,7 +58,7 @@ runs: shell: bash - name: Cache Native Modules - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.SDK_BUILD_CACHE_DIR }} key: native-modules-${{ github.sha }} @@ -70,21 +70,21 @@ runs: shell: bash - name: Archive OSX artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: mobilesdk-${{ inputs.vtag }}-osx path: | dist/mobilesdk-*-osx.zip - name: Archive win32 artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: mobilesdk-${{ inputs.vtag }}-win32 path: | dist/mobilesdk-*-win32.zip - name: Archive Linux artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: mobilesdk-${{ inputs.vtag }}-linux path: | @@ -98,7 +98,7 @@ runs: rm -f ~/.gradle/caches/modules-2/gc.properties shell: bash - - uses: geekyeggo/delete-artifact@v2 + - uses: geekyeggo/delete-artifact@v5 with: name: | android-build diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml deleted file mode 100644 index 37acf53d70a..00000000000 --- a/.github/workflows/backport.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Backport -on: - pull_request_target: - types: - - closed - - labeled - -jobs: - backport: - runs-on: ubuntu-20.04 - name: Backport - steps: - - name: Backport - uses: ewanharris/backport@v1.0.28-25 - with: - bot_username: build - bot_token: ${{ secrets.BOT_TOKEN }} - bot_token_key: ${{ secrets.BOT_TOKEN_KEY }} - github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7ee41f0c410..9fc7635a35b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,13 +15,13 @@ jobs: USE_CCACHE: 1 steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Android build uses: ./.github/actions/build-android with: - node-version: '18.x' + node-version: '20.x' java-version: '17' ios: @@ -33,27 +33,27 @@ jobs: DEVELOPER_DIR: /Applications/Xcode_14.3.app/Contents/Developer steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: iOS build uses: ./.github/actions/build-ios with: - node-version: '18.x' + node-version: '20.x' js: runs-on: ubuntu-latest name: JavaScript steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Use Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: '18.x' + node-version: '20.x' cache: 'npm' - name: Install dependencies @@ -71,7 +71,7 @@ jobs: needs: [android, ios, js] steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Create version tag @@ -83,6 +83,6 @@ jobs: - name: Package uses: ./.github/actions/package with: - node-version: '16.x' + node-version: '20.x' java-version: '17' vtag: ${{ env.vtag }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f8f60bad8bb..e8c5cde4165 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -13,13 +13,13 @@ jobs: name: Docs steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Use Node.js 16.x - uses: actions/setup-node@v3 + - name: Use Node.js + uses: actions/setup-node@v4 with: - node-version: '16.x' + node-version: '20.x' cache: 'npm' - run: npm ci name: Install dependencies diff --git a/.github/workflows/regen-builds.yml b/.github/workflows/regen-builds.yml index c4bc936c500..27956f717b2 100644 --- a/.github/workflows/regen-builds.yml +++ b/.github/workflows/regen-builds.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Repository Dispatch if: github.event.workflow_run.conclusion == 'success' - uses: peter-evans/repository-dispatch@v2 + uses: peter-evans/repository-dispatch@v3 with: event-type: regen-builds repository: tidev/downloads-www diff --git a/.github/workflows/regen-docs.yml b/.github/workflows/regen-docs.yml index 23ce1a85cc1..a3be88243e4 100644 --- a/.github/workflows/regen-docs.yml +++ b/.github/workflows/regen-docs.yml @@ -14,12 +14,12 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: '16' registry-url: 'https://registry.npmjs.org' @@ -32,7 +32,7 @@ jobs: name: Lint - name: Repository Dispatch - uses: peter-evans/repository-dispatch@v2 + uses: peter-evans/repository-dispatch@v3 with: event-type: regen-api-docs token: ${{ secrets.REGEN_DOCS_GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 120c547b08c..762ae53fd4d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,7 @@ jobs: vtag: ${{ steps.vtag.outputs.vtag }} steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 ref: ${{ github.event.inputs.branch }} @@ -43,7 +43,7 @@ jobs: echo "vtag=${VTAG}" >> $GITHUB_ENV echo "vtag=${VTAG}" >> $GITHUB_OUTPUT - name: Validate version - uses: actions/github-script@v6 + uses: actions/github-script@v7 env: vtag: ${{ env.vtag }} with: @@ -70,14 +70,14 @@ jobs: USE_CCACHE: 1 steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 ref: ${{ github.event.inputs.branch }} - name: Android build uses: ./.github/actions/build-android with: - node-version: '18.x' + node-version: '20.x' java-version: '17' ios: @@ -90,14 +90,14 @@ jobs: DEVELOPER_DIR: /Applications/Xcode_14.3.app/Contents/Developer steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 ref: ${{ github.event.inputs.branch }} - name: iOS build uses: ./.github/actions/build-ios with: - node-version: '18.x' + node-version: '20.x' package: runs-on: macos-12 @@ -109,14 +109,14 @@ jobs: needs: [validate, android, ios] steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 ref: ${{ github.event.inputs.branch }} - name: Package uses: ./.github/actions/package with: - node-version: '18.x' + node-version: '20.x' java-version: '17' vtag: ${{ env.vtag }} @@ -129,21 +129,21 @@ jobs: vtag: ${{ needs.validate.outputs.vtag }} steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 ref: ${{ github.event.inputs.branch }} - run: echo ${{ env.vtag }} - name: Download Linux artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: mobilesdk-${{ env.vtag }}-linux - name: Download MacOS artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: mobilesdk-${{ env.vtag }}-osx - name: Download Windows artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: mobilesdk-${{ env.vtag }}-win32 - name: Create and push tag @@ -155,14 +155,14 @@ jobs: git push origin "${TAG_VERSION}" echo "clean-tag=${TAG_VERSION}" >> $GITHUB_ENV - name: Upload SDK zips (GA) - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 if: ${{ github.event.inputs.release-type == 'GA' }} with: files: mobilesdk-${{ env.vtag }}-* tag_name: ${{ env.clean-tag }} name: ${{ env.vtag }} - name: Upload SDK zips (non-GA) - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 if: ${{ github.event.inputs.release-type != 'GA' }} with: files: mobilesdk-${{ env.vtag }}-* @@ -178,7 +178,7 @@ jobs: git commit -m "chore(release): bump version" git push - name: Regen Builds - uses: peter-evans/repository-dispatch@v2 + uses: peter-evans/repository-dispatch@v3 with: event-type: regen-builds repository: tidev/downloads-www diff --git a/.github/workflows/sponsors.yaml b/.github/workflows/sponsors.yaml index 7e42d6a459c..f3bd3bcfdc6 100644 --- a/.github/workflows/sponsors.yaml +++ b/.github/workflows/sponsors.yaml @@ -10,7 +10,7 @@ jobs: name: Update Sponsors steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Update Sponsors in README.md @@ -20,4 +20,4 @@ jobs: token: ${{ secrets.SPONSORS_README_TOKEN }} file: 'README.md' - name: Commit changes - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 diff --git a/maintainer-docs/ci-setup.md b/maintainer-docs/ci-setup.md index 301c661927c..046b736f9e9 100644 --- a/maintainer-docs/ci-setup.md +++ b/maintainer-docs/ci-setup.md @@ -73,7 +73,7 @@ For example: - name: Android build uses: ./.github/actions/build-android with: - node-version: '16.x' + node-version: '20.x' java-version: '11' ``` @@ -89,7 +89,7 @@ For example: - name: iOS build uses: ./.github/actions/build-ios with: - node-version: '16.x' + node-version: '20.x' ``` ### Package @@ -104,7 +104,7 @@ For example: - name: Package uses: ./.github/actions/package with: - node-version: '16.x' + node-version: '20.x' java-version: '11' vtag: ${{ env.vtag }} ``` From b33a15ebeac7f73baa69b410966501f7f98ef83e Mon Sep 17 00:00:00 2001 From: hansemannn Date: Wed, 18 Sep 2024 00:06:17 +0000 Subject: [PATCH 2/3] Apply automatic changes --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 91ae530b24d..dc434200d76 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ today and benefit from 1:1 sessions with the core team, exclusive modules, merch Learn more about sponsoring TiDev, the organization behind the Titanium SDK, [here](https://github.com/sponsors/tidev) 🚀. -Rene PotRodrigo FarfánMatt Delmarterdlewis23Daniel EthierJoe KniesekVittorio SorberaMarcus OlovssonAlessandro La RoccaReshopperGusJason David MillerMichael ZaladonisVincenzo QuacquarelliMighty GmbHFruugulKorelogic LimitedJohn Gould +Rene PotRodrigo FarfánMatt Delmarterdlewis23Daniel EthierJoe KniesekVittorio SorberaMarcus OlovssonAlessandro La RoccaReshopperGusJason David MillerMichael ZaladonisVincenzo QuacquarelliMighty GmbHFruugulKorelogic LimitedRomeo ManzurJohn Gould ## Features From 5ad1ac9200f7fc0f2a46e9d70fbc7340b2c095af Mon Sep 17 00:00:00 2001 From: Michael Gangolf Date: Wed, 18 Sep 2024 09:42:46 +0200 Subject: [PATCH 3/3] fix(android): fix ListView layout with header and footer only (#14117) * fix(android): fix ListView layout with header and footer only * remove log * Update android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListViewHolder.java Co-authored-by: Chris Barber * rename variable --------- Co-authored-by: Chris Barber --- .../titanium/ui/widget/listview/ListViewHolder.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListViewHolder.java b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListViewHolder.java index 0a400cd4705..137b0661f9a 100644 --- a/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListViewHolder.java +++ b/android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/ListViewHolder.java @@ -412,7 +412,13 @@ private void setHeaderFooter(TiViewProxy listViewProxy, ConstraintSet constraintSet = new ConstraintSet(); constraintSet.clone((ConstraintLayout) this.container); - constraintSet.connect(R.id.titanium_ui_listview_holder_content, ConstraintSet.BOTTOM, + + int constraintStartId = R.id.titanium_ui_listview_holder_header; + if (this.content.getChildCount() > 0) { + constraintStartId = R.id.titanium_ui_listview_holder_content; + } + + constraintSet.connect(constraintStartId, ConstraintSet.BOTTOM, R.id.titanium_ui_listview_holder_footer, ConstraintSet.TOP, 0); constraintSet.connect(R.id.titanium_ui_listview_holder_left_image, ConstraintSet.BOTTOM, R.id.titanium_ui_listview_holder_footer, ConstraintSet.TOP, 0);