From ca5f8c380b4d2dbf1d1b384492ce10c94e80da39 Mon Sep 17 00:00:00 2001 From: Lucas Lima Date: Sun, 8 Mar 2020 14:44:30 -0300 Subject: [PATCH] Fix ktlint imports --- .editorconfig | 2 +- .../java/dev/lucasnlm/antimine/share/ShareBuilder.kt | 7 ++++++- .../dev/lucasnlm/antimine/common/level/LevelFacade.kt | 2 +- .../antimine/common/level/database/dao/SaveDao.kt | 6 +++++- .../antimine/common/level/database/data/Save.kt | 5 ++++- .../lucasnlm/antimine/common/level/view/AreaView.kt | 2 +- .../antimine/common/level/viewmodel/GameViewModel.kt | 5 ++++- .../lucasnlm/antimine/common/level/LevelFacadeTest.kt | 11 +++++++++-- .../lucasnlm/antimine/common/level/utils/ClockTest.kt | 6 ++++-- 9 files changed, 35 insertions(+), 11 deletions(-) diff --git a/.editorconfig b/.editorconfig index 68fc9538..b675fcf3 100644 --- a/.editorconfig +++ b/.editorconfig @@ -2,4 +2,4 @@ indent_size=4 insert_final_newline=true max_line_length=120 -disabled_rules=import-ordering,no-wildcard-imports \ No newline at end of file +disabled_rules=import-ordering diff --git a/app/src/main/java/dev/lucasnlm/antimine/share/ShareBuilder.kt b/app/src/main/java/dev/lucasnlm/antimine/share/ShareBuilder.kt index 1871612e..c27eaef9 100644 --- a/app/src/main/java/dev/lucasnlm/antimine/share/ShareBuilder.kt +++ b/app/src/main/java/dev/lucasnlm/antimine/share/ShareBuilder.kt @@ -3,7 +3,12 @@ package dev.lucasnlm.antimine.share import android.content.ActivityNotFoundException import android.content.Context import android.content.Intent -import android.graphics.* +import android.graphics.Bitmap +import android.graphics.Canvas +import android.graphics.Color +import android.graphics.Paint +import android.graphics.RectF +import android.graphics.Typeface import androidx.core.content.FileProvider import dev.lucasnlm.antimine.R import dev.lucasnlm.antimine.common.level.data.Area diff --git a/common/src/main/java/dev/lucasnlm/antimine/common/level/LevelFacade.kt b/common/src/main/java/dev/lucasnlm/antimine/common/level/LevelFacade.kt index 31b6e08c..18acf103 100644 --- a/common/src/main/java/dev/lucasnlm/antimine/common/level/LevelFacade.kt +++ b/common/src/main/java/dev/lucasnlm/antimine/common/level/LevelFacade.kt @@ -6,7 +6,7 @@ import dev.lucasnlm.antimine.common.level.data.GameStats import dev.lucasnlm.antimine.common.level.data.Mark import dev.lucasnlm.antimine.common.level.database.data.Save import dev.lucasnlm.antimine.common.level.database.data.SaveStatus -import java.util.* +import java.util.Random import kotlin.math.floor class LevelFacade { diff --git a/common/src/main/java/dev/lucasnlm/antimine/common/level/database/dao/SaveDao.kt b/common/src/main/java/dev/lucasnlm/antimine/common/level/database/dao/SaveDao.kt index 7743a8ba..e4c797d7 100644 --- a/common/src/main/java/dev/lucasnlm/antimine/common/level/database/dao/SaveDao.kt +++ b/common/src/main/java/dev/lucasnlm/antimine/common/level/database/dao/SaveDao.kt @@ -1,6 +1,10 @@ package dev.lucasnlm.antimine.common.level.database.dao -import androidx.room.* +import androidx.room.Dao +import androidx.room.Delete +import androidx.room.Insert +import androidx.room.OnConflictStrategy +import androidx.room.Query import dev.lucasnlm.antimine.common.level.database.data.Save @Dao diff --git a/common/src/main/java/dev/lucasnlm/antimine/common/level/database/data/Save.kt b/common/src/main/java/dev/lucasnlm/antimine/common/level/database/data/Save.kt index 3e844d4b..5b49c6e0 100644 --- a/common/src/main/java/dev/lucasnlm/antimine/common/level/database/data/Save.kt +++ b/common/src/main/java/dev/lucasnlm/antimine/common/level/database/data/Save.kt @@ -1,6 +1,9 @@ package dev.lucasnlm.antimine.common.level.database.data -import androidx.room.* +import androidx.room.ColumnInfo +import androidx.room.Entity +import androidx.room.PrimaryKey +import androidx.room.TypeConverters import dev.lucasnlm.antimine.common.level.data.Area import dev.lucasnlm.antimine.common.level.data.LevelSetup import dev.lucasnlm.antimine.common.level.database.converters.FieldConverter diff --git a/common/src/main/java/dev/lucasnlm/antimine/common/level/view/AreaView.kt b/common/src/main/java/dev/lucasnlm/antimine/common/level/view/AreaView.kt index b82e670e..2696bb01 100755 --- a/common/src/main/java/dev/lucasnlm/antimine/common/level/view/AreaView.kt +++ b/common/src/main/java/dev/lucasnlm/antimine/common/level/view/AreaView.kt @@ -2,7 +2,7 @@ package dev.lucasnlm.antimine.common.level.view import android.annotation.SuppressLint import android.content.Context -import android.graphics.* +import android.graphics.Canvas import androidx.core.content.ContextCompat import android.util.AttributeSet import android.view.View diff --git a/common/src/main/java/dev/lucasnlm/antimine/common/level/viewmodel/GameViewModel.kt b/common/src/main/java/dev/lucasnlm/antimine/common/level/viewmodel/GameViewModel.kt index 24194339..de86703a 100644 --- a/common/src/main/java/dev/lucasnlm/antimine/common/level/viewmodel/GameViewModel.kt +++ b/common/src/main/java/dev/lucasnlm/antimine/common/level/viewmodel/GameViewModel.kt @@ -5,7 +5,10 @@ import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import dev.lucasnlm.antimine.common.level.GameModeFactory import dev.lucasnlm.antimine.common.level.LevelFacade -import dev.lucasnlm.antimine.common.level.data.* +import dev.lucasnlm.antimine.common.level.data.Area +import dev.lucasnlm.antimine.common.level.data.DifficultyPreset +import dev.lucasnlm.antimine.common.level.data.GameEvent +import dev.lucasnlm.antimine.common.level.data.LevelSetup import dev.lucasnlm.antimine.common.level.database.data.Save import dev.lucasnlm.antimine.common.level.repository.IDimensionRepository import dev.lucasnlm.antimine.common.level.repository.ISavesRepository diff --git a/common/src/test/java/dev/lucasnlm/antimine/common/level/LevelFacadeTest.kt b/common/src/test/java/dev/lucasnlm/antimine/common/level/LevelFacadeTest.kt index a40ebf64..ebf2e62a 100644 --- a/common/src/test/java/dev/lucasnlm/antimine/common/level/LevelFacadeTest.kt +++ b/common/src/test/java/dev/lucasnlm/antimine/common/level/LevelFacadeTest.kt @@ -1,7 +1,14 @@ package dev.lucasnlm.antimine.common.level -import dev.lucasnlm.antimine.common.level.data.* -import org.junit.Assert.* +import dev.lucasnlm.antimine.common.level.data.Area +import dev.lucasnlm.antimine.common.level.data.LevelSetup +import dev.lucasnlm.antimine.common.level.data.Mark +import dev.lucasnlm.antimine.common.level.data.isFlag +import dev.lucasnlm.antimine.common.level.data.isQuestion +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNotEquals +import org.junit.Assert.assertTrue import org.junit.Test class LevelFacadeTest { diff --git a/common/src/test/java/dev/lucasnlm/antimine/common/level/utils/ClockTest.kt b/common/src/test/java/dev/lucasnlm/antimine/common/level/utils/ClockTest.kt index 9afaf7a9..eaa8ac10 100644 --- a/common/src/test/java/dev/lucasnlm/antimine/common/level/utils/ClockTest.kt +++ b/common/src/test/java/dev/lucasnlm/antimine/common/level/utils/ClockTest.kt @@ -1,9 +1,11 @@ package dev.lucasnlm.antimine.common.level.utils import com.nhaarman.mockitokotlin2.mock -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test -import java.util.* +import java.util.Timer internal class MockClock( private val timer: Timer