-
Notifications
You must be signed in to change notification settings - Fork 148
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 #15 from dmitriy-ilchenko/develop
Develop
- Loading branch information
Showing
55 changed files
with
1,370 additions
and
99 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
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,20 @@ | ||
{ | ||
"version": 1, | ||
"artifactType": { | ||
"type": "APK", | ||
"kind": "Directory" | ||
}, | ||
"applicationId": "com.example.barcodescanner", | ||
"variantName": "fDroidRelease", | ||
"elements": [ | ||
{ | ||
"type": "SINGLE", | ||
"filters": [], | ||
"properties": [], | ||
"versionCode": 3, | ||
"versionName": "1.1", | ||
"enabled": true, | ||
"outputFile": "app-fDroid-release.apk" | ||
} | ||
] | ||
} |
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,20 @@ | ||
{ | ||
"version": 1, | ||
"artifactType": { | ||
"type": "APK", | ||
"kind": "Directory" | ||
}, | ||
"applicationId": "com.example.barcodescanner", | ||
"variantName": "getAppsRelease", | ||
"elements": [ | ||
{ | ||
"type": "SINGLE", | ||
"filters": [], | ||
"properties": [], | ||
"versionCode": 3, | ||
"versionName": "1.1", | ||
"enabled": true, | ||
"outputFile": "app-getApps-release.apk" | ||
} | ||
] | ||
} |
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,79 @@ | ||
# 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 | ||
-renamesourcefileattribute SourceFile | ||
-keepattributes SourceFile,LineNumberTable | ||
|
||
# Kotlin | ||
#https://stackoverflow.com/questions/33547643/how-to-use-kotlin-with-proguard | ||
#https://medium.com/@AthorNZ/kotlin-metadata-jackson-and-proguard-f64f51e5ed32 | ||
-keepclassmembers class **$WhenMappings { | ||
<fields>; | ||
} | ||
-keep class kotlin.Metadata { *; } | ||
-keepclassmembers class kotlin.Metadata { | ||
public <methods>; | ||
} | ||
|
||
# Android X | ||
-dontwarn androidx.** | ||
-dontwarn com.google.android.material.** | ||
-keep interface androidx.* { *; } | ||
-keep class androidx.** { *; } | ||
-keep class com.google.android.material.** { *; } | ||
|
||
# RxJava, RxAndroid (https://gist.github.com/kosiara/487868792fbd3214f9c9) | ||
-keep class rx.schedulers.Schedulers { | ||
public static <methods>; | ||
} | ||
-keep class rx.schedulers.ImmediateScheduler { | ||
public <methods>; | ||
} | ||
-keep class rx.schedulers.TestScheduler { | ||
public <methods>; | ||
} | ||
-keep class rx.schedulers.Schedulers { | ||
public static ** test(); | ||
} | ||
-keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* { | ||
long producerIndex; | ||
long consumerIndex; | ||
} | ||
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef { | ||
long producerNode; | ||
long consumerNode; | ||
} | ||
-dontwarn sun.misc.Unsafe | ||
-dontwarn org.reactivestreams.FlowAdapters | ||
-dontwarn org.reactivestreams.** | ||
-dontwarn java.util.concurrent.flow.** | ||
-dontwarn java.util.concurrent.** | ||
|
||
### Gson uses generic type information stored in a class file when working with fields. Proguard | ||
# removes such information by default, so configure it to keep all of it. | ||
-keepattributes Signature | ||
|
||
# For using GSON @Expose annotation | ||
-keepattributes *Annotation* | ||
|
||
# Gson specific classes | ||
-keep class sun.misc.Unsafe { *; } | ||
-keep class com.google.gson.stream.** { *; } | ||
|
||
# Application classes that will be serialized/deserialized over Gson | ||
-keep class com.google.gson.examples.android.model.** { *; } | ||
|
||
# Prevent proguard from stripping interface information from TypeAdapterFactory, | ||
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter) | ||
-keep class * implements com.google.gson.TypeAdapterFactory | ||
-keep class * implements com.google.gson.JsonSerializer | ||
-keep class * implements com.google.gson.JsonDeserializer | ||
|
||
# LeakCanary | ||
-keep class org.eclipse.mat.** { *; } | ||
-keep class com.squareup.leakcanary.** { *; } | ||
|
||
# Room | ||
-dontwarn androidx.room.paging.** | ||
-keep class * extends androidx.room.RoomDatabase | ||
|
||
# VCard Parser | ||
-dontwarn ezvcard.** | ||
-keep,includedescriptorclasses class ezvcard.** { *; } |
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
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
7 changes: 7 additions & 0 deletions
7
app/src/main/java/com/example/barcodescanner/extension/ByteArray.kt
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,7 @@ | ||
package com.example.barcodescanner.extension | ||
|
||
import org.apache.commons.codec.binary.Base32 | ||
|
||
fun ByteArray.encodeBase32(): String { | ||
return Base32().encodeAsString(this) | ||
} |
5 changes: 5 additions & 0 deletions
5
app/src/main/java/com/example/barcodescanner/extension/Long.kt
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,5 @@ | ||
package com.example.barcodescanner.extension | ||
|
||
fun Long?.orZero(): Long { | ||
return this ?: 0L | ||
} |
38 changes: 38 additions & 0 deletions
38
app/src/main/java/com/example/barcodescanner/extension/String.kt
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
10 changes: 10 additions & 0 deletions
10
app/src/main/java/com/example/barcodescanner/extension/Uri.kt
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,10 @@ | ||
package com.example.barcodescanner.extension | ||
|
||
import android.net.Uri | ||
|
||
fun Uri.Builder.appendQueryParameterIfNotNullOrBlank(key: String, value: String?): Uri.Builder { | ||
if (value.isNullOrBlank().not()) { | ||
appendQueryParameter(key, value) | ||
} | ||
return this | ||
} |
Oops, something went wrong.