sduduzog 7 жил өмнө
parent
commit
ce3fa51531

+ 10 - 9
app/build.gradle

@@ -25,6 +25,7 @@ android {
         }
         debug {
             minifyEnabled false
+            applicationIdSuffix ".debug"
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
         }
     }
@@ -48,20 +49,20 @@ dependencies {
     // Arch Components
     implementation 'androidx.core:core-ktx:1.0.1'
     implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
-    implementation 'android.arch.navigation:navigation-fragment:1.0.0-alpha07'
-    implementation 'androidx.room:room-runtime:2.1.0-alpha02'
-    kapt "androidx.room:room-compiler:2.1.0-alpha02"
+    implementation 'android.arch.navigation:navigation-fragment:1.0.0-alpha09'
+    implementation 'androidx.room:room-runtime:2.1.0-alpha03'
+    kapt "androidx.room:room-compiler:2.1.0-alpha03"
     kapt "androidx.lifecycle:lifecycle-compiler:2.0.0"
 
     // Test libs
     testImplementation 'junit:junit:4.12'
     testImplementation 'org.mockito:mockito-core:2.19.0'
-    androidTestImplementation 'androidx.room:room-testing:2.1.0-alpha02'
-    androidTestImplementation 'androidx.test:runner:1.1.0'
-    androidTestImplementation 'androidx.test:rules:1.1.0'
-    androidTestImplementation 'androidx.annotation:annotation:1.0.0'
-    androidTestImplementation 'androidx.test:runner:1.1.0'
-    androidTestImplementation 'androidx.test:rules:1.1.0'
+    androidTestImplementation 'androidx.room:room-testing:2.1.0-alpha03'
+    androidTestImplementation 'androidx.test:runner:1.1.1'
+    androidTestImplementation 'androidx.test:rules:1.1.1'
+    androidTestImplementation 'androidx.annotation:annotation:1.0.1'
+    androidTestImplementation 'androidx.test:runner:1.1.1'
+    androidTestImplementation 'androidx.test:rules:1.1.1'
     androidTestImplementation "androidx.arch.core:core-testing:2.0.0"
     androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
     androidTestImplementation 'com.android.support.test.espresso:espresso-intents:3.0.2'

+ 1 - 0
app/release/output.json

@@ -0,0 +1 @@
+[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":20,"versionName":"2.1.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]

+ 38 - 0
app/src/androidTest/java/com/sduduzog/slimlauncher/DataRepositoryTest.kt

@@ -0,0 +1,38 @@
+package com.sduduzog.slimlauncher
+
+import android.app.Application
+import androidx.test.filters.LargeTest
+import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner
+import androidx.test.platform.app.InstrumentationRegistry
+import com.sduduzog.slimlauncher.data.DataRepository
+import org.junit.After
+import org.junit.Before
+import org.junit.Test
+import org.junit.runner.RunWith
+
+
+@LargeTest
+@RunWith(AndroidJUnit4ClassRunner::class)
+class DataRepositoryTest {
+
+    private var repository: DataRepository? = null
+
+    @Before
+    fun createRepository(){
+        val context = InstrumentationRegistry.getInstrumentation().targetContext.applicationContext
+        repository = DataRepository.getInstance(context as Application)
+    }
+
+    @After
+    fun closeRepository(){
+        repository = null
+    }
+
+    @Test
+    fun assertList(){
+        val list = listOf(1, 2, 3, 4, 5)
+        val newList = list.distinctBy {
+            it == 2
+        }
+    }
+}

+ 1 - 1
app/src/main/res/values/ic_launcher_background.xml

@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
-    <color name="ic_launcher_background">#FFFFFF</color>
+    <color name="ic_launcher_background">#FFFFFFFF</color>
 </resources>

+ 3 - 0
app/src/main/res/values/styles.xml

@@ -8,6 +8,7 @@
         <item name="colorPrimary">@color/colorWhite</item>
         <item name="colorPrimaryDark">@color/colorWhiteDark</item>
         <item name="android:colorBackground">@color/colorWhite</item>
+        <item name="android:statusBarColor">?android:attr/colorPrimaryDark</item>
     </style>
 
     <style name="AppDarkTheme" parent="@style/Theme.AppCompat.NoActionBar">
@@ -17,6 +18,7 @@
         <item name="android:colorBackground">@color/primaryDarkColor</item>
         <!--<item name="android:statusBarColor">?android:attr/colorPrimaryDark</item>-->
         <item name="android:colorForeground">@color/inverseTextColor</item>
+        <item name="android:statusBarColor">?android:attr/colorPrimary</item>
     </style>
 
     <style name="AppGreyTheme" parent="@style/AppDarkTheme">
@@ -32,6 +34,7 @@
         <item name="colorPrimary">@color/colorCandy</item>
         <item name="colorPrimaryDark">@color/colorCandyDark</item>
         <item name="android:colorBackground">@color/colorCandy</item>
+        <item name="android:statusBarColor">?android:attr/colorPrimary</item>
         <!--<item name="android:statusBarColor">@color/colorCandyDark</item>-->
     </style>
 

+ 1 - 1
build.gradle

@@ -1,7 +1,7 @@
 // Top-level build file where you can add configuration options common to all sub-projects/modules.
 
 buildscript {
-    ext.kotlin_version = '1.2.71'
+    ext.kotlin_version = '1.3.10'
     repositories {
         google()
         jcenter()