Skip to content

Commit 019ec65

Browse files
Feature/DTPOMERSER-1422 Upgrade Gradle version v2 (#295)
* Upgraded Gradle version
1 parent 8c94049 commit 019ec65

File tree

53 files changed

+387
-163
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+387
-163
lines changed

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Android UI 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+
strategy:
19+
fail-fast: false
20+
matrix:
21+
java-version: [ 17 ]
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Setup JDK ${{ matrix.java }}
27+
uses: actions/setup-java@v4
28+
with:
29+
distribution: 'temurin'
30+
java-version: ${{ matrix.java-version }}
31+
32+
- name: Setup Android SDK
33+
uses: android-actions/setup-android@v3
34+
35+
- name: Build CORE SDK ${{ matrix.java-version }}
36+
run: ./gradlew --scan clean lint testDebugUnitTest jacocoTestCoverageVerification

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
Changelog
22
=========
3+
[1.0.1](https://github.com/hyperwallet/hyperwallet-android-ui-sdk/releases/tag/1.0.1)
4+
-------------------
5+
* Support Gradle 7
6+
37
[1.0.0-beta14](https://github.com/hyperwallet/hyperwallet-android-ui-sdk/releases/tag/1.0.0-beta14)
48
-------------------
59
* Support Android 12
@@ -8,7 +12,7 @@ Changelog
812
-------------------
913
* Handle HTTP 401
1014

11-
[1.0.0-beta12](https://github.com/hyperwallet/hyperwallet-android-ui-sdk/releases/tag/1.0.0-beta12)
15+
[1.0.0-beta12](https://github.com/hyperwallet/hyperwallet-android-ui-sdk/releases/tag/1.0.1)
1216
-------------------
1317
* Bug fix
1418

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ Note that this SDK is geared towards those who need both backend data and UI fea
1818
To install Hyperwallet UI SDK, you just need to add the dependencies into your build.gradle file in Android Studio (or Gradle). For example:
1919

2020
```bash
21-
api 'com.hyperwallet.android.ui:transfermethodui:1.0.0-beta12'
22-
api 'com.hyperwallet.android.ui:receiptui:1.0.0-beta12'
23-
api 'com.hyperwallet.android.ui:transferui:1.0.0-beta12'
21+
api 'com.hyperwallet.android.ui:transfermethodui:1.0.1'
22+
api 'com.hyperwallet.android.ui:receiptui:1.0.1'
23+
api 'com.hyperwallet.android.ui:transferui:1.0.1'
2424
```
2525

2626
### Proguard

android-library.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ android {
2525
release {
2626
minifyEnabled false
2727
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
28+
29+
// Rename the artifact to artifact_name-<version>.aar, required since gradle 7
30+
libraryVariants.all { variant ->
31+
variant.outputs.all { output ->
32+
outputFileName = "${archivesBaseName}-${version}.aar"
33+
}
34+
}
2835
}
2936
debug {
3037
testCoverageEnabled true

balancerepository/build.gradle

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,12 @@ dependencies {
1010
testImplementation "com.squareup.okhttp3:mockwebserver:$mockWebServerVersion"
1111
testImplementation project(':testutils')
1212
}
13+
14+
android {
15+
namespace 'com.hyperwallet.android.ui.balance.repository'
16+
}
17+
18+
tasks.withType(Test) {
19+
jacoco.includeNoLocationClasses = true
20+
jacoco.excludes = ['jdk.internal.*']
21+
}

balancerepository/src/test/java/com/hyperwallet/android/ui/balance/repository/PrepaidCardBalanceRepositoryFactoryTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import static org.hamcrest.CoreMatchers.is;
44
import static org.hamcrest.CoreMatchers.not;
55
import static org.hamcrest.MatcherAssert.assertThat;
6-
import static org.hamcrest.Matchers.notNullValue;
6+
import static org.hamcrest.CoreMatchers.notNullValue;
77

88
import org.junit.Test;
99

balancerepository/src/test/java/com/hyperwallet/android/ui/balance/repository/UserBalanceRepositoryFactoryTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import static org.hamcrest.CoreMatchers.is;
44
import static org.hamcrest.CoreMatchers.not;
55
import static org.hamcrest.MatcherAssert.assertThat;
6-
import static org.hamcrest.Matchers.notNullValue;
6+
import static org.hamcrest.CoreMatchers.notNullValue;
77

88
import org.junit.Test;
99

build.gradle

Lines changed: 54 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,45 @@
1-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
1+
// Top-level build file where you can add configuration options common to all sub-projects/modules
2+
apply plugin: 'com.android.library'
3+
4+
android {
5+
compileSdkVersion 34
6+
testOptions.unitTests.includeAndroidResources = true
7+
defaultConfig {
8+
minSdkVersion 21
9+
targetSdkVersion 34
10+
versionCode 4
11+
versionName "1.0.0"
12+
buildConfigField 'String', 'VERSION_NAME', "\"${versionName}\""
13+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
14+
}
15+
buildTypes {
16+
debug {
17+
testCoverageEnabled true
18+
}
19+
}
20+
21+
lintOptions {
22+
abortOnError false
23+
warningsAsErrors false
24+
lintConfig file("config/lint.xml")
25+
}
26+
buildFeatures {
27+
buildConfig = true
28+
}
29+
}
30+
231

332
buildscript {
433
repositories {
534
google()
6-
jcenter()
35+
mavenCentral()
736
mavenLocal()
837

938
}
1039
dependencies {
11-
classpath 'com.android.tools.build:gradle:3.3.2'
40+
classpath 'com.android.tools.build:gradle:7.4.2'
1241
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7"
42+
classpath "org.jacoco:org.jacoco.core:0.8.8"
1343

1444
// NOTE: Do not place your application dependencies here; they belong
1545
// in the individual module build.gradle files
@@ -19,56 +49,60 @@ buildscript {
1949
allprojects {
2050
repositories {
2151
google()
22-
jcenter()
52+
mavenCentral()
2353
mavenLocal()
2454

2555
}
2656

27-
project.version = "1.0.0-beta14"
57+
project.version = "1.0.1"
2858

2959
}
3060

3161
subprojects {
3262

3363
ext {
64+
versionName = '1.0.0'
65+
// Propagate the version value to subprojects
66+
if (project.name == 'commonui') {
67+
versionName = project.versionName
68+
}
3469
hyperwalletGroupId = 'com.hyperwallet.android.ui'
3570

36-
compileVersion = 30
71+
compileVersion = 34
3772
minVersion = 21
38-
targetVersion = 30
73+
targetVersion = 34
3974
codeVersion = 1
4075

4176
hyperwalletCoreVersion = '1.0.0-beta12'
4277
hyperwalletInsightVersion = '1.0.0-beta02'
4378
//
4479
androidMaterialVersion = '1.0.0'
45-
appcompatVersion = '1.0.2'
80+
appcompatVersion = '1.3.1'
4681
constraintlayoutVersion = '1.1.3'
4782
legacySupportV4Version = '1.0.0'
48-
recycleViewVersion = '1.0.0'
83+
recycleViewVersion = '1.2.1'
4984
lifecycleExtensionsVersion = '2.0.0'
50-
pagingRuntimeVersion = '2.1.0'
85+
pagingRuntimeVersion = '3.3.6'
5186
//Testing
52-
extJunitVerson = '1.1.1'
87+
extJunitVerson = '1.1.3'
5388
testRunnerVersion = '1.2.0'
5489
testRulesVersion = '1.2.0'
55-
espressoVersion = '3.2.0'
90+
espressoVersion = '3.4.0'
5691
mockServerVersion = '3.11.0'
57-
leakcanaryVersion = '1.6.3'
58-
mockitoVersion = '2.27.0'
92+
leakcanaryVersion = '2.14'
93+
mockitoVersion = '4.11.0'
5994
junitParamsVersion = '1.1.1'
60-
robolectricVersion = '4.1'
61-
coreTest = '1.3.0'
62-
mockWebServerVersion = '3.11.0'
63-
coreTest = '1.3.0'
95+
robolectricVersion = '4.14.1'
96+
coreTest = '1.6.1'
97+
mockWebServerVersion = '4.12.0'
6498
//
65-
jacocoVersion = "0.8.2"
99+
jacocoVersion = "0.8.8"
66100
fileFilter = ['**/BuildConfig.*']
67101
}
68102

69103
}
70104

71-
task clean(type: Delete) {
105+
task customClean(type: Delete) {
72106
delete rootProject.buildDir
73107
}
74108

commonui/build.gradle

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,25 @@ dependencies {
1919
testImplementation "androidx.test:core:$coreTest"
2020

2121
testImplementation project(':testutils')
22+
testImplementation 'org.hamcrest:hamcrest-library:3.0'
23+
testImplementation 'junit:junit:4.13.2'
24+
}
25+
android {
26+
defaultConfig {
27+
versionName project.versionName// Use the version from the root project
28+
buildConfigField 'String', 'VERSION_NAME', "\"${versionName}\""
29+
}
30+
buildTypes {
31+
debug {
32+
testCoverageEnabled true
33+
}
34+
}
35+
lintOptions {
36+
abortOnError false
37+
}
38+
}
39+
40+
tasks.withType(Test) {
41+
jacoco.includeNoLocationClasses = true
42+
jacoco.excludes = ['jdk.internal.*']
2243
}

commonui/src/main/java/com/hyperwallet/android/ui/common/insight/HyperwalletInsight.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import com.hyperwallet.android.insight.InsightEventTag;
3333
import com.hyperwallet.android.insight.collect.ErrorInfo;
3434
import com.hyperwallet.android.listener.HyperwalletListener;
35+
import com.hyperwallet.android.ui.common.BuildConfig;
3536

3637
import java.util.HashMap;
3738
import java.util.Map;
@@ -42,7 +43,7 @@
4243
* Used for gathering the data necessary for the Insights analytics.
4344
*/
4445
public class HyperwalletInsight {
45-
private static final String SDK_VERSION = com.hyperwallet.android.ui.common.BuildConfig.VERSION_NAME;
46+
private static final String SDK_VERSION = BuildConfig.VERSION_NAME;
4647
private static final String PRODUCT_VALUE = "hyperwallet-android-ui-sdk";
4748
private static final String PAGE_TECHNOLOGY_JAVA = "Java";
4849

0 commit comments

Comments
 (0)