Skip to content

Commit 9eba5e5

Browse files
authored
Merge pull request #19 from Qase/FIX/proguard_log
FIX: add proguard rule, exception on critical place
2 parents 30b38ca + 4930147 commit 9eba5e5

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

kotlinlog/build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ android {
1515
defaultConfig {
1616
minSdkVersion 16
1717
targetSdkVersion 27
18-
versionCode 2
19-
versionName "2.0"
20-
18+
versionCode 3
19+
versionName "2.2.2"
20+
consumerProguardFile('proguard-rules.pro')
2121
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
2222
}
2323
buildTypes {

kotlinlog/proguard-rules.pro

+3-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,6 @@
3131
# Most of volatile fields are updated with AFU and should not be mangled
3232
-keepclassmembernames class kotlinx.** {
3333
volatile <fields>;
34-
}
34+
}
35+
36+
-keep class quanti.com.kotlinlog.Log

kotlinlog/src/main/kotlin/quanti/com/kotlinlog/LogInternal.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package quanti.com.kotlinlog
33
import quanti.com.kotlinlog.base.ILogger
44
import quanti.com.kotlinlog.file.FileLogger
55
import quanti.com.kotlinlog.utils.getClassNameWithoutPackage
6-
import java.io.File
6+
import java.lang.IllegalStateException
77

88
/***
99
* PRIVATE
@@ -78,5 +78,5 @@ private fun getMethodStackTraceElement(): StackTraceElement {
7878
}
7979
}
8080

81-
return null!!
81+
throw IllegalStateException("class log.Log is missing")
8282
}

0 commit comments

Comments
 (0)