From 633d8899dc7da91c130c626f78a9fd33a416f601 Mon Sep 17 00:00:00 2001 From: Philip Peitsch Date: Wed, 7 Jun 2023 10:34:38 +1000 Subject: [PATCH 1/4] Re-indent yaml file --- .github/workflows/capacitor.yaml | 99 ++++++++++++++++---------------- .prettierrc | 6 ++ 2 files changed, 55 insertions(+), 50 deletions(-) diff --git a/.github/workflows/capacitor.yaml b/.github/workflows/capacitor.yaml index 2045893f..7a9b0a09 100644 --- a/.github/workflows/capacitor.yaml +++ b/.github/workflows/capacitor.yaml @@ -3,16 +3,16 @@ name: Capacitor on: workflow_dispatch: push: - branches: [ "master" ] + branches: ['master'] pull_request: - branches: [ "master" ] + branches: ['master'] jobs: capacitor-android: name: android@${{ matrix.capacitor }} - + runs-on: ubuntu-latest - + strategy: matrix: include: @@ -24,37 +24,36 @@ jobs: node: 14.x steps: - - uses: actions/checkout@v3 - - name: set up JDK ${{ matrix.jdk }} - uses: actions/setup-java@v3 - with: - java-version: ${{ matrix.jdk }} - distribution: 'temurin' - - name: Use Node.js ${{ matrix.node }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node }} - - name: Build test app - run: | - mkdir temp - cd temp - mkdir www - touch www/index.html - npm init -y - npm install .. - npm install @capacitor/cli@${{ matrix.capacitor }} @capacitor/core@${{ matrix.capacitor }} @capacitor/android@${{ matrix.capacitor }} - npx cap init test io.test.app - npx cap add android - npx cap sync android - cd android - chmod +x gradlew - ./gradlew build - + - uses: actions/checkout@v3 + - name: set up JDK ${{ matrix.jdk }} + uses: actions/setup-java@v3 + with: + java-version: ${{ matrix.jdk }} + distribution: 'temurin' + - name: Use Node.js ${{ matrix.node }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + - name: Build test app + run: | + mkdir temp + cd temp + mkdir www + touch www/index.html + npm init -y + npm install .. + npm install @capacitor/cli@${{ matrix.capacitor }} @capacitor/core@${{ matrix.capacitor }} @capacitor/android@${{ matrix.capacitor }} + npx cap init test io.test.app + npx cap add android + npx cap sync android + cd android + chmod +x gradlew + ./gradlew build capacitor-ios: name: ios@${{ matrix.capacitor }} runs-on: macos-latest - + strategy: matrix: include: @@ -62,22 +61,22 @@ jobs: node: 18.x steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node }} - - name: Build test app - run: | - mkdir temp - cd temp - mkdir www - touch www/index.html - npm init -y - npm install .. - npm install @capacitor/cli@${{ matrix.capacitor }} @capacitor/core@${{ matrix.capacitor }} @capacitor/ios@${{ matrix.capacitor }} - npx cap init test io.test.app - npx cap add ios - npx cap sync ios - cd ios - xcodebuild -workspace App/App.xcworkspace -scheme CapacitorCordova -configuration Debug -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 14 Pro Max" + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + - name: Build test app + run: | + mkdir temp + cd temp + mkdir www + touch www/index.html + npm init -y + npm install .. + npm install @capacitor/cli@${{ matrix.capacitor }} @capacitor/core@${{ matrix.capacitor }} @capacitor/ios@${{ matrix.capacitor }} + npx cap init test io.test.app + npx cap add ios + npx cap sync ios + cd ios + xcodebuild -workspace App/App.xcworkspace -scheme CapacitorCordova -configuration Debug -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 14 Pro Max" diff --git a/.prettierrc b/.prettierrc index 050a0b8e..9f257a4b 100644 --- a/.prettierrc +++ b/.prettierrc @@ -15,6 +15,12 @@ "options": { "tabWidth": 2 } + }, + { + "files": "*.yaml", + "options": { + "tabWidth": 2 + } } ] } From 73aa72ee32c560e6e301af8000c592306eecf380 Mon Sep 17 00:00:00 2001 From: Philip Peitsch Date: Wed, 7 Jun 2023 10:35:18 +1000 Subject: [PATCH 2/4] Android: Add androidx.annotation reference for RequiresPermission attribute (#977) --- .github/workflows/capacitor.yaml | 3 +++ plugin.xml | 1 + 2 files changed, 4 insertions(+) diff --git a/.github/workflows/capacitor.yaml b/.github/workflows/capacitor.yaml index 7a9b0a09..622a3221 100644 --- a/.github/workflows/capacitor.yaml +++ b/.github/workflows/capacitor.yaml @@ -22,6 +22,9 @@ jobs: - jdk: 11 capacitor: 4 node: 14.x + - jdk: 8 + capacitor: 3 + node: 12.x steps: - uses: actions/checkout@v3 diff --git a/plugin.xml b/plugin.xml index 46ba0669..3e12b634 100644 --- a/plugin.xml +++ b/plugin.xml @@ -83,6 +83,7 @@ + From 3df3c4edce16c05c534c2c31c9baf3c825816952 Mon Sep 17 00:00:00 2001 From: Philip Peitsch Date: Wed, 7 Jun 2023 10:51:26 +1000 Subject: [PATCH 3/4] Bump capacitor3 builds to node 14 Avoids a build issue: node_modules\@ionic\utils-subprocess\dist\index.js:72 promise.p.stdout?.pipe(stdoutBuf); ^ SyntaxError: Unexpected token '.' at wrapSafe (internal/modules/cjs/loader.js:915:16) at Module._compile (internal/modules/cjs/loader.js:963:27) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) at Module.load (internal/modules/cjs/loader.js:863:32) at Function.Module._load (internal/modules/cjs/loader.js:708:14) at Module.require (internal/modules/cjs/loader.js:887:19) at require (internal/modules/cjs/helpers.js:74:18) at Object. (J:\temp\temp\node_modules\@capacitor\cli\dist\ipc.js:6:28) at Module._compile (internal/modules/cjs/loader.js:999:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) --- .github/workflows/capacitor.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/capacitor.yaml b/.github/workflows/capacitor.yaml index 622a3221..5f9bfc00 100644 --- a/.github/workflows/capacitor.yaml +++ b/.github/workflows/capacitor.yaml @@ -24,7 +24,7 @@ jobs: node: 14.x - jdk: 8 capacitor: 3 - node: 12.x + node: 14.x steps: - uses: actions/checkout@v3 From b4c7e7af789ef0633a9d7a173b8ed3dd01b2ba34 Mon Sep 17 00:00:00 2001 From: Philip Peitsch Date: Wed, 7 Jun 2023 11:15:19 +1000 Subject: [PATCH 4/4] Disable capacitor3 builds again Once using the right node version still results in a permissions challenge: ERROR:/home/runner/work/cordova-plugin-ble-central/cordova-plugin-ble-central/temp/android/app/build/intermediates/packaged_manifests/debug/AndroidManifest.xml:26: AAPT: error: attribute android:usesPermissionFlags not found. --- .github/workflows/capacitor.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/capacitor.yaml b/.github/workflows/capacitor.yaml index 5f9bfc00..7a9b0a09 100644 --- a/.github/workflows/capacitor.yaml +++ b/.github/workflows/capacitor.yaml @@ -22,9 +22,6 @@ jobs: - jdk: 11 capacitor: 4 node: 14.x - - jdk: 8 - capacitor: 3 - node: 14.x steps: - uses: actions/checkout@v3