Skip to content

Commit

Permalink
Merge pull request #83 from ngageoint/develop
Browse files Browse the repository at this point in the history
Release v2.1.11
geopackage android map 6.7.3 with blob support
backend library updates
create sample geopackage on launch
build script updates to run lint
  • Loading branch information
jclark118 authored Jan 12, 2024
2 parents 6cc48ca + b3e803f commit 59b532f
Show file tree
Hide file tree
Showing 12 changed files with 10,697 additions and 123 deletions.
41 changes: 27 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: set up JDK 16
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 16
java-version: 17
distribution: 'adopt'
- name: Setup Keystore
run: |
echo "${{ secrets.SIGNING_KEY }}" > release.b64
base64 -d release.b64 > release.keystore
- name: mobsfscan
uses: MobSF/[email protected]
with:
Expand All @@ -24,21 +28,30 @@ jobs:
with:
sarif_file: results.sarif
- name: Build with Gradle
run: ./gradlew assembleRelease -PRELEASE_MAPS_MAPCACHE_API_KEY=${{ secrets.RELEASE_MAPS_MAPCACHE_API_KEY }}
- name: Sign APK
uses: r0adkll/sign-android-release@v1
run: |
./gradlew clean assembleRelease \
-PKEYSTORE=../release.keystore \
-PKEYSTORE_PASSWORD=${{ secrets.KEY_STORE_PASSWORD }} \
-PKEY_ALIAS=${{ secrets.ALIAS }} \
-PKEY_PASSWORD=${{ secrets.KEY_PASSWORD }} \
-PRELEASE_MAPS_MAPCACHE_API_KEY=${{ secrets.RELEASE_MAPS_MAPCACHE_API_KEY }}
- run: ./gradlew lint
- uses: yutailang0119/[email protected]
with:
report-path: build/reports/*.xml
follow-symbolic-links: true
- name: print lint xml results
uses: hidakatsuya/[email protected]
with:
releaseDirectory: mapcache/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Copy Release Artifacts
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: |
mkdir mapcache/build/release
cp mapcache/build/outputs/apk/release/mapcache-*-signed.apk "mapcache/build/release/mapcache-$(./gradlew mapcache:androidAppVersion | grep versionName | sed 's/^.*@//').apk"
ls -R ${{ github.workspace }}
- name: Upload Artifacts
uses: actions/upload-artifact@v1
with:
name: mapcache
path: mapcache/build/release
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
@@ -1,6 +1,6 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.7.10'
ext.kotlin_version = '1.8.0'

repositories {
google()
Expand Down
59 changes: 32 additions & 27 deletions mapcache/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ def googleMapsApiReleaseKey = hasProperty('RELEASE_MAPS_MAPCACHE_API_KEY') ? REL
def googleMapsApiKeyDebug = hasProperty('DEBUG_MAPS_API_KEY') ? DEBUG_MAPS_API_KEY : ''

android {
compileSdkVersion 33
compileSdkVersion 34

compileOptions {
sourceCompatibility JavaVersion.VERSION_11
Expand All @@ -22,14 +22,33 @@ android {
resValue "string", "applicationId", applicationId
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
minSdkVersion 28
targetSdkVersion 33
versionCode 59
versionName '2.1.10'
targetSdkVersion 34
versionCode 64
versionName '2.1.11'
multiDexEnabled true
}
signingConfigs {
release {
if (project.hasProperty('KEYSTORE')) {
println 'assigning keystore'
storeFile file(KEYSTORE)
storePassword KEYSTORE_PASSWORD
keyAlias KEY_ALIAS
keyPassword KEY_PASSWORD
} else {
println 'no keystore property configured'
}
}
}
buildTypes {
release {
applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "mapcache.apk"
}
}
minifyEnabled false
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
resValue "string", "GOOGLE_MAPS_ANDROID_API_KEY", googleMapsApiReleaseKey
}
Expand All @@ -53,6 +72,11 @@ android {
}
}
}
lint {
baseline file("lint-baseline.xml")
checkReleaseBuilds false
abortOnError false
}
}

task androidAppVersion {
Expand All @@ -64,11 +88,12 @@ task androidAppVersion {

dependencies {
api "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
api 'androidx.appcompat:appcompat:1.3.0'
api 'androidx.appcompat:appcompat:1.6.1'
api 'androidx.activity:activity:1.8.1'
api 'com.google.android.material:material:1.6.0'
api 'androidx.preference:preference:1.2.1'
api 'androidx.lifecycle:lifecycle-extensions:2.2.0'
api 'mil.nga.geopackage.map:geopackage-android-map:6.7.2' // comment out to build locally
api 'mil.nga.geopackage.map:geopackage-android-map:6.7.3' // comment out to build locally
//api project(':geopackage-map') // uncomment me to build locally
api 'mil.nga.mgrs:mgrs-android:2.2.2'
api 'mil.nga.gars:gars-android:1.2.2'
Expand All @@ -91,26 +116,6 @@ dependencies {
testImplementation 'androidx.test:rules:1.5.0'
}

configure extensions.android, {
if (project.hasProperty('RELEASE_STORE_FILE') && new File((String) project.getProperty('RELEASE_STORE_FILE')).exists()) {
signingConfigs {
release {
storeFile file(RELEASE_STORE_FILE)
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
}
}
buildTypes {
release {
setSigningConfig(signingConfigs.release)
}
}
} else {
println 'no keystore configured'
}
}

// This is to fix the errors : java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener;
configurations.all {
resolutionStrategy.eachDependency { details ->
Expand All @@ -123,4 +128,4 @@ configurations.all {
}
}

apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android'
Loading

0 comments on commit 59b532f

Please sign in to comment.