Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasnlm committed Jun 30, 2021
1 parent 5a399c4 commit 559c8b7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ dependencies {
testImplementation 'androidx.test.espresso:espresso-core:3.3.0'
testImplementation 'androidx.test.espresso:espresso-contrib:3.3.0'
testImplementation 'androidx.fragment:fragment-testing:1.3.5'
testImplementation 'org.robolectric:robolectric:4.4.0'
testImplementation 'org.robolectric:robolectric:4.4'
testImplementation 'androidx.test.ext:junit:1.1.2'
testImplementation 'io.mockk:mockk:1.11.0'

Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/dev/lucasnlm/antimine/di/AppModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import dev.lucasnlm.antimine.support.AppVersionManagerImpl
import dev.lucasnlm.antimine.support.IapHandler
import dev.lucasnlm.external.ExternalAnalyticsWrapper
import dev.lucasnlm.external.IAnalyticsManager
import org.koin.android.ext.koin.androidApplication
import org.koin.dsl.bind
import org.koin.dsl.module

Expand All @@ -18,7 +19,7 @@ val AppModule = module {

single { CloudSaveManagerImpl(get(), get(), get(), get()) } bind CloudSaveManager::class

single { AppVersionManagerImpl(BuildConfig.DEBUG, BuildConfig.VERSION_NAME) } bind IAppVersionManager::class
single { AppVersionManagerImpl(BuildConfig.DEBUG, androidApplication()) } bind IAppVersionManager::class

single {
if (BuildConfig.DEBUG) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package dev.lucasnlm.antimine.support

import android.app.Application
import dev.lucasnlm.antimine.core.IAppVersionManager

class AppVersionManagerImpl(
private val debug: Boolean,
private val id: String,
private val application: Application,
) : IAppVersionManager {
private val valid by lazy {
val id = application.packageName
debug || id == "com.logical.minato" || id == "dev.lucasnlm.antimine" || id == "dev.lucanlm.antimine"
}

Expand Down

0 comments on commit 559c8b7

Please sign in to comment.