Skip to content

Commit 5e13ea8

Browse files
DTPOMERSER-1012 - Handle security Vulnerability (#144)
* DTPOMERSER-1012 - Bump up robolectric and mockwebserver version. - Increase timeout to mock API response - Handle Jacoco issue to skip JDK source files * DTPOMERSER-1012 - Bump up robolectric version. * DTPOMERSER-1012 - Bump up robolectric version. * DTPOMERSER-1012 - Bump up robolectric version. * DTPOMERSER-1012 - Bump up robolectric version. * DTPOMERSER-1012 - Bump up robolectric version. * DTPOMERSER-1012 - Bump up robolectric version. * DTPOMERSER-1012 - Bump up robolectric version. * DTPOMERSER-1012 - Bump up robolectric version. * DTPOMERSER-1012 - Bump up robolectric version. * DTPOMERSER-1012 - Switch to Rule to assertThrows . * DTPOMERSER-1012 - Switch to Rule to assertThrows . * DTPOMERSER-1012 - Bump gradle * DTPOMERSER-1012 - Bump gradle * DTPOMERSER-1012 - Bump gradle * DTPOMERSER-1012 - Bump gradle * DTPOMERSER-1012 - Bump gradle * DTPOMERSER-1012 - Bump gradle * DTPOMERSER-1012 - Bump gradle * DTPOMERSER-1012 - Bump gradle * DTPOMERSER-1012 - Introduce Github Action * DTPOMERSER-1012 - Introduce Github Action * DTPOMERSER-1012 - Introduce Github Action * DTPOMERSER-1012 - Introduce Github Action * DTPOMERSER-1012 - Introduce Github Action * DTPOMERSER-1012 - Introduce Github Action * DTPOMERSER-1012 - Introduce Github Action * DTPOMERSER-1012 - Introduce Github Action * DTPOMERSER-1012 - Introduce Github Action * DTPOMERSER-1012 - Introduce Github Action * DTPOMERSER-1012 - Introduce Github Action * DTPOMERSER-1012 - Introduce Github Action * DTPOMERSER-1012 - Introduce Github Action * DTPOMERSER-1012 - Introduce Github Action * DTPOMERSER-1012 - Introduce Github Action * DTPOMERSER-1012 - Introduce Github Action * DTPOMERSER-1012 - Introduce Github Action * DTPOMERSER-1012 - Introduce Github Action * DTPOMERSER-1012 - Introduce Github Action * DTPOMERSER-1012 - Introduce Github Action * DTPOMERSER-1012 - Introduce Github Action * DTPOMERSER-1012 - Introduce Github Action * DTPOMERSER-1012 - Introduce Github Action * DTPOMERSER-1012 - Introduce Github Action * DTPOMERSER-1012 - Introduce Github Action * DTPOMERSER-1012 - Introduce Github Action * DTPOMERSER-1012 - Introduce Github Action * DTPOMERSER-1012 - Introduce Github Action
1 parent d37a5a1 commit 5e13ea8

File tree

8 files changed

+52
-12
lines changed

8 files changed

+52
-12
lines changed

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Android Core SDK CI
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- master
8+
- support/SDK-V3
9+
- feature/**
10+
- bugfix/**
11+
- dependabot/**
12+
13+
jobs:
14+
build:
15+
# Compile the project using the predefined JDK versions in the strategy section
16+
runs-on: ubuntu-latest
17+
name: Build - JDK ${{ matrix.java-version }}
18+
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
java-version: [ 11 ]
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- name: Setup JDK ${{ matrix.java }}
28+
uses: actions/setup-java@v4
29+
with:
30+
distribution: 'zulu'
31+
java-version: ${{ matrix.java-version }}
32+
33+
- name: Setup Android SDK
34+
uses: android-actions/setup-android@v2
35+
36+
- name: Build CORE SDK ${{ matrix.java-version }}
37+
run: ./gradlew --scan clean lint testDebugUnitTest jacocoTestCoverageVerification

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
buildscript {
33
repositories {
44
google()
5-
jcenter()
5+
mavenCentral()
66
mavenLocal()
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.3.2'
9+
classpath 'com.android.tools.build:gradle:3.6.4'
1010
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7"
1111

1212
// NOTE: Do not place your application dependencies here; they belong
@@ -17,7 +17,7 @@ buildscript {
1717
allprojects {
1818
repositories {
1919
google()
20-
jcenter()
20+
mavenCentral()
2121
mavenLocal()
2222
}
2323
project.version = "1.0.0-beta12"

core/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ apply plugin: 'org.sonarqube'
55
apply from: "$projectDir/config/jacoco-settings.gradle"
66

77
android {
8-
compileSdkVersion 30
8+
compileSdkVersion 34
99
testOptions.unitTests.includeAndroidResources = true
1010
defaultConfig {
1111
minSdkVersion 21
12-
targetSdkVersion 30
12+
targetSdkVersion 34
1313
versionCode 3
1414
versionName version
1515
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -37,10 +37,10 @@ dependencies {
3737

3838
implementation "androidx.appcompat:appcompat:1.2.0"
3939

40-
testImplementation "junit:junit:4.13"
40+
testImplementation 'junit:junit:4.13.2'
41+
testImplementation 'org.robolectric:robolectric:4.12.2'
4142
testImplementation "org.mockito:mockito-core:3.2.0"
42-
testImplementation "org.robolectric:robolectric:4.2"
43-
testImplementation "com.squareup.okhttp3:mockwebserver:3.11.0"
43+
testImplementation "com.squareup.okhttp3:mockwebserver:4.12.0"
4444
testImplementation group: 'pl.pragmatists', name: 'JUnitParams', version: "1.1.1"
4545
testImplementation 'org.hamcrest:hamcrest:2.1'
4646
testImplementation 'org.hamcrest:hamcrest-library:2.1'

core/config/jacoco-settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ android {
1515
unitTests.all {
1616
jacoco {
1717
includeNoLocationClasses = true
18+
excludes = ['jdk.internal.*']
1819
}
1920
}
2021
}

core/src/test/java/com/hyperwallet/android/model/graphql/RetrieveTransferMethodConfigurationFieldsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public void testRetrieveTransferMethodConfigurationFields_returnsFields() throws
6969

7070
// run test
7171
Hyperwallet.getDefault().retrieveTransferMethodConfigurationFields(mMockedQuery, mListener);
72-
mAwait.await(100, TimeUnit.MILLISECONDS);
72+
mAwait.await(200, TimeUnit.MILLISECONDS);
7373

7474
// retrieve response
7575
verify(mListener).onSuccess(mResultArgumentCaptor.capture());
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
sdk=28
1+
sdk=30
2+
instrumentedPackages={"com.hyperwallet"}

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
sonatypeUsername=
22
sonatypePassword=
3+
android.useAndroidX=true
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Fri Mar 01 16:27:03 PST 2019
1+
#Tue Jun 04 07:20:15 PDT 2024
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.3.1-all.zip

0 commit comments

Comments
 (0)