Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 26de04d2 authored by Ellen Poe's avatar Ellen Poe
Browse files

fix: modify readme, remove old github references

parent 70d3ef2f
Loading
Loading
Loading
Loading

.github/FUNDING.yml

deleted100644 → 0
+0 −4
Original line number Diff line number Diff line
# These are supported funding model platforms

github: ellenhp
liberapay: ellenhp
+0 −139
Original line number Diff line number Diff line
name: Android CI

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  build:
    runs-on: ubuntu-latest
    concurrency:
      group: ${{ github.workflow }}-${{ github.ref }}-android-build
      cancel-in-progress: true

    steps:
    - uses: actions/checkout@v4
      with:
        submodules: true
        lfs: true

    - name: Set up JDK 17
      uses: actions/setup-java@v4
      with:
        java-version: '17'
        distribution: 'temurin'
        cache: gradle

    - name: Set up Android SDK
      uses: android-actions/setup-android@v3
      with:
        api-level: 36

    - name: Install NDK
      run: sdkmanager "ndk;26.1.10909125"

    - name: Configure Android NDK environment
      run: |
        echo "ANDROID_NDK_HOME=$ANDROID_HOME/ndk/26.1.10909125" >> $GITHUB_ENV
        echo "ANDROID_NDK_ROOT=$ANDROID_HOME/ndk/26.1.10909125" >> $GITHUB_ENV
        echo "NDK_HOME=$ANDROID_HOME/ndk/26.1.10909125" >> $GITHUB_ENV

    - name: Set up Rust
      uses: dtolnay/rust-toolchain@stable

    - name: Install Rust Android targets
      run: |
        rustup target add aarch64-linux-android
        rustup target add x86_64-linux-android

    - name: Cache Rust dependencies
      uses: actions/cache@v4
      with:
        path: |
          ~/.cargo/registry
          ~/.cargo/git
          cardinal-geocoder/target
        key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
        restore-keys: |
          ${{ runner.os }}-cargo-

    - name: Cache Gradle dependencies
      uses: actions/cache@v4
      with:
        path: |
          ~/.gradle/caches
          ~/.gradle/wrapper
          cardinal-android/.gradle
        key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
        restore-keys: |
          ${{ runner.os }}-gradle-

    - name: Configure Gradle for CI
      run: |
        mkdir -p ~/.gradle
        echo "org.gradle.daemon=false" >> ~/.gradle/gradle.properties
        echo "org.gradle.parallel=true" >> ~/.gradle/gradle.properties
        echo "org.gradle.configureondemand=true" >> ~/.gradle/gradle.properties
        echo "org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g -XX:+HeapDumpOnOutOfMemoryError" >> ~/.gradle/gradle.properties

    - name: Grant execute permission for gradlew
      run: chmod +x cardinal-android/gradlew

    - name: Install cargo-ndk
      run: cargo install cargo-ndk

    - name: Verify Android SDK and NDK setup
      run: |
        echo "=== Environment Variables ==="
        echo "ANDROID_HOME: $ANDROID_HOME"
        echo "ANDROID_NDK_HOME: $ANDROID_NDK_HOME"
        echo "ANDROID_NDK_ROOT: $ANDROID_NDK_ROOT"
        echo "NDK_HOME: $NDK_HOME"
        echo ""
        echo "=== Android SDK Structure ==="
        ls -la $ANDROID_HOME || echo "ANDROID_HOME not found"
        echo ""
        echo "=== NDK Installation ==="
        ls -la $ANDROID_NDK_HOME || echo "NDK not found at $ANDROID_NDK_HOME"
        echo ""
        echo "=== Rust Targets ==="
        rustup target list --installed | grep android || echo "No Android targets found"
        echo ""
        echo "=== Cargo NDK Version ==="
        cargo ndk --version || echo "cargo-ndk not found"

    - name: Install Protoc
      uses: arduino/setup-protoc@v3

    - name: Build with Gradle
      working-directory: cardinal-android
      run: |
        touch local.properties
        # Build debug APKs for each architecture to test the configuration
        ./gradlew assembleArm64Debug assembleX86_64Debug --info --stacktrace --no-daemon
      env:
        ANDROID_HOME: ${{ env.ANDROID_HOME }}
        ANDROID_NDK_HOME: ${{ env.ANDROID_NDK_HOME }}
        ANDROID_NDK_ROOT: ${{ env.ANDROID_NDK_ROOT }}
        NDK_HOME: ${{ env.NDK_HOME }}

    - name: Upload build artifacts
      if: always()
      uses: actions/upload-artifact@v4
      with:
        name: android-build-artifacts
        path: |
          cardinal-android/app/build/outputs/
        retention-days: 7

    - name: Upload build logs on failure
      if: failure()
      uses: actions/upload-artifact@v4
      with:
        name: build-logs
        path: |
          cardinal-android/app/build/reports/
          ~/.gradle/daemon/*/daemon-*.out.log
        retention-days: 3

.github/workflows/detekt.yml

deleted100644 → 0
+0 −60
Original line number Diff line number Diff line
name: Android CI

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  detekt:
    runs-on: ubuntu-latest
    concurrency:
      group: ${{ github.workflow }}-${{ github.ref }}-android-detekt
      cancel-in-progress: true

    steps:
    - uses: actions/checkout@v4
      with:
        submodules: true
        lfs: true

    - name: Cache Gradle dependencies
      uses: actions/cache@v4
      with:
        path: |
          ~/.gradle/caches
          ~/.gradle/wrapper
          cardinal-android/.gradle
        key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
        restore-keys: |
          ${{ runner.os }}-gradle-

    - name: Configure Gradle for CI
      run: |
        mkdir -p ~/.gradle
        echo "org.gradle.daemon=false" >> ~/.gradle/gradle.properties
        echo "org.gradle.parallel=true" >> ~/.gradle/gradle.properties
        echo "org.gradle.configureondemand=true" >> ~/.gradle/gradle.properties
        echo "org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g -XX:+HeapDumpOnOutOfMemoryError" >> ~/.gradle/gradle.properties

    - name: Build with Gradle
      working-directory: cardinal-android
      run: |
        touch local.properties
        ./gradlew detekt
      env:
        ANDROID_HOME: ${{ env.ANDROID_HOME }}
        ANDROID_NDK_HOME: ${{ env.ANDROID_NDK_HOME }}
        ANDROID_NDK_ROOT: ${{ env.ANDROID_NDK_ROOT }}
        NDK_HOME: ${{ env.NDK_HOME }}

    - name: Upload build logs on failure
      if: failure()
      uses: actions/upload-artifact@v4
      with:
        name: build-logs
        path: |
          cardinal-android/app/build/reports/
          ~/.gradle/daemon/*/daemon-*.out.log
        retention-days: 3

