Skip to content

Feature/dtpomerser 1422 upgrade gradle version #293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
9 changes: 9 additions & 0 deletions balancerepository/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,12 @@ dependencies {
testImplementation "com.squareup.okhttp3:mockwebserver:$mockWebServerVersion"
testImplementation project(':testutils')
}

android {
namespace 'com.hyperwallet.android.ui.balance.repository'
}

tasks.withType(Test) {
jacoco.includeNoLocationClasses = true
jacoco.excludes = ['jdk.internal.*']
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.CoreMatchers.notNullValue;

import org.junit.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.CoreMatchers.notNullValue;

import org.junit.Test;

Expand Down
56 changes: 38 additions & 18 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,36 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
// Top-level build file where you can add configuration options common to all sub-projects/modules
apply plugin: 'com.android.library'

android {
compileSdkVersion 33
testOptions.unitTests.includeAndroidResources = true
defaultConfig {
minSdkVersion 21
targetSdkVersion 33
versionCode 4
versionName "1.0.0"
buildConfigField 'String', 'VERSION_NAME', "\"${version}\""
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
lintOptions {
abortOnError false
warningsAsErrors false
lintConfig file("config/lint.xml")
}
}


buildscript {
repositories {
google()
jcenter()
mavenCentral()
mavenLocal()

}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath 'com.android.tools.build:gradle:7.4.2'
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7"
classpath "org.jacoco:org.jacoco.core:0.8.8"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -19,7 +40,7 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenCentral()
mavenLocal()

}
Expand All @@ -33,42 +54,41 @@ subprojects {
ext {
hyperwalletGroupId = 'com.hyperwallet.android.ui'

compileVersion = 30
compileVersion = 33
minVersion = 21
targetVersion = 30
targetVersion = 33
codeVersion = 1

hyperwalletCoreVersion = '1.0.0-beta12'
hyperwalletInsightVersion = '1.0.0-beta02'
//
androidMaterialVersion = '1.0.0'
appcompatVersion = '1.0.2'
androidMaterialVersion = '1.4.0'
appcompatVersion = '1.3.1'
constraintlayoutVersion = '1.1.3'
legacySupportV4Version = '1.0.0'
recycleViewVersion = '1.0.0'
recycleViewVersion = '1.2.1'
lifecycleExtensionsVersion = '2.0.0'
pagingRuntimeVersion = '2.1.0'
//Testing
extJunitVerson = '1.1.1'
extJunitVerson = '1.1.3'
testRunnerVersion = '1.2.0'
testRulesVersion = '1.2.0'
espressoVersion = '3.2.0'
espressoVersion = '3.4.0'
mockServerVersion = '3.11.0'
leakcanaryVersion = '1.6.3'
mockitoVersion = '2.27.0'
mockitoVersion = '5.15.2'
junitParamsVersion = '1.1.1'
robolectricVersion = '4.1'
coreTest = '1.3.0'
mockWebServerVersion = '3.11.0'
coreTest = '1.3.0'
robolectricVersion = '4.14.1'
coreTest = '1.4.0'
mockWebServerVersion = '4.12.0'
//
jacocoVersion = "0.8.2"
jacocoVersion = "0.8.8"
fileFilter = ['**/BuildConfig.*']
}

}

task clean(type: Delete) {
task customClean(type: Delete) {
delete rootProject.buildDir
}

Expand Down
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
android.useAndroidX=true
android.enableJetifier=true
sonatypeUsername=
sonatypePassword=
sonatypePassword=
android.disableAutomaticComponentCreation=true
org.gradle.java.home=/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this line ?

3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Mon Feb 25 20:26:26 PST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.3.1-all.zip
19 changes: 10 additions & 9 deletions jacoco-settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,29 @@ task jacocoTestReport(type: JacocoReport, dependsOn: 'testDebugUnitTest') {
}
}

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

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

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

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

violationRules {
setFailOnViolation(true)
Expand Down
3 changes: 3 additions & 0 deletions src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.hyperwallet.android.ui">
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.notNullValue;

import org.junit.Test;

Expand Down