Skip to content

Commit

Permalink
Merge branch 'ipc-health-sdk-update' into IPC-108-payment-component-w…
Browse files Browse the repository at this point in the history
…ith-pay-invoice-button
  • Loading branch information
a-szotyori committed Feb 12, 2024
2 parents 877f1da + 970287c commit c9945a0
Show file tree
Hide file tree
Showing 11 changed files with 105 additions and 18 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/bank-sdk.check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,33 +132,37 @@ jobs:
java-version: '17'
cache: 'gradle'

- name: build debug screen api example app
- name: build release example app for QA
run: >
./gradlew bank-sdk:example-app:assembleDebug
./gradlew bank-sdk:example-app:assembleQaRelease
-PclientId="gini-mobile-test"
-PclientSecret="${{ secrets.GINI_MOBILE_TEST_CLIENT_SECRET }}"
-PreleaseKeystoreFile="screen_api_example.jks"
-PreleaseKeystorePassword='${{ secrets.BANK_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD }}'
-PreleaseKeyAlias="screen_api_example"
-PreleaseKeyPassword='${{ secrets.BANK_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD }}'
- name: archive debug screen api example app
- name: archive release example app for QA
uses: actions/upload-artifact@v3
with:
name: bank-sdk-example-app-debug
path: bank-sdk/example-app/build/outputs/apk/debug
name: bank-sdk-example-app-qa-release
path: bank-sdk/example-app/build/outputs/apk/qa/release

- name: build release screen api example app
- name: build release example app for production
run: >
./gradlew bank-sdk:example-app:assembleRelease
./gradlew bank-sdk:example-app:assembleProdRelease
-PclientId="gini-mobile-test"
-PclientSecret="${{ secrets.GINI_MOBILE_TEST_CLIENT_SECRET }}"
-PreleaseKeystoreFile="screen_api_example.jks"
-PreleaseKeystorePassword='${{ secrets.BANK_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD }}'
-PreleaseKeyAlias="screen_api_example"
-PreleaseKeyPassword='${{ secrets.BANK_SDK_EXAMPLE_APP_KEYSTORE_PASSWORD }}'
- name: archive release screen api example app
- name: archive release example app for production
uses: actions/upload-artifact@v3
with:
name: bank-sdk-example-app-release
path: bank-sdk/example-app/build/outputs/apk/release
name: bank-sdk-example-app-prod-release
path: bank-sdk/example-app/build/outputs/apk/prod/release

android-lint:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

