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: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,9 @@ local.properties
*.log

# Android Studio captures folder
captures/
captures/


*.exec

*.hprof
9 changes: 3 additions & 6 deletions android-library.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ task sourcesJar(type: Jar) {
}

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

api "com.hyperwallet.android:core-sdk:$hyperwalletCoreVersion"
implementation "com.google.android.material:material:$androidMaterialVersion"
implementation "androidx.test.espresso:espresso-idling-resource:$espressoVersion"

androidTestImplementation "androidx.test.ext:junit:$extJunitVerson"
Expand All @@ -66,7 +66,4 @@ dependencies {

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



}
File renamed without changes.
7 changes: 7 additions & 0 deletions commonrepository/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apply from: "$rootProject.projectDir/android-library.gradle"
description = 'Hyperwallet Common Repository SDK for Android to integrate with the Hyperwallet Platform'
project.ext {
mavenName = 'Hyperwallet Android Common Repository SDK'
}
apply from: "$rootProject.projectDir/publish.gradle"

82 changes: 82 additions & 0 deletions commonrepository/config/jacoco-settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
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.*',
'**/com/hyperwallet/android/ui/common/repository/EspressoIdlingResource.*',
'**/com/hyperwallet/android/ui/common/repository/Event.*'
]

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("$buildDir/reports/jacoco")
}
}

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

additionalSourceDirs = files(coverageSourceDirs)
sourceDirectories = files(coverageSourceDirs)
executionData = files("${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("${buildDir}/jacoco/testDebugUnitTest.exec")

violationRules {
setFailOnViolation(true)

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

File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions commonrepository/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<manifest package="com.hyperwallet.android.common" />
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.hyperwallet.android.ui.common.util;
package com.hyperwallet.android.ui.common.repository;

import androidx.test.espresso.IdlingResource;
import androidx.test.espresso.idling.CountingIdlingResource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.hyperwallet.android.ui.common.viewmodel;
package com.hyperwallet.android.ui.common.repository;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
Expand Down
File renamed without changes.
10 changes: 10 additions & 0 deletions commonui/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apply from: "$rootProject.projectDir/android-library.gradle"
description = 'Hyperwallet Common UI SDK for Android to integrate with the Hyperwallet Platform'
project.ext {
mavenName = 'Hyperwallet Android Common UI SDK'
}
apply from: "$rootProject.projectDir/publish.gradle"

dependencies {
implementation project(':commonrepository')
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ android {
def fileFilter = ['**/BuildConfig.*',
'**/com/hyperwallet/android/ui/common/view/error/DefaultErrorDialogFragment.*',
'**/com/hyperwallet/android/ui/common/view/HorizontalDividerItemDecorator.*',
'**/com/hyperwallet/android/ui/common/view/OneClickListener.*',
'**/com/hyperwallet/android/ui/common/util/EspressoIdlingResource.*',
'**/com/hyperwallet/android/ui/common/viewmodel/Event.*'
'**/com/hyperwallet/android/ui/common/view/OneClickListener.*'
]

def debugClassPaths = [
Expand Down
7 changes: 7 additions & 0 deletions commonui/config/lint.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<issue id="VectorPath" severity="ignore"/>
<issue id="RtlEnabled">
<ignore regexp="(AndroidManifest).xml"/>
</issue>
</lint>
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
/**
* Detail interface for having a list UI with detail information through navigation
*/
public interface ListDetailNavigator<Event> {
public interface ListDetailNavigator<T> {

/**
* Navigate action
*
* @param e Navigation event
*/
void navigate(Event e);
void navigate(T e);
}
24 changes: 13 additions & 11 deletions common/build.gradle → publish.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
apply from: "$rootProject.projectDir/android-library.gradle"


def aarFile = file("$buildDir/outputs/aar/common-$version" + ".aar")
def aarFile = file("$buildDir/outputs/aar/$project.name-$version" + ".aar")
def aarArtifact = artifacts.add('archives', aarFile) {
type 'aar'
}
Expand All @@ -23,24 +20,29 @@ publishing {
}

publications {
hyperwalletCommonUi(MavenPublication) {
hyperwalletUiPublish(MavenPublication) {
groupId = hyperwalletGroupId
artifactId = 'common'
artifactId = project.name

version = version

artifact(sourcesJar)
artifact(javadocsJar)
artifact(aarArtifact)

pom {
name = 'Hyperwallet Android Common UI SDK'
description = 'Hyperwallet Common UI SDK for Android to integrate with Hyperwallet Platform'
name = project.mavenName
description = project.description
url = 'https://github.com/hyperwallet/hyperwallet-android-ui-sdk'
pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')
configurations.implementation.allDependencies.each {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
if (it.group == "hyperwallet-android-ui-sdk") {
dependencyNode.appendNode('groupId', "com.hyperwallet.android.ui")
} else {
dependencyNode.appendNode('groupId', it.group)
}
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
Expand Down Expand Up @@ -74,7 +76,7 @@ tasks.withType(Sign) {
}

signing {
sign publishing.publications.hyperwalletCommonUi
sign publishing.publications.hyperwalletUiPublish
}

sonarqube {
Expand All @@ -83,6 +85,6 @@ sonarqube {
property "sonar.sources", "src/main/java"
property "sonar.binaries", "build/intermediates/javac/release/compileReleaseJavaWithJavac/classes/com/hyperwallet/android/ui"
property "sonar.libraries", libraries
property "sonar.projectName", "android-ui-sdk-common"
property "sonar.projectName", "android-ui-sdk-$project.name"
}
}
111 changes: 0 additions & 111 deletions receipt/build.gradle

This file was deleted.

1 change: 1 addition & 0 deletions receiptrepository/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
16 changes: 16 additions & 0 deletions receiptrepository/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apply from: "$rootProject.projectDir/android-library.gradle"
description = 'Hyperwallet Receipt Repository SDK for Android to integrate with the Hyperwallet Platform'
project.ext {
mavenName = 'Hyperwallet Android Receipt Repository SDK'
}
apply from: "$rootProject.projectDir/publish.gradle"


dependencies {

implementation "androidx.legacy:legacy-support-v4:$legacySupportV4Version"
implementation "androidx.paging:paging-runtime:$pagingRuntimeVersion"
api project(':commonrepository')

testImplementation "org.robolectric:robolectric:$robolectricVersion"
}
Loading