Updated tests

This commit is contained in:
anthonycicc 2018-11-02 21:01:20 -04:00
parent 1fc894829d
commit 361ff69f4b
4 changed files with 40 additions and 36 deletions

View file

@ -23,7 +23,7 @@ android {
}
buildTypes {
release {
minifyEnabled false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
@ -31,22 +31,20 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildToolsVersion '28.0.3'
}
dependencies {
implementation project(':common')
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation(Libs.kotlin_stdlib_jdk8)
implementation(Libs.kotlin_reflect)
testImplementation(Libs.junit_jupiter_api)
testRuntimeOnly(Libs.junit_jupiter_engine)
// implementation "com.android.support:design:${DependencyVersions.Android.SupportLibrary}"
implementation(Libs.material)
implementation(Libs.appcompat)
implementation(Libs.constraintlayout_solver)
androidTestImplementation(Libs.androidx_test_core)
androidTestImplementation(Libs.androidx_test_runner)
androidTestImplementation(Libs.espresso_core)
}

View file

@ -1,7 +1,7 @@
package online.anthonycicchetti.financetracker
import android.support.test.InstrumentationRegistry
import android.support.test.runner.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Test
import org.junit.runner.RunWith
@ -18,7 +18,7 @@ class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getTargetContext()
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("online.anthonycicchetti.financetracker", appContext.packageName)
}
}

View file

