Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v4.1 #117

Merged
merged 64 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
0079c2e
Upgrade libs versions & small refactoring
alexandr7035 Mar 2, 2023
271e62e
CredentialStatus enum to sealed class
alexandr7035 Mar 2, 2023
948e082
Allow issuing VC if previous is expired
alexandr7035 Mar 3, 2023
3b7d18c
Same sorting for cloud and cache VC lists
alexandr7035 Mar 3, 2023
57ca946
Biometrics: basic ui
alexandr7035 Mar 5, 2023
66a1c34
Save app locked with biometrics flag
alexandr7035 Mar 5, 2023
b845ffd
Snack when biometrics disabled
alexandr7035 Mar 5, 2023
aeefef7
Biometric lock screen UI
alexandr7035 Mar 6, 2023
4e25f25
Refactoring of auth navigation and errors
alexandr7035 Mar 8, 2023
2d413ce
Add AuthController interface
alexandr7035 Mar 8, 2023
4a7235f
Logout from biometrics lock screen
alexandr7035 Mar 8, 2023
c4996d1
Merge pull request #115 from alexandr7035/biometrics
alexandr7035 Mar 14, 2023
a369329
Update app settings: add auth params
alexandr7035 Mar 14, 2023
79384cb
Add Result class
alexandr7035 Mar 14, 2023
6e91d19
Add profile data to app settings
alexandr7035 Mar 14, 2023
c972dac
Remove unused code
alexandr7035 Mar 14, 2023
43980b7
Add username in signup flow
alexandr7035 Mar 14, 2023
7e23c63
Rename Result class to avoid mising with kotlin's
alexandr7035 Mar 14, 2023
5c55296
Upodate login models, add refreshToken
alexandr7035 Mar 14, 2023
efca1d5
Refactoring of auth check use case
alexandr7035 Mar 14, 2023
51a1c7c
Add username to SignUpResponseModel.kt
alexandr7035 Mar 14, 2023
d18af4c
Remove auth state from use cases, handle in data layer
alexandr7035 Mar 14, 2023
3c453ec
Refactoring of ProfileRepository
alexandr7035 Mar 14, 2023
f202df1
Refactoring: remove unused code
alexandr7035 Mar 14, 2023
0ea47e3
Add logger to domain layer
alexandr7035 Mar 15, 2023
614b0a0
Implement refreshing access token
alexandr7035 Mar 15, 2023
adab08d
Add clearSettings() method
alexandr7035 Mar 15, 2023
b6f2fb0
Fix clear user data on logout
alexandr7035 Mar 28, 2023
f54f7e2
Clear user data on refresh token fails
alexandr7035 Mar 28, 2023
4dcf46c
Merge branch 'auth-refactoring' into develop
alexandr7035 Mar 28, 2023
a366641
Add core code for viewpager
alexandr7035 Mar 29, 2023
4b27fb4
Refactoring of biometrics lock
alexandr7035 Mar 29, 2023
a108e2f
Fix filters issue for credentials list
alexandr7035 Apr 19, 2023
889e3e0
Remove unused filters class
alexandr7035 Apr 19, 2023
8344d7e
Use DiffUtil in wallet recycler
alexandr7035 Apr 19, 2023
75600ee
Fix deps
alexandr7035 Jul 3, 2023
e109a1a
Add copyright note
alexandr7035 Jul 3, 2023
4001651
Fix tab order for UX
alexandr7035 Jul 3, 2023
0bf5a52
Migrate to kotlin in gradle scripts
alexandr7035 Jul 4, 2023
d746ec6
Fix api key
alexandr7035 Jul 4, 2023
8de0c39
Cleanup
alexandr7035 Jul 4, 2023
7d3b598
Add ui for new credential scanner
alexandr7035 Jul 6, 2023
199b01d
Add permissions lib and handle camera permission
alexandr7035 Jul 6, 2023
8a0c76f
Add extensions to get nav result in Fragment
alexandr7035 Jul 10, 2023
4532053
Observe qr result in new verification
alexandr7035 Jul 10, 2023
0f0dd2c
Remove old scan qr fragment
alexandr7035 Jul 10, 2023
f6f8ed8
Merge branch 'verify_refactoring' into develop
alexandr7035 Jul 10, 2023
0f9cbb4
Small fixes
alexandr7035 Jul 11, 2023
48ac474
Fix biometrics lock
alexandr7035 Jul 11, 2023
d8164bc
Fix text
alexandr7035 Jul 11, 2023
3c65435
Add https://github.com/klaxit/hidden-secrets-gradle-plugin
alexandr7035 Jul 16, 2023
b977f7f
Use secrets plugin
alexandr7035 Jul 16, 2023
82ca1d1
Remove apikey from gradle properties
alexandr7035 Jul 16, 2023
e59c7d6
Merge branch 'keys' into develop
alexandr7035 Jul 16, 2023
fbd3473
Try fixing job
alexandr7035 Jul 16, 2023
91ad38b
Try fixing job
alexandr7035 Jul 16, 2023
d806b0d
Add distribution
alexandr7035 Jul 16, 2023
5164aa0
Fix workflow: v3
alexandr7035 Jul 16, 2023
770b324
UX: Pop backstack when password changed
alexandr7035 Jul 17, 2023
c0eb91d
Add extensions to hide keyboard
alexandr7035 Jul 17, 2023
9f4abba
Fix text
alexandr7035 Jul 17, 2023
331f8af
Add proguard rules
alexandr7035 Jul 21, 2023
38915ed
Merge branch 'obfs' into develop
alexandr7035 Jul 21, 2023
b05a384
Disable HttpLoggingInterceptor for release builds
alexandr7035 Jul 21, 2023
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
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
Loading