.github/workflows/release.yml

deleted100644 → 0
+0 −215
Original line number Diff line number Diff line
name: Android Release

on:
  push:
    tags:
      - 'v*'

jobs:
  release:
    runs-on: ubuntu-latest
    concurrency:
      group: ${{ github.workflow }}-${{ github.ref }}-android-release
      cancel-in-progress: true

    steps:
    - uses: actions/checkout@v4
      with:
        submodules: true
        lfs: true

    - name: Extract version from tag
      id: version
      run: |
        TAG=${GITHUB_REF#refs/tags/}
        VERSION=${TAG#v}
        echo "tag=$TAG" >> $GITHUB_OUTPUT
        echo "version=$VERSION" >> $GITHUB_OUTPUT
        echo "version_code=$(date +%s)" >> $GITHUB_OUTPUT
        echo "Extracted version: $VERSION from tag: $TAG"

    - name: Set up JDK 17
      uses: actions/setup-java@v4
      with:
        java-version: '17'
        distribution: 'temurin'
        cache: gradle

    - name: Set up Android SDK
      uses: android-actions/setup-android@v3
      with:
        api-level: 36

    - name: Install NDK
      run: sdkmanager "ndk;26.1.10909125"

    - name: Configure Android NDK environment
      run: |
        echo "ANDROID_NDK_HOME=$ANDROID_HOME/ndk/26.1.10909125" >> $GITHUB_ENV
        echo "ANDROID_NDK_ROOT=$ANDROID_HOME/ndk/26.1.10909125" >> $GITHUB_ENV
        echo "NDK_HOME=$ANDROID_HOME/ndk/26.1.10909125" >> $GITHUB_ENV

    - name: Set up Rust
      uses: dtolnay/rust-toolchain@stable

    - name: Install Rust Android targets
      run: |
        rustup target add aarch64-linux-android
        rustup target add x86_64-linux-android

    - name: Cache Rust dependencies
      uses: actions/cache@v4
      with:
        path: |
          ~/.cargo/registry
          ~/.cargo/git
          cardinal-geocoder/target
        key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
        restore-keys: |
          ${{ runner.os }}-cargo-

    - name: Cache Gradle dependencies
      uses: actions/cache@v4
      with:
        path: |
          ~/.gradle/caches
          ~/.gradle/wrapper
          cardinal-android/.gradle
        key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
        restore-keys: |
          ${{ runner.os }}-gradle-

    - name: Configure Gradle for CI
      run: |
        mkdir -p ~/.gradle
        echo "org.gradle.daemon=false" >> ~/.gradle/gradle.properties
        echo "org.gradle.parallel=true" >> ~/.gradle/gradle.properties
        echo "org.gradle.configureondemand=true" >> ~/.gradle/gradle.properties
        echo "org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g -XX:+HeapDumpOnOutOfMemoryError" >> ~/.gradle/gradle.properties

    - name: Grant execute permission for gradlew
      run: chmod +x cardinal-android/gradlew

    - name: Install cargo-ndk
      run: cargo install cargo-ndk

    - name: Install Protoc
      uses: arduino/setup-protoc@v3

    - name: Set up keystore
      run: |
        echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode > cardinal-android/app/release.keystore

    - name: Build release APKs and AABs
      working-directory: cardinal-android
      run: |
        touch local.properties
        # Build APKs for each architecture
        ./gradlew assembleArm64Release assembleX86_64Release --info --stacktrace --no-daemon
        # Build AABs for each architecture
        ./gradlew bundleArm64Release bundleX86_64Release --info --stacktrace --no-daemon
      env:
        ANDROID_HOME: ${{ env.ANDROID_HOME }}
        ANDROID_NDK_HOME: ${{ env.ANDROID_NDK_HOME }}
        ANDROID_NDK_ROOT: ${{ env.ANDROID_NDK_ROOT }}
        NDK_HOME: ${{ env.NDK_HOME }}
        VERSION_NAME: ${{ steps.version.outputs.version }}
        VERSION_CODE: ${{ steps.version.outputs.version_code }}
        KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
        KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
        KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}

    - name: Verify APKs and AABs were signed
      run: |
        echo "=== Checking ARM64 APK ==="
        ARM64_APK="cardinal-android/app/build/outputs/apk/arm64/release/app-arm64-release.apk"
        if [ -f "$ARM64_APK" ]; then
          echo "✅ ARM64 APK found at: $ARM64_APK"
          ls -lh "$ARM64_APK"
          $ANDROID_HOME/build-tools/*/aapt dump badging "$ARM64_APK" | head -3
        else
          echo "❌ ARM64 APK not found!"
          exit 1
        fi
        
        echo "=== Checking x86_64 APK ==="
        X86_64_APK="cardinal-android/app/build/outputs/apk/x86_64/release/app-x86_64-release.apk"
        if [ -f "$X86_64_APK" ]; then
          echo "✅ x86_64 APK found at: $X86_64_APK"
          ls -lh "$X86_64_APK"
          $ANDROID_HOME/build-tools/*/aapt dump badging "$X86_64_APK" | head -3
        else
          echo "❌ x86_64 APK not found!"
          exit 1
        fi
        
        echo "=== Checking ARM64 AAB ==="
        ARM64_AAB="cardinal-android/app/build/outputs/bundle/arm64Release/app-arm64-release.aab"
        if [ -f "$ARM64_AAB" ]; then
          echo "✅ ARM64 AAB found at: $ARM64_AAB"
          ls -lh "$ARM64_AAB"
        else
          echo "❌ ARM64 AAB not found!"
          exit 1
        fi
        
        echo "=== Checking x86_64 AAB ==="
        X86_64_AAB="cardinal-android/app/build/outputs/bundle/x86_64Release/app-x86_64-release.aab"
        if [ -f "$X86_64_AAB" ]; then
          echo "✅ x86_64 AAB found at: $X86_64_AAB"
          ls -lh "$X86_64_AAB"
        else
          echo "❌ x86_64 AAB not found!"
          exit 1
        fi

    - name: Upload release artifacts
      uses: actions/upload-artifact@v4
      with:
        name: android-release-${{ steps.version.outputs.version }}
        path: |
          cardinal-android/app/build/outputs/apk/arm64/release/app-arm64-release.apk
          cardinal-android/app/build/outputs/apk/x86_64/release/app-x86_64-release.apk
          cardinal-android/app/build/outputs/bundle/arm64Release/app-arm64-release.aab
          cardinal-android/app/build/outputs/bundle/x86_64Release/app-x86_64-release.aab
        retention-days: 30

    - name: Create GitHub Release
      uses: softprops/action-gh-release@v2
      with:
        tag_name: ${{ steps.version.outputs.tag }}
        name: Cardinal Maps ${{ steps.version.outputs.version }}
        draft: false
        prerelease: true
        generate_release_notes: true
        body: |
          ## Cardinal Maps ${{ steps.version.outputs.version }}
          
          This release includes separate builds for different architectures:
          
          ### APK Files (for sideloading)
          - `app-arm64-release.apk` - For ARM64 devices (most modern Android phones)
          - `app-x86_64-release.apk` - For x86_64 devices (emulators, some tablets)
          
          ### AAB Files (for Google Play Store)
          - `app-arm64-release.aab` - ARM64 Android App Bundle for Google Play
          - `app-x86_64-release.aab` - x86_64 Android App Bundle for Google Play
          
          Choose the appropriate file for your device architecture. If unsure, try the ARM64 version first as it works on most modern Android devices.
        files: |
          cardinal-android/app/build/outputs/apk/arm64/release/app-arm64-release.apk
          cardinal-android/app/build/outputs/apk/x86_64/release/app-x86_64-release.apk
          cardinal-android/app/build/outputs/bundle/arm64Release/app-arm64-release.aab
          cardinal-android/app/build/outputs/bundle/x86_64Release/app-x86_64-release.aab
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

    - name: Upload build logs on failure
      if: failure()
      uses: actions/upload-artifact@v4
      with:
        name: release-build-logs-${{ steps.version.outputs.version }}
        path: |
          cardinal-android/app/build/reports/
          ~/.gradle/daemon/*/daemon-*.out.log
        retention-days: 7
+0 −16
Original line number Diff line number Diff line
![GitHub License](https://img.shields.io/github/license/ellenhp/cardinal)
![GitHub commit activity](https://img.shields.io/github/commit-activity/m/ellenhp/cardinal)
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/ellenhp/cardinal/build_android.yml)
![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/ellenhp/cardinal/total)
<a href="https://apps.obtainium.imranr.dev/redirect?r=obtainium://app/%7B%22id%22%3A%22earth.maps.cardinal%22%2C%22url%22%3A%22https%3A%2F%2Fgithub.com%2Fellenhp%2Fcardinal%22%2C%22author%22%3A%22ellenhp%22%2C%22name%22%3A%22Cardinal%20Maps%22%2C%22preferredApkIndex%22%3A0%2C%22additionalSettings%22%3A%22%7B%5C%22includePrereleases%5C%22%3Afalse%2C%5C%22fallbackToOlderReleases%5C%22%3Atrue%2C%5C%22filterReleaseTitlesByRegEx%5C%22%3A%5C%22%5C%22%2C%5C%22filterReleaseNotesByRegEx%5C%22%3A%5C%22%5C%22%2C%5C%22verifyLatestTag%5C%22%3Afalse%2C%5C%22sortMethodChoice%5C%22%3A%5C%22date%5C%22%2C%5C%22useLatestAssetDateAsReleaseDate%5C%22%3Afalse%2C%5C%22releaseTitleAsVersion%5C%22%3Afalse%2C%5C%22trackOnly%5C%22%3Afalse%2C%5C%22versionExtractionRegEx%5C%22%3A%5C%22%5C%22%2C%5C%22matchGroupToUse%5C%22%3A%5C%22%5C%22%2C%5C%22versionDetection%5C%22%3Afalse%2C%5C%22releaseDateAsVersion%5C%22%3Afalse%2C%5C%22useVersionCodeAsOSVersion%5C%22%3Afalse%2C%5C%22apkFilterRegEx%5C%22%3A%5C%22%5C%22%2C%5C%22invertAPKFilter%5C%22%3Afalse%2C%5C%22autoApkFilterByArch%5C%22%3Atrue%2C%5C%22appName%5C%22%3A%5C%22%5C%22%2C%5C%22appAuthor%5C%22%3A%5C%22%5C%22%2C%5C%22shizukuPretendToBeGooglePlay%5C%22%3Afalse%2C%5C%22allowInsecure%5C%22%3Afalse%2C%5C%22exemptFromBackgroundUpdates%5C%22%3Afalse%2C%5C%22skipUpdateNotifications%5C%22%3Afalse%2C%5C%22about%5C%22%3A%5C%22%5C%22%2C%5C%22refreshBeforeDownload%5C%22%3Afalse%7D%22%2C%22overrideSource%22%3Anull%7D" class="img-badge">
    <img src="assets/obtainium.png" alt="Get it on Obtainium" height=36 />
</a>

# Cardinal Maps

Cardinal Maps is a mapping application for Android designed to get out of your way and be there when you need it. We believe maps should be fast, private, and focused on what matters most—helping you navigate the world around you.
@@ -26,14 +18,6 @@ Every decision we make puts the user first:

<img src="assets/screenshot_basemap.png" width="33%" alt="Basemap view" style="padding: 0; margin: 0;"><img src="assets/screenshot_place_card.png" width="33%" alt="Place card view" style="padding: 0; margin: 0;"><img src="assets/screenshot_directions.png" width="33%" alt="Directions view" style="padding: 0; margin: 0;">

## Support the project

Cardinal maps is a labor of love with, currently, one committer. If you've been looking for something better in the FOSS maps space for years like me, and see the vision of Cardinal Maps, your support would mean the world. Anything from a small sponsorship on [GitHub Sponsors](https://github.com/sponsors/ellenhp) or [Liberapay](https://liberapay.com/ellenhp) to bug reports and pull requests help. Even starring the project is enough to give me a little dopamine hit and keep me motivated to continue work. 

## Contributing

If you'd like to help out we welcome contributions from the community! Please see our [Contributing Guidelines](CONTRIBUTING.md) for more information. Cardinal Maps is written in Rust and Kotlin and based on industry standard maps tooling, so feature work is rewarding and developer friction is low.

## License

This project is licensed under the GNU General Public License, version 3—see the [LICENSE.md](LICENSE.md) file for details.