From bb957409910dfcf9b5376a84c100bfbad3b0dd48 Mon Sep 17 00:00:00 2001 From: Hjort Date: Tue, 16 Jan 2024 13:32:19 +0100 Subject: [PATCH 1/2] Fix android CI --- .github/workflows/build-test.yml | 7 +++++++ .github/workflows/release.yml | 7 +++++++ README.md | 1 + 3 files changed, 15 insertions(+) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 7c368cda2..f5e4e2ace 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -90,6 +90,11 @@ jobs: runs-on: ubuntu-22.04 if: ${{ !github.event.pull_request.draft }} steps: + - name: Set Up Android tools + run: | + ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager \ + --sdk_root=$ANDROID_SDK_ROOT \ + "platform-tools" "platforms;android-27" "build-tools;27.0.3" - name: Checkout uses: actions/checkout@v2 with: @@ -106,5 +111,7 @@ jobs: toolchain: 1.69 - name: Create native dependencies run: make add-android-targets && make android + - name: Initialize root project + run: mvn install -N - name: Build android sdk run: cd concordium-android-sdk && mvn --batch-mode --update-snapshots install \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b2308fcf5..1627cc282 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -90,6 +90,11 @@ jobs: build-aar-library: runs-on: ubuntu-22.04 steps: + - name: Set Up Android tools + run: | + ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager \ + --sdk_root=$ANDROID_SDK_ROOT \ + "platform-tools" "platforms;android-27" "build-tools;27.0.3" # Setup rust - name: Setup Rust uses: actions-rs/toolchain@v1 @@ -103,6 +108,8 @@ jobs: - name: Make android native dependencies run: make add-android-targets && make android # Builds and tests the sdk + - name: Initialize root project + run: mvn install -N - name: Build and test android sdk run: cd concordium-android-sdk && mvn --batch-mode --update-snapshots install - name: Upload aar diff --git a/README.md b/README.md index 7bf86cf9a..f1bd250dc 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,7 @@ git clone https://github.com/Concordium/concordium-java-sdk.git --recurse-submod 2. Set the ANDROID_HOME environment variable to the path to your Android SDK installation. 3. Run `make add-android-targets` from the root of this repository. 4. Run `make android` from the root of this repository. +4. Run `mvn install -N` from the root of the repository. 5. Run `mvn install` from the root of the [concordium-android-sdk](./concordium-android-sdk) folder. `make add-android-targets` adds the rust targets that the native libraries will be built for. From ab70d15b31d2b3da3e1c0a36bd23321284c3a7a3 Mon Sep 17 00:00:00 2001 From: Hjort Date: Tue, 16 Jan 2024 13:09:09 +0100 Subject: [PATCH 2/2] Exclude protobuf wrappers from concordium-grpc api --- concordium-android-sdk/pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/concordium-android-sdk/pom.xml b/concordium-android-sdk/pom.xml index 3c79fb65a..8755771ea 100644 --- a/concordium-android-sdk/pom.xml +++ b/concordium-android-sdk/pom.xml @@ -78,6 +78,9 @@ ${project.basedir}/../concordium-base/concordium-grpc-api/ true + + **/google/protobuf/wrappers.proto + @@ -115,6 +118,9 @@ false true + + **/google/protobuf/wrappers.proto +