@ -14,12 +14,16 @@ object Libs {
/**
* [constraintlayout-solver website](http://tools.android.com) */
const val constraintlayout_solver: String =
"androidx.constraintlayout:constraintlayout-solver:" + Versions.constraintlayout_solver
"androidx.constraintlayout:constraintlayout-solver:" + Versions.constraintlayout_solver
/**
* [espresso-core website](https://developer.android.com/testing) */
const val espresso_core: String =
"androidx.test.espresso:espresso-core:" + Versions.espresso_core
"androidx.test.espresso:espresso-core:" + Versions.espresso_core
/**
* [core website](https://developer.android.com/testing) */
const val androidx_test_core: String = "androidx.test:core:" + Versions.androidx_test_core
/**
* [runner website](https://developer.android.com/testing) */
@ -30,7 +34,7 @@ object Libs {
const val aapt2: String = "com.android.tools.build:aapt2:" + Versions.aapt2
const val com_android_tools_build_gradle: String =
"com.android.tools.build:gradle:" + Versions.com_android_tools_build_gradle
"com.android.tools.build:gradle:" + Versions.com_android_tools_build_gradle
/**
* [lint-gradle website](https://developer.android.com/studio) */
@ -39,52 +43,52 @@ object Libs {
/**
* [jackson-module-kotlin website](https://github.com/FasterXML/jackson-module-kotlin) */
const val jackson_module_kotlin: String =
"com.fasterxml.jackson.module:jackson-module-kotlin:" + Versions.jackson_module_kotlin
"com.fasterxml.jackson.module:jackson-module-kotlin:" + Versions.jackson_module_kotlin
const val shadow: String = "com.github.jengelman.gradle.plugins:shadow:" + Versions.shadow
const val com_github_johnrengelman_shadow_gradle_plugin: String =
"com.github.johnrengelman.shadow:com.github.johnrengelman.shadow.gradle.plugin:" + Versions.com_github_johnrengelman_shadow_gradle_plugin
"com.github.johnrengelman.shadow:com.github.johnrengelman.shadow.gradle.plugin:" + Versions.com_github_johnrengelman_shadow_gradle_plugin
/**
* [material website](http://developer.android.com/tools/extras/support-library.html) */
const val material: String = "com.google.android.material:material:" + Versions.material
const val jmfayard_github_io_gradle_kotlin_dsl_libs_gradle_plugin: String =
"jmfayard.github.io.gradle-kotlin-dsl-libs:jmfayard.github.io.gradle-kotlin-dsl-libs.gradle.plugin:" + Versions.jmfayard_github_io_gradle_kotlin_dsl_libs_gradle_plugin
"jmfayard.github.io.gradle-kotlin-dsl-libs:jmfayard.github.io.gradle-kotlin-dsl-libs.gradle.plugin:" + Versions.jmfayard_github_io_gradle_kotlin_dsl_libs_gradle_plugin
/**
* [kotlin-android-extensions website](https://kotlinlang.org/) */
const val kotlin_android_extensions: String =
"org.jetbrains.kotlin:kotlin-android-extensions:" + Versions.org_jetbrains_kotlin
"org.jetbrains.kotlin:kotlin-android-extensions:" + Versions.org_jetbrains_kotlin
/**
* [kotlin-gradle-plugin website](https://kotlinlang.org/) */
const val kotlin_gradle_plugin: String =
"org.jetbrains.kotlin:kotlin-gradle-plugin:" + Versions.org_jetbrains_kotlin
"org.jetbrains.kotlin:kotlin-gradle-plugin:" + Versions.org_jetbrains_kotlin
/**
* [kotlin-reflect website](https://kotlinlang.org/) */
const val kotlin_reflect: String =
"org.jetbrains.kotlin:kotlin-reflect:" + Versions.org_jetbrains_kotlin
"org.jetbrains.kotlin:kotlin-reflect:" + Versions.org_jetbrains_kotlin
/**
* [kotlin-scripting-compiler-embeddable website](https://kotlinlang.org/) */
const val kotlin_scripting_compiler_embeddable: String =
"org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:" + Versions.org_jetbrains_kotlin
"org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:" + Versions.org_jetbrains_kotlin
/**
* [kotlin-stdlib-jdk8 website](https://kotlinlang.org/) */
const val kotlin_stdlib_jdk8: String =
"org.jetbrains.kotlin:kotlin-stdlib-jdk8:" + Versions.org_jetbrains_kotlin
"org.jetbrains.kotlin:kotlin-stdlib-jdk8:" + Versions.org_jetbrains_kotlin
/**
* [junit-jupiter-api website](http://junit.org/junit5/) */
const val junit_jupiter_api: String =
"org.junit.jupiter:junit-jupiter-api:" + Versions.org_junit_jupiter
"org.junit.jupiter:junit-jupiter-api:" + Versions.org_junit_jupiter
/**
* [junit-jupiter-engine website](http://junit.org/junit5/) */
const val junit_jupiter_engine: String =
"org.junit.jupiter:junit-jupiter-engine:" + Versions.org_junit_jupiter
"org.junit.jupiter:junit-jupiter-engine:" + Versions.org_junit_jupiter
}

View file

@ -7,33 +7,35 @@ import kotlin.String
*
* YOU are responsible for updating manually the dependency version. */
object Versions {
const val appcompat: String = "1.0.0"
const val appcompat: String = "1.0.0"
const val constraintlayout_solver: String = "1.1.3"
const val constraintlayout_solver: String = "1.1.3"
const val espresso_core: String = "3.1.0"
const val espresso_core: String = "3.1.0"
const val androidx_test_runner: String = "1.1.0"
const val androidx_test_core: String = "1.0.0"
const val aapt2: String = "3.2.0-4818971" //available: "3.2.1-4818971"
const val androidx_test_runner: String = "1.1.0"
const val com_android_tools_build_gradle: String = "3.2.1"
const val aapt2: String = "3.2.1-4818971"
const val lint_gradle: String = "26.2.0" //available: "26.2.1"
const val com_android_tools_build_gradle: String = "3.2.1"
const val jackson_module_kotlin: String = "2.9.7"
const val lint_gradle: String = "26.2.1"
const val shadow: String = "4.0.2"
const val jackson_module_kotlin: String = "2.9.7"
const val com_github_johnrengelman_shadow_gradle_plugin: String = "4.0.2"
const val shadow: String = "4.0.2"
const val material: String = "1.0.0"
const val com_github_johnrengelman_shadow_gradle_plugin: String = "4.0.2"
const val jmfayard_github_io_gradle_kotlin_dsl_libs_gradle_plugin: String = "0.2.6"
const val material: String = "1.0.0"
const val org_jetbrains_kotlin: String = "1.3.0"
const val jmfayard_github_io_gradle_kotlin_dsl_libs_gradle_plugin: String = "0.2.6"
const val org_junit_jupiter: String = "5.3.1" //available: "5.3.1"
const val org_jetbrains_kotlin: String = "1.3.0"
const val org_junit_jupiter: String = "5.3.1"
/**
*
@ -45,7 +47,7 @@ object Versions {
const val currentVersion: String = "4.10.2"
const val nightlyVersion: String = "5.1-20181102000039+0000"
const val nightlyVersion: String = "5.1-20181103000035+0000"
const val releaseCandidate: String = "5.0-rc-1"
}