File tree Expand file tree Collapse file tree 8 files changed +25
-25
lines changed
src/androidTest/java/com/hyperwallet/android/ui/receipt
src/androidTest/java/com/hyperwallet/android/ui/transfermethod
src/androidTest/java/com/hyperwallet/android/ui/transfer Expand file tree Collapse file tree 8 files changed +25
-25
lines changed Original file line number Diff line number Diff line change @@ -89,8 +89,8 @@ subprojects {
89
89
testRulesVersion = ' 1.2.0'
90
90
espressoVersion = ' 3.4.0'
91
91
mockServerVersion = ' 3.11.0'
92
- leakcanaryVersion = ' 2.8.1 '
93
- mockitoVersion = ' 5.15.2 '
92
+ leakcanaryVersion = ' 2.14 '
93
+ mockitoVersion = ' 4.11.0 '
94
94
junitParamsVersion = ' 1.1.1'
95
95
robolectricVersion = ' 4.14.1'
96
96
coreTest = ' 1.6.1'
Original file line number Diff line number Diff line change @@ -4,4 +4,4 @@ android.jetifier.ignorelist=bcprov-jdk18on-1.78.1.jar
4
4
sonatypeUsername =
5
5
sonatypePassword =
6
6
android.disableAutomaticComponentCreation =true
7
-
7
+ org.gradle.jvmargs =-Xmx4g -XX: MaxMetaspaceSize =512m
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ dependencies {
32
32
androidTestImplementation " androidx.test.espresso:espresso-intents:$espressoVersion "
33
33
androidTestImplementation " com.squareup.okhttp3:mockwebserver:$mockServerVersion "
34
34
debugImplementation " com.squareup.leakcanary:leakcanary-android:$leakcanaryVersion "
35
+ androidTestImplementation " com.squareup.leakcanary:leakcanary-android-instrumentation:$leakcanaryVersion "
35
36
androidTestImplementation project(' :testutils' )
36
37
}
37
38
tasks. withType(Test ) {
Original file line number Diff line number Diff line change 3
3
4
4
import android .app .Application ;
5
5
6
- import com .squareup .leakcanary .InstrumentationLeakDetector ;
7
- import com .squareup .leakcanary .LeakCanary ;
6
+ import java .util .Objects ;
7
+
8
+ import leakcanary .AppWatcher ;
9
+ import leakcanary .LeakCanary ;
8
10
9
11
public class HyperwalletInstrumentedTestApplication extends Application {
10
12
11
13
@ Override
12
14
public void onCreate () {
13
15
14
16
super .onCreate ();
15
- if (LeakCanary .isInAnalyzerProcess ( this )) {
17
+ if (Objects . isNull ( LeakCanary .getConfig () )) {
16
18
// This process is dedicated to LeakCanary for heap analysis.
17
19
// You should not init your app in this process.
18
20
return ;
@@ -22,10 +24,7 @@ public void onCreate() {
22
24
23
25
24
26
protected void installLeakCanary () {
25
-
26
- InstrumentationLeakDetector .instrumentationRefWatcher (this )
27
- .buildAndInstall ();
28
-
27
+ AppWatcher .INSTANCE .manualInstall (this );
29
28
}
30
29
31
30
}
Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ dependencies {
33
33
androidTestImplementation " androidx.test.espresso:espresso-intents:$espressoVersion "
34
34
androidTestImplementation " com.squareup.okhttp3:mockwebserver:$mockServerVersion "
35
35
debugImplementation " com.squareup.leakcanary:leakcanary-android:$leakcanaryVersion "
36
+ debugImplementation " com.squareup.leakcanary:leakcanary-android:$leakcanaryVersion "
37
+ androidTestImplementation " com.squareup.leakcanary:leakcanary-android-instrumentation:$leakcanaryVersion "
36
38
androidTestImplementation " org.mockito:mockito-android:$mockitoVersion "
37
39
androidTestImplementation project(" :testutils" )
38
40
Original file line number Diff line number Diff line change 3
3
4
4
import android .app .Application ;
5
5
6
- import com .squareup .leakcanary .InstrumentationLeakDetector ;
7
- import com .squareup .leakcanary .LeakCanary ;
6
+ import java .util .Objects ;
7
+
8
+ import leakcanary .AppWatcher ;
9
+ import leakcanary .LeakCanary ;
8
10
9
11
public class HyperwalletInstrumentedTestApplication extends Application {
10
12
11
13
@ Override
12
14
public void onCreate () {
13
15
14
16
super .onCreate ();
15
- if (LeakCanary .isInAnalyzerProcess ( this )) {
17
+ if (Objects . isNull ( LeakCanary .getConfig () )) {
16
18
// This process is dedicated to LeakCanary for heap analysis.
17
19
// You should not init your app in this process.
18
20
return ;
@@ -22,10 +24,7 @@ public void onCreate() {
22
24
23
25
24
26
protected void installLeakCanary () {
25
-
26
- InstrumentationLeakDetector .instrumentationRefWatcher (this )
27
- .buildAndInstall ();
28
-
27
+ AppWatcher .INSTANCE .manualInstall (this );
29
28
}
30
29
31
30
}
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ dependencies {
25
25
androidTestImplementation " androidx.test.espresso:espresso-intents:$espressoVersion "
26
26
androidTestImplementation " com.squareup.okhttp3:mockwebserver:$mockServerVersion "
27
27
debugImplementation " com.squareup.leakcanary:leakcanary-android:$leakcanaryVersion "
28
+ androidTestImplementation " com.squareup.leakcanary:leakcanary-android-instrumentation:$leakcanaryVersion "
28
29
androidTestImplementation project(" :testutils" )
29
30
androidTestImplementation project(" :transfermethodui" )
30
31
Original file line number Diff line number Diff line change 3
3
4
4
import android .app .Application ;
5
5
6
- import com .squareup .leakcanary .InstrumentationLeakDetector ;
7
- import com .squareup .leakcanary .LeakCanary ;
6
+ import java .util .Objects ;
7
+
8
+ import leakcanary .AppWatcher ;
9
+ import leakcanary .LeakCanary ;
8
10
9
11
public class HyperwalletInstrumentedTestApplication extends Application {
10
12
11
13
@ Override
12
14
public void onCreate () {
13
15
14
16
super .onCreate ();
15
- if (LeakCanary .isInAnalyzerProcess ( this )) {
17
+ if (Objects . isNull ( LeakCanary .getConfig () )) {
16
18
// This process is dedicated to LeakCanary for heap analysis.
17
19
// You should not init your app in this process.
18
20
return ;
@@ -22,10 +24,6 @@ public void onCreate() {
22
24
23
25
24
26
protected void installLeakCanary () {
25
-
26
- InstrumentationLeakDetector .instrumentationRefWatcher (this )
27
- .buildAndInstall ();
28
-
27
+ AppWatcher .INSTANCE .manualInstall (this );
29
28
}
30
-
31
29
}
You can’t perform that action at this time.
0 commit comments