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
45 changes: 25 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,40 @@
name: Build

on: [push, pull_request]
on:
workflow_dispatch:
inputs:
appBranch:
description: 'App GitHub branch to build'
required: true
default: 'master'

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: set up JDK 17
- name: Checkout Specified Branch
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.appBranch }}
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
distribution: 'adopt'
cache: 'gradle'
- name: Setup Keystore
run: |
echo "${{ secrets.SIGNING_KEY }}" > release.b64
base64 -d release.b64 > release.keystore
- name: mobsfscan
uses: MobSF/mobsfscan@0.2.0
with:
args: '. --sarif --output results.sarif || true'
- name: Upload mobsfscan report
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: results.sarif
#- name: mobsfscan
# uses: MobSF/mobsfscan@0.2.0
# with:
# args: '. --sarif --output results.sarif || true'
#- name: Upload mobsfscan report
# uses: github/codeql-action/upload-sarif@v2
# with:
# sarif_file: results.sarif
- name: Build with Gradle
run: |
./gradlew clean assembleRelease \
Expand All @@ -40,18 +48,15 @@ jobs:
with:
report-path: build/reports/*.xml
follow-symbolic-links: true
- name: print lint xml results
- name: Print Lint XML Results
uses: hidakatsuya/action-report-android-lint@v1.1.4
with:
result-path: 'mapcache/build/reports/lint-results-debug.xml'
fail-on-warning: false
- name: Verify Signature
run: $ANDROID_SDK_ROOT/build-tools/33.0.1/apksigner verify --print-certs mapcache/build/outputs/apk/release/mapcache.apk
- name: List files in the repository
run: |
ls -R ${{ github.workspace }}
run: $ANDROID_SDK_ROOT/build-tools/34.0.0/apksigner verify --print-certs mapcache/build/outputs/apk/release/mapcache.apk
- name: Upload Artifacts
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: mapcache
path: mapcache/build/outputs/apk/release/mapcache.apk
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
mavenLocal()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.3.2'
classpath 'com.android.tools.build:gradle:8.7.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Apr 17 05:10:50 MDT 2024
#Tue Mar 18 15:56:06 CDT 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
24 changes: 17 additions & 7 deletions mapcache/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
apply plugin: 'com.android.application'
plugins {
id 'com.android.application'
id 'kotlin-android'
}

def googleMapsApiReleaseKey = hasProperty('RELEASE_MAPS_MAPCACHE_API_KEY') ? RELEASE_MAPS_MAPCACHE_API_KEY : ''
def googleMapsApiKeyDebug = hasProperty('DEBUG_MAPS_API_KEY') ? DEBUG_MAPS_API_KEY : ''
Expand All @@ -8,8 +11,16 @@ android {
namespace 'mil.nga.mapcache'

compileOptions {
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = "17"
}

kotlin {
jvmToolchain(17)
}

// Verbose logging for debug
Expand Down Expand Up @@ -64,10 +75,9 @@ android {
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
resources {
excludes += ['META-INF/LICENSE', 'META-INF/LICENSE.txt', 'META-INF/NOTICE', 'META-INF/NOTICE.txt']
}
}
sourceSets {
main {
Expand Down