Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions android-library.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ task sourcesJar(type: Jar) {

dependencies {
implementation "com.google.android.material:material:$androidMaterialVersion"
api "com.hyperwallet.android:core-sdk:$hyperwalletCoreVersion"
implementation "com.hyperwallet.android:core-sdk:$hyperwalletCoreVersion"

implementation "androidx.test.espresso:espresso-idling-resource:$espressoVersion"

Expand All @@ -66,7 +66,4 @@ dependencies {

testImplementation group: 'org.mockito', name: 'mockito-core', version: "$mockitoVersion"
testImplementation group: 'pl.pragmatists', name: 'JUnitParams', version: "$junitParamsVersion"
}



}
15 changes: 15 additions & 0 deletions receiptrepository/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apply from: "$rootProject.projectDir/android-library.gradle"
apply from: "$rootProject.projectDir/publish.gradle"

dependencies {
implementation project(":common")
implementation "androidx.legacy:legacy-support-v4:$legacySupportV4Version"
implementation "androidx.paging:paging-runtime:$pagingRuntimeVersion"

testImplementation "org.robolectric:robolectric:$robolectricVersion"

androidTestImplementation "androidx.test:rules:$testRulesVersion"
androidTestImplementation "com.squareup.okhttp3:mockwebserver:$mockServerVersion"
androidTestImplementation "com.squareup.leakcanary:leakcanary-android-instrumentation:$leakcanaryVersion"
androidTestImplementation "com.squareup.leakcanary:leakcanary-support-fragment:$leakcanaryVersion"
}
79 changes: 79 additions & 0 deletions receiptrepository/config/jacoco-settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
apply plugin: 'jacoco'

final def jacocoVersion = "0.8.2"

jacoco {
toolVersion = jacocoVersion
}

android {
testOptions {
unitTests {
includeAndroidResources = true
returnDefaultValues = true
}
unitTests.all {
jacoco {
includeNoLocationClasses = true
}
}
}
}

def fileFilter = ['**/BuildConfig.*'
]

def debugClassPaths = [
'**/intermediates/javac/debug/*/classes/**'
]

final def coverageSourceDirs = ["$project.projectDir/src/main/java/*"]

task jacocoTestReport(type: JacocoReport, dependsOn: 'testDebugUnitTest') {

group = 'Reporting'
description = 'Generate Jacoco coverage reports.'
reports {
html {
enabled = true
destination file("$project.buildDir/reports/jacoco")
}
}

classDirectories = fileTree(
dir: "${buildDir}",
includes: debugClassPaths,
excludes: fileFilter
)

additionalSourceDirs = files(coverageSourceDirs)
sourceDirectories = files(coverageSourceDirs)
executionData = files("${project.buildDir}/jacoco/testDebugUnitTest.exec")
}

task jacocoTestCoverageVerification(type: JacocoCoverageVerification, dependsOn: 'jacocoTestReport') {

group = 'Verification'
classDirectories = fileTree(
dir: "${buildDir}",
includes: debugClassPaths,
excludes: fileFilter
)
additionalSourceDirs = files(coverageSourceDirs)
sourceDirectories = files(coverageSourceDirs)
executionData = files("${project.buildDir}/jacoco/testDebugUnitTest.exec")

violationRules {
setFailOnViolation(true)

rule {
element = 'CLASS'
limit {
value = 'COVEREDRATIO'
counter = 'BRANCH'
minimum = 0.65
}
}
}
}

File renamed without changes.
4 changes: 4 additions & 0 deletions receiptrepository/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.hyperwallet.android.ui.receiptrepository">

</manifest>
File renamed without changes.
5 changes: 2 additions & 3 deletions receipt/build.gradle → receiptui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ apply from: "$rootProject.projectDir/android-library.gradle"
apply from: "$rootProject.projectDir/publish.gradle"

dependencies {
api project(":common")
implementation project(":common")
implementation project(":receiptrepository")

implementation "com.google.android.material:material:$androidMaterialVersion"
implementation "androidx.constraintlayout:constraintlayout:$constraintlayoutVersion"
Expand All @@ -11,8 +12,6 @@ dependencies {
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycleExtensionsVersion"
implementation "androidx.paging:paging-runtime:$pagingRuntimeVersion"

testImplementation "org.robolectric:robolectric:$robolectricVersion"

androidTestImplementation "androidx.test:rules:$testRulesVersion"
androidTestImplementation "androidx.test.espresso:espresso-contrib:$espressoVersion"
androidTestImplementation "androidx.test.espresso:espresso-intents:$espressoVersion"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ android {

def fileFilter = ['**/BuildConfig.*',
'**/com/hyperwallet/android/ui/receipt/view/*.*',
'**/com/hyperwallet/android/ui/receipt/viewmodel/*.*',
'**/com/hyperwallet/android/ui/receipt/repository/ReceiptRepositoryImpl.*'
'**/com/hyperwallet/android/ui/receipt/viewmodel/*.*'
]

def debugClassPaths = [
Expand Down
10 changes: 10 additions & 0 deletions receiptui/config/lint.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<issue id="VectorPath" severity="ignore"/>
<issue id="RtlEnabled">
<ignore regexp="(AndroidManifest).xml"/>
</issue>
<issue id="Overdraw">
<ignore regexp="(item_receipt).xml"/>
</issue>
</lint>
File renamed without changes.
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include ':ui', ':common', ':receipt', ':userrepository', ':transfermethodrepository'
include ':ui', ':common', ':receiptui', ':receiptrepository', ':userrepository', ':transfermethodrepository'
//add libraries here
3 changes: 2 additions & 1 deletion ui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ dependencies {
implementation "androidx.recyclerview:recyclerview:$recycleViewVersion"

api project(":common")
api project(":receipt")
api project(':receiptui')
api project(":userrepository")
api project(":transfermethodrepository")


androidTestImplementation "androidx.test:rules:$testRulesVersion"
androidTestImplementation "androidx.test.espresso:espresso-contrib:$espressoVersion"
androidTestImplementation "androidx.test.espresso:espresso-intents:$espressoVersion"
Expand Down