diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index b185698..43a7856 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -12,7 +12,6 @@
-
diff --git a/app/build.gradle b/app/build.gradle
index 085590a..3e7e82d 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -39,8 +39,7 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.3'
- debugImplementation(project(':rsod'))
- releaseImplementation(project(':rsod-no-impl'))
+ implementation(project(':rsod'))
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
diff --git a/rsod-no-impl/.gitignore b/rsod-no-impl/.gitignore
deleted file mode 100644
index 42afabf..0000000
--- a/rsod-no-impl/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
\ No newline at end of file
diff --git a/rsod-no-impl/build.gradle b/rsod-no-impl/build.gradle
deleted file mode 100644
index 74d9c34..0000000
--- a/rsod-no-impl/build.gradle
+++ /dev/null
@@ -1,44 +0,0 @@
-plugins {
- id 'com.android.library'
- id 'kotlin-android'
-}
-
-android {
- compileSdkVersion 30
- buildToolsVersion "30.0.2"
-
- defaultConfig {
- minSdkVersion 21
- targetSdkVersion 30
- versionCode 1
- versionName "1.0"
-
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- consumerProguardFiles "consumer-rules.pro"
- }
-
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
- }
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- kotlinOptions {
- jvmTarget = '1.8'
- }
-}
-
-dependencies {
-
- implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
- implementation 'androidx.core:core-ktx:1.3.2'
- implementation 'androidx.appcompat:appcompat:1.2.0'
- implementation 'com.google.android.material:material:1.2.1'
- testImplementation 'junit:junit:4.+'
- androidTestImplementation 'androidx.test.ext:junit:1.1.2'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
-}
\ No newline at end of file
diff --git a/rsod-no-impl/consumer-rules.pro b/rsod-no-impl/consumer-rules.pro
deleted file mode 100644
index e69de29..0000000
diff --git a/rsod-no-impl/proguard-rules.pro b/rsod-no-impl/proguard-rules.pro
deleted file mode 100644
index 481bb43..0000000
--- a/rsod-no-impl/proguard-rules.pro
+++ /dev/null
@@ -1,21 +0,0 @@
-# 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
\ No newline at end of file
diff --git a/rsod-no-impl/src/androidTest/java/me/rajatdhamija/rsod_no_impl/ExampleInstrumentedTest.kt b/rsod-no-impl/src/androidTest/java/me/rajatdhamija/rsod_no_impl/ExampleInstrumentedTest.kt
deleted file mode 100644
index 040ff0d..0000000
--- a/rsod-no-impl/src/androidTest/java/me/rajatdhamija/rsod_no_impl/ExampleInstrumentedTest.kt
+++ /dev/null
@@ -1,24 +0,0 @@
-package me.rajatdhamija.rsod_no_impl
-
-import androidx.test.platform.app.InstrumentationRegistry
-import androidx.test.ext.junit.runners.AndroidJUnit4
-
-import org.junit.Test
-import org.junit.runner.RunWith
-
-import org.junit.Assert.*
-
-/**
- * Instrumented test, which will execute on an Android device.
- *
- * See [testing documentation](http://d.android.com/tools/testing).
- */
-@RunWith(AndroidJUnit4::class)
-class ExampleInstrumentedTest {
- @Test
- fun useAppContext() {
- // Context of the app under test.
- val appContext = InstrumentationRegistry.getInstrumentation().targetContext
- assertEquals("me.rajatdhamija.rsod_no_impl.test", appContext.packageName)
- }
-}
\ No newline at end of file
diff --git a/rsod-no-impl/src/main/AndroidManifest.xml b/rsod-no-impl/src/main/AndroidManifest.xml
deleted file mode 100644
index cc98735..0000000
--- a/rsod-no-impl/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/rsod-no-impl/src/main/java/me/rajatdhamija/rsod_no_impl/RedScreenOfDeath.kt b/rsod-no-impl/src/main/java/me/rajatdhamija/rsod_no_impl/RedScreenOfDeath.kt
deleted file mode 100644
index 9683604..0000000
--- a/rsod-no-impl/src/main/java/me/rajatdhamija/rsod_no_impl/RedScreenOfDeath.kt
+++ /dev/null
@@ -1,10 +0,0 @@
-package me.rajatdhamija.rsod_no_impl
-
-import android.app.Application
-
-object RedScreenOfDeath {
- @JvmStatic
- fun initRSOD(application: Application) {
- //no implementation
- }
-}
\ No newline at end of file
diff --git a/rsod-no-impl/src/test/java/me/rajatdhamija/rsod_no_impl/ExampleUnitTest.kt b/rsod-no-impl/src/test/java/me/rajatdhamija/rsod_no_impl/ExampleUnitTest.kt
deleted file mode 100644
index 51e7fe5..0000000
--- a/rsod-no-impl/src/test/java/me/rajatdhamija/rsod_no_impl/ExampleUnitTest.kt
+++ /dev/null
@@ -1,17 +0,0 @@
-package me.rajatdhamija.rsod_no_impl
-
-import org.junit.Test
-
-import org.junit.Assert.*
-
-/**
- * Example local unit test, which will execute on the development machine (host).
- *
- * See [testing documentation](http://d.android.com/tools/testing).
- */
-class ExampleUnitTest {
- @Test
- fun addition_isCorrect() {
- assertEquals(4, 2 + 2)
- }
-}
\ No newline at end of file
diff --git a/rsod/src/main/java/me/rajatdhamija/rsod/RedScreenOfDeath.kt b/rsod/src/main/java/me/rajatdhamija/rsod/RedScreenOfDeath.kt
index a6866b9..7e8be75 100644
--- a/rsod/src/main/java/me/rajatdhamija/rsod/RedScreenOfDeath.kt
+++ b/rsod/src/main/java/me/rajatdhamija/rsod/RedScreenOfDeath.kt
@@ -6,10 +6,12 @@ import android.content.Context
object RedScreenOfDeath {
@JvmStatic
fun init(application: Application) {
- val crashListener =
- UncaughtExceptionListener { t, e -> handleUncaughtException(application, t, e) }
- val crashHandler = UncaughtExceptionHandler(crashListener)
- Thread.setDefaultUncaughtExceptionHandler(crashHandler)
+ if (BuildConfig.DEBUG) {
+ val crashListener =
+ UncaughtExceptionListener { t, e -> handleUncaughtException(application, t, e) }
+ val crashHandler = UncaughtExceptionHandler(crashListener)
+ Thread.setDefaultUncaughtExceptionHandler(crashHandler)
+ }
}
private fun handleUncaughtException(context: Context, thread: Thread, throwable: Throwable) {
diff --git a/settings.gradle b/settings.gradle
index 3b83fee..9da4939 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,4 +1,3 @@
-include ':rsod-no-impl'
include ':rsod'
include ':app'
rootProject.name = "RedScreen Of Death"
\ No newline at end of file