Skip to content

Commit

Permalink
Merge pull request #19 from Qase/FIX/proguard_log
Browse files Browse the repository at this point in the history
FIX: add proguard rule, exception on critical place
  • Loading branch information
havlisimo authored Dec 15, 2020
2 parents 30b38ca + 4930147 commit 9eba5e5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions kotlinlog/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ android {
defaultConfig {
minSdkVersion 16
targetSdkVersion 27
versionCode 2
versionName "2.0"

versionCode 3
versionName "2.2.2"
consumerProguardFile('proguard-rules.pro')
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
4 changes: 3 additions & 1 deletion kotlinlog/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,6 @@
# Most of volatile fields are updated with AFU and should not be mangled
-keepclassmembernames class kotlinx.** {
volatile <fields>;
}
}

-keep class quanti.com.kotlinlog.Log
4 changes: 2 additions & 2 deletions kotlinlog/src/main/kotlin/quanti/com/kotlinlog/LogInternal.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package quanti.com.kotlinlog
import quanti.com.kotlinlog.base.ILogger
import quanti.com.kotlinlog.file.FileLogger
import quanti.com.kotlinlog.utils.getClassNameWithoutPackage
import java.io.File
import java.lang.IllegalStateException

/***
* PRIVATE
Expand Down Expand Up @@ -78,5 +78,5 @@ private fun getMethodStackTraceElement(): StackTraceElement {
}
}

return null!!
throw IllegalStateException("class log.Log is missing")
}

0 comments on commit 9eba5e5

Please sign in to comment.