# How to release
To publish releases follow these steps:
1. Create releases in Jira in PIA's project: https://ginis.atlassian.net/projects/PIA?selectedItem=com.atlassian.jira.jira-projects-plugin%3Arelease-page
1. For Capture SDK, Bank SDK and Bank API Library create releases in Jira in Photopayment's [project](https://ginis.atlassian.net/projects/PP?orderField=RANK&selectedItem=com.atlassian.jira.jira-projects-plugin:release-page&status=released-unreleased) and for Health SDK and Health API Library in the Insurance's [project](https://ginis.atlassian.net/projects/IPC?selectedItem=com.atlassian.jira.jira-projects-plugin:release-page).
1. Connect tickets to each release: for each to-be-released ticket add the release to its "Fix versions" field.
2. Add release notes in markdown format to each release's description (you can copy and update the release notes of a previous release).
Markdown formatting is needed because these release notes will be published on GitHub's [releases page](https://github.com/gini/gini-mobile-android/releases).
2. Read this
[wiki](https://ginis.atlassian.net/wiki/spaces/BANKING/pages/17236285/Support+multiple+Android+SDK+and+library+versions+parallely)
[wiki](https://ginis.atlassian.net/wiki/spaces/PLMO/pages/83787798/Support+multiple+Android+SDK+and+library+versions+parallely)
page to determine which branch to use because we support three main version (1.x.x, 2.x.x and 3.x.x).
3. Check out or create the required branch and bump the version numbers:
1. Bump the version in each to-be-released module's:
Expand Down
9 changes: 8 additions & 1 deletion bank-sdk/example-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,11 @@ $ ./gradlew bank-sdk:example-app:assembleRelease \
-PclientId=<Gini API client id> \
-PclientSecret=<Gini API client secret>
```


Flavors
=======

The example app has three flavors: `dev`, `prod` and `qa`. The `dev` flavor is used by default. The `prod` flavor
is used for creating release builds which can be shared with clients while the `qa` flavor is used for creating release builds
for QA purposes. The difference between `prod` and `qa` is that `qa` allows using custom SSL root certificates for
SSL proxies (e.g. Charles Proxy).
13 changes: 13 additions & 0 deletions bank-sdk/example-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,19 @@ android {
resValue("string", "gini_api_client_secret", credentials["clientSecret"] ?: "")
}
}
flavorDimensions += "environment"
productFlavors {
create("prod") {
dimension = "environment"
}
create("dev") {
isDefault = true
dimension = "environment"
}
create("qa") {
dimension = "environment"
}
}
compileOptions {
sourceCompatibility(JavaVersion.VERSION_1_8)
targetCompatibility(JavaVersion.VERSION_1_8)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<network-security-config>
<debug-overrides>
<base-config cleartextTrafficPermitted="false">
<trust-anchors>
<!-- Trust user added CAs while debuggable only -->
<certificates src="system" />
<certificates src="user" />
</trust-anchors>
</debug-overrides>
</base-config>
</network-security-config>
6 changes: 6 additions & 0 deletions bank-sdk/example-app/src/qa/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application android:networkSecurityConfig="@xml/network_security_config" />

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<network-security-config>
<base-config cleartextTrafficPermitted="false">
<trust-anchors>
<certificates src="system" />
<certificates src="user" />
</trust-anchors>
</base-config>
</network-security-config>
1 change: 1 addition & 0 deletions bank-sdk/sdk/consumer-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-keep class net.gini.android.bank.sdk.capture.digitalinvoice.SelectableLineItem
4 changes: 4 additions & 0 deletions capture-sdk/sdk/consumer-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-keep class net.gini.android.capture.network.model.GiniCaptureReturnReason
-keep class net.gini.android.capture.Document
-keep class net.gini.android.capture.error.ErrorType
-keep class net.gini.android.capture.DocumentImportEnabledFileTypes
48 changes: 46 additions & 2 deletions core-api-library/library/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,55 @@
# public *;
#}

# Retain Retrofit service methods
-keep,allowobfuscation interface * {
# Retrofit does reflection on generic parameters. InnerClasses is required to use Signature and
# EnclosingMethod is required to use InnerClasses.
-keepattributes Signature, InnerClasses, EnclosingMethod

# Retrofit does reflection on method and parameter annotations.
-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations

# Keep annotation default values (e.g., retrofit2.http.Field.encoded).
-keepattributes AnnotationDefault

# Retain service method parameters when optimizing.
-keepclassmembers,allowshrinking,allowobfuscation interface * {
@retrofit2.http.* <methods>;
}

# Ignore annotation used for build tooling.
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement

# Ignore JSR 305 annotations for embedding nullability information.
-dontwarn javax.annotation.**

# Guarded by a NoClassDefFoundError try/catch and only used when on the classpath.
-dontwarn kotlin.Unit

# Top-level functions that can only be used by Kotlin.
-dontwarn retrofit2.KotlinExtensions
-dontwarn retrofit2.KotlinExtensions$*

# With R8 full mode, it sees no subtypes of Retrofit interfaces since they are created with a Proxy
# and replaces all potential values with null. Explicitly keeping the interfaces prevents this.
-if interface * { @retrofit2.http.* <methods>; }
-keep,allowobfuscation interface <1>

# Keep inherited services.
-if interface * { @retrofit2.http.* <methods>; }
-keep,allowobfuscation interface * extends <1>

# With R8 full mode generic signatures are stripped for classes that are not
# kept. Suspend functions are wrapped in continuations where the type argument
# is used.
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation

# R8 full mode strips generic signatures from return types if not kept.
-if interface * { @retrofit2.http.* public *** *(...); }
-keep,allowoptimization,allowshrinking,allowobfuscation class <3>

# With R8 full mode generic signatures are stripped for classes that are not kept.
-keep,allowobfuscation,allowshrinking class retrofit2.Response

# Ignore these missing classes related to okhttp3 as they are not used on Android
-dontwarn org.bouncycastle.jsse.BCSSLParameters
-dontwarn org.bouncycastle.jsse.BCSSLSocket
Expand Down

0 comments on commit c9945a0

Please sign in to comment.