aboutsummaryrefslogtreecommitdiff
path: root/dexmaker-mockito-tests
diff options
context:
space:
mode:
authorJohn Wu <topjohnwu@google.com>2022-09-12 23:50:34 +0000
committerJohn Wu <topjohnwu@google.com>2022-09-12 23:50:34 +0000
commitc57c3d977b947dfafdcc8e27bf5c1cd6e3342f95 (patch)
tree172d1f762cf1c1f63882536463374e6b04ec4a35 /dexmaker-mockito-tests
parentecb8636406ec1c4c89e721e38d570e8c19bba866 (diff)
downloaddexmaker-c57c3d977b947dfafdcc8e27bf5c1cd6e3342f95.tar.gz
Update to upstream dexmaker
New changes are submitted upstream to support latest Java DCL restrictions added to the platform. Test: m Bug: 218865702 Change-Id: Ie081df9004c01d9e4e1bcefba22cce3d92f49d4a
Diffstat (limited to 'dexmaker-mockito-tests')
-rw-r--r--dexmaker-mockito-tests/build.gradle30
-rw-r--r--dexmaker-mockito-tests/src/main/java/com/android/dx/mockito/tests/BlacklistedApis.java6
2 files changed, 9 insertions, 27 deletions
diff --git a/dexmaker-mockito-tests/build.gradle b/dexmaker-mockito-tests/build.gradle
index 9379d17..918f277 100644
--- a/dexmaker-mockito-tests/build.gradle
+++ b/dexmaker-mockito-tests/build.gradle
@@ -1,19 +1,7 @@
-buildscript {
- repositories {
- maven {
- url "https://plugins.gradle.org/m2/"
- }
- }
- dependencies {
- classpath "net.ltgt.gradle:gradle-errorprone-plugin:0.0.13"
- }
-}
-
-apply plugin: "net.ltgt.errorprone"
apply plugin: 'com.android.library'
android {
- compileSdkVersion 28
+ compileSdkVersion 32
android {
lintOptions {
@@ -23,24 +11,18 @@ android {
}
defaultConfig {
- minSdkVersion 8
- targetSdkVersion 28
- versionName VERSION_NAME
+ minSdkVersion 14
+ targetSdkVersion 32
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
}
-repositories {
- jcenter()
- google()
-}
-
dependencies {
compileOnly project(':dexmaker-mockito')
androidTestImplementation project(':dexmaker-mockito')
- implementation 'com.android.support.test:runner:0.5'
- implementation 'junit:junit:4.12'
- api 'org.mockito:mockito-core:2.25.0', { exclude group: 'net.bytebuddy' }
+ implementation 'androidx.test:runner:1.4.0'
+ implementation 'junit:junit:4.13.2'
+ api 'org.mockito:mockito-core:2.28.2', { exclude group: 'net.bytebuddy' }
}
diff --git a/dexmaker-mockito-tests/src/main/java/com/android/dx/mockito/tests/BlacklistedApis.java b/dexmaker-mockito-tests/src/main/java/com/android/dx/mockito/tests/BlacklistedApis.java
index 4a345b3..126647d 100644
--- a/dexmaker-mockito-tests/src/main/java/com/android/dx/mockito/tests/BlacklistedApis.java
+++ b/dexmaker-mockito-tests/src/main/java/com/android/dx/mockito/tests/BlacklistedApis.java
@@ -117,7 +117,7 @@ public class BlacklistedApis {
parent.measure(100, 100);
}
- @SuppressLint({"PrivateApi", "CheckReturnValue"})
+ @SuppressLint({"PrivateApi", "CheckReturnValue", "SoonBlockedPrivateApi"})
@Test
public void cannotCallBlackListedAfterSpying() {
// Spying and mocking might change the View class's byte code
@@ -134,7 +134,7 @@ public class BlacklistedApis {
}
public static class CallBlackListedMethod {
- @SuppressLint("PrivateApi")
+ @SuppressLint({"PrivateApi", "SoonBlockedPrivateApi"})
boolean callingBlacklistedMethodCausesException() {
// Settings.Global#isValidZenMode is a blacklisted method. Resolving it should fail
try {
@@ -153,7 +153,7 @@ public class BlacklistedApis {
}
public static abstract class CallBlacklistedMethodAbstract {
- @SuppressLint("PrivateApi")
+ @SuppressLint({"PrivateApi", "SoonBlockedPrivateApi"})
public boolean callingBlacklistedMethodCausesException() {
// Settings.Global#isValidZenMode is a blacklisted method. Resolving it should fail
try {