-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from Kshitij09/enhancement/build-configurations
* Added launcher icon (separate for debug & release) * Added secret files required for debug & release variants * Configured workflow to use GitHub secrets to decrypt and use secret files * Prepared separate workflows Build/Test & Release
- Loading branch information
Showing
27 changed files
with
389 additions
and
239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Draft Release | ||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
|
||
env: | ||
ORG_GRADLE_PROJECT_TAZABAZAR_RELEASE_PWD: ${{ secrets.ORG_GRADLE_PROJECT_TAZABAZAR_RELEASE_PWD }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Copy CI gradle.properties | ||
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
|
||
- name: Decrypt Release Keystore | ||
env: | ||
ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }} | ||
run: ./scripts/decrypt_secrets.sh | ||
|
||
- name: Generate Cache key | ||
run: ./scripts/checksum.sh checksum.txt | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.gradle/caches/modules-* | ||
~/.gradle/caches/jars-* | ||
~/.gradle/caches/build-cache-* | ||
key: gradle-${{ hashFiles('checksum.txt') }} | ||
|
||
- name: Build Project | ||
run: ./gradlew assembleDebug assembleRelease --stacktrace | ||
|
||
- name: Run Unit tests | ||
run: ./gradlew test -Pprod --stacktrace | ||
|
||
- name: Clean Secrets | ||
run: ./scripts/clean_secrets.sh | ||
|
||
- name: Create Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
with: | ||
draft: true | ||
files: | | ||
app/build/outputs/apk/release/app-release.apk | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,89 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile | ||
-dontwarn kotlin.reflect.jvm.internal.** | ||
|
||
-keep class kotlin.reflect.jvm.internal.** { *; } | ||
|
||
-keep interface javax.annotation.Nullable | ||
|
||
# For enumeration classes | ||
-keepclassmembers enum * { | ||
public static **[] values(); | ||
public static ** valueOf(java.lang.String); | ||
} | ||
|
||
# AndroidX + support library contains references to newer platform versions. | ||
# Don't warn about those in case this app is linking against an older | ||
# platform version. We know about them, and they are safe. | ||
-dontwarn android.support.** | ||
-dontwarn androidx.** | ||
|
||
-keepattributes SourceFile,LineNumberTable | ||
-renamesourcefileattribute SourceFile | ||
|
||
# Retain the generic signature of retrofit2.Call until added to Retrofit. | ||
# Issue: https://github.com/square/retrofit/issues/3580. | ||
# Pull request: https://github.com/square/retrofit/pull/3579. | ||
-keep,allowobfuscation,allowshrinking class retrofit2.Call | ||
|
||
#### OkHttp, Retrofit and Moshi | ||
-dontwarn okhttp3.** | ||
-dontwarn retrofit2.Platform$Java8 | ||
-dontwarn okio.** | ||
-dontwarn javax.annotation.** | ||
-keepclasseswithmembers class * { | ||
@com.squareup.moshi.* <methods>; | ||
} | ||
-keep @com.squareup.moshi.JsonQualifier interface * | ||
-dontwarn org.jetbrains.annotations.** | ||
-keep class kotlin.Metadata { *; } | ||
-keepclassmembers class kotlin.Metadata { | ||
public <methods>; | ||
} | ||
|
||
-keepclassmembers class * { | ||
@com.squareup.moshi.FromJson <methods>; | ||
@com.squareup.moshi.ToJson <methods>; | ||
} | ||
|
||
# ref: https://stackoverflow.com/a/69149384/6738702 | ||
# Keep helper method to avoid R8 optimisation that would keep all Kotlin Metadata when unwanted | ||
-keepclassmembers class com.squareup.moshi.internal.Util { | ||
private static java.lang.String getKotlinMetadataClassName(); | ||
} | ||
|
||
# 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, | ||
RuntimeVisibleTypeAnnotations | ||
|
||
# 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>; | ||
} | ||
|
||
# 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 generic signature of Call, Response (R8 full mode strips signatures from non-kept items). | ||
-keep,allowobfuscation,allowshrinking interface retrofit2.Call | ||
-keep,allowobfuscation,allowshrinking class retrofit2.Response | ||
|
||
# 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 |
Oops, something went wrong.