Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/parity-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Android parity build

on:
push:
branches: [web-mobile-ui-parity]
branches: [main, web-mobile-ui-parity]
pull_request:
branches: [main]
workflow_dispatch:
Expand All @@ -22,12 +22,12 @@ jobs:
java-version: '17'
- uses: gradle/actions/setup-gradle@v4
with:
gradle-version: current
- name: Compile Android app
gradle-version: '9.6.0'
- name: Compile and validate Android app
shell: bash
run: |
set -o pipefail
gradle :app:compileDebugKotlin --stacktrace 2>&1 | tee build.log
gradle :app:compileDebugKotlin :app:testDebugUnitTest :app:lintDebug --stacktrace 2>&1 | tee build.log
- name: Report build diagnostics
if: ${{ failure() && github.event_name == 'pull_request' }}
env:
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,17 @@ Original project code and documentation are available under the [MIT License](LI
[Open Gapwise →](https://gapwise.ca)

</div>

### Local validation

Use Java 17 or newer, the Android SDK configured for this project, and Gradle 9.6.0
(the version in `gradle/wrapper/gradle-wrapper.properties` and CI):

```bash
gradle :app:compileDebugKotlin :app:testDebugUnitTest :app:lintDebug
```

The repository currently contains wrapper properties but no wrapper executable/JAR, so
install that Gradle version explicitly. The optional encrypted-sync adapter must send the
key broker's first-party `Origin` as well as the user's bearer token; the broker's web origin
guard remains enforced. Device/Keystore/OAuth behavior still needs emulator or device validation.
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,11 @@ class EncryptedCloudSync(private val accounts: GapwiseAccountManager) {
readTimeout = 15_000
setRequestProperty("Accept", "application/json")
setRequestProperty("Authorization", "Bearer $accessToken")
// The first-party broker enforces the same explicit origin contract as the web client.
if (url == GapwiseCloudConfig.KEY_BROKER_URL) {
val endpoint = URL(url)
setRequestProperty("Origin", "${endpoint.protocol}://${endpoint.authority}")
}
if (includeApiKey) setRequestProperty("apikey", GapwiseCloudConfig.SUPABASE_PUBLISHABLE_KEY)
if (preferRepresentation) setRequestProperty("Prefer", "return=representation")
if (body != null) {
Expand Down
Loading