disable lint in release builds + minor code style update

This commit is contained in:
tibbi 2017-08-12 23:13:59 +02:00
parent 84e6a779ed
commit 760ec1e517
3 changed files with 9 additions and 7 deletions

View File

@ -36,6 +36,11 @@ android {
debug.java.srcDirs += 'src/debug/kotlin'
release.java.srcDirs += 'src/release/kotlin'
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
}
ext {
@ -50,6 +55,7 @@ dependencies {
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.code.gson:gson:2.8.0'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
debugCompile "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion"
releaseCompile "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"
}

View File

@ -5,10 +5,8 @@ import com.squareup.leakcanary.LeakCanary
open class BuildVariantApplication : BaseApp() {
override fun onCreate() {
super.onCreate()
LeakCanary.install(this);
LeakCanary.install(this)
}
override fun shouldInit(): Boolean {
return !LeakCanary.isInAnalyzerProcess(this)
}
override fun shouldInit() = !LeakCanary.isInAnalyzerProcess(this)
}

View File

@ -3,7 +3,5 @@ package com.simplemobiletools.calendar
import android.support.multidex.MultiDexApplication
abstract class BaseApp : MultiDexApplication() {
open fun shouldInit(): Boolean {
return true
}
open fun shouldInit() = true
}