Skip to content

Commit

Permalink
Merge pull request #117 from alexandr7035/develop
Browse files Browse the repository at this point in the history
Release v4.1
  • Loading branch information
alexandr7035 authored Jul 24, 2023
2 parents ac0dc52 + b05a384 commit 2dce2ee
Show file tree
Hide file tree
Showing 134 changed files with 2,101 additions and 1,291 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/launch_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,28 @@ name: Unit tests
on:
# Triggers the workflow on pull request events for the master branch
pull_request:
branches: [ master ]
branches: [master]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v3

# Set up JDK 17
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'oracle'
java-version: 17

# Run Unit Tests
- name: Run Unit Tests
run: ./gradlew test
run: ./gradlew test
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ app/release
keystore.properties
gradle.properties

# Secrets
credentials.properties
data/src/main/cpp/secrets.cpp
data/src/main/java/by/alexandr7035/data/secrets/Secrets.kt

*.iml
.gradle
/local.properties
Expand Down
113 changes: 0 additions & 113 deletions app/build.gradle

This file was deleted.

128 changes: 128 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
import java.util.Properties
import java.io.FileInputStream

plugins {
id("com.android.application")
id("kotlin-android")
id("kotlin-kapt")
id("dagger.hilt.android.plugin")
id("androidx.navigation.safeargs")
}

val keystorePropertiesFile = rootProject.file("keystore.properties")
val keystoreProperties = Properties().apply {
load(FileInputStream(keystorePropertiesFile))
}

android {
compileSdk = 33

signingConfigs {
create("config") {
keyAlias = keystoreProperties["keyAlias"] as String
keyPassword = keystoreProperties["keyPassword"] as String
storeFile = file(keystoreProperties["storeFile"] as String)
storePassword = keystoreProperties["storePassword"] as String
}
}

defaultConfig {
applicationId = "by.alexandr7035.affinidi_id"
minSdk = 21
targetSdk = 33
versionCode = 700
versionName = "4.1"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
getByName("release") {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}

getByName("debug") {
signingConfig = signingConfigs.getByName("config")
applicationIdSuffix = ".debug"
isDebuggable = true
versionNameSuffix = ".debug"
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}

buildFeatures {
viewBinding = true
}
namespace = "by.alexandr7035.affinidi_id"
}

dependencies {
implementation(project(":domain"))
implementation(project(":data"))

implementation("androidx.core:core-ktx:1.10.1")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("com.google.android.material:material:1.9.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.legacy:legacy-support-v4:1.0.0")
implementation("androidx.biometric:biometric-ktx:1.2.0-alpha05")
testImplementation("junit:junit:4.+")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")

// Hilt
implementation("com.google.dagger:hilt-android:2.44")
kapt("com.google.dagger:hilt-android-compiler:2.44")

// Timber
implementation("com.jakewharton.timber:timber:5.0.1")

// Retrofit
implementation("com.squareup.retrofit2:retrofit:2.9.0")
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
implementation("com.squareup.okhttp3:logging-interceptor:4.9.3")

// Room
val room_version = "2.5.0"
implementation("androidx.room:room-runtime:$room_version")
kapt("androidx.room:room-compiler:$room_version")
implementation("androidx.room:room-ktx:$room_version")

// Navigation
val navVersion = "2.6.0"
implementation("androidx.navigation:navigation-fragment-ktx:$navVersion")
implementation("androidx.navigation:navigation-ui-ktx:$navVersion")

// ViewBinding delegate
val viewbindingdelegateVersion = "1.5.6"
implementation("com.github.kirich1409:viewbindingpropertydelegate-noreflection:$viewbindingdelegateVersion")

// Coil
implementation("io.coil-kt:coil:2.3.0")
implementation("io.coil-kt:coil-svg:2.3.0")

// CircleImageView
implementation("de.hdodenhof:circleimageview:3.1.0")

// QR code scanning
implementation("com.journeyapps:zxing-android-embedded:4.3.0") {
isTransitive = false
}
implementation("com.google.zxing:core:3.3.0")

implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.2")

// Kotlin SharedPrefs wrapper
implementation("com.github.cioccarellia:ksprefs:2.3.2")

// Permissions lib
implementation("com.guolindev.permissionx:permissionx:1.7.1")
}
75 changes: 74 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,76 @@
-keepattributes Signature
-keepattributes *Annotation*
-keepattributes InnerClasses, EnclosingMethod
-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations
-keepattributes AnnotationDefault

### Gson
-dontwarn org.bouncycastle.jsse.**
-dontwarn org.conscrypt.**
-dontwarn org.openjsse.**

-keep class com.google.gson.examples.android.model.** { <fields>; }
-keep class * extends com.google.gson.TypeAdapter
-keep class * implements com.google.gson.TypeAdapterFactory
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer

-keepclassmembers,allowobfuscation class * {
@com.google.gson.annotations.SerializedName <fields>;
}

-keepclassmembers class com.google.gson.JsonObject {
*;
}

-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken
-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken

# Specific serialized classes
-keep class by.alexandr7035.data.model.** { *; }
-keep class by.alexandr7035.affinidi_id.domain.model.credentials.issue_vc.credential_subject.** { *; }

### Retrofit
# 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>

# R8 full mode strips generic signatures from return types if not kept.
-keep,allowobfuscation,allowshrinking class retrofit2.Response


# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
Expand All @@ -14,7 +87,7 @@

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="by.alexandr7035.affinidi_id">
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET"/>

Expand Down
Loading

0 comments on commit 2dce2ee

Please sign in to comment.