Skip to content

Commit

Permalink
Remove core library desugaring from android lib conventions (#701)
Browse files Browse the repository at this point in the history
* Remove core library desugaring from android lib conventions

* Remove NewApi lint check from android lib conventions

* Remove suppress new api annotation from HttpUrlReplacements.java
  • Loading branch information
surbhiia authored Jan 27, 2025
1 parent da8d53e commit 7ee83ac
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ android {
// we rely on dependabot for dependency updates
disable.add("GradleDependency")
disable.add("AndroidGradlePluginVersion")
disable.add("NewApi")
}

compileOptions {
sourceCompatibility(javaVersion)
targetCompatibility(javaVersion)
isCoreLibraryDesugaringEnabled = true
}

kotlinOptions {
Expand All @@ -53,5 +53,4 @@ dependencies {
testRuntimeOnly(libs.findLibrary("junit-platform-launcher").get())
testImplementation(libs.findLibrary("opentelemetry-sdk-testing").get())
testImplementation(libs.findLibrary("androidx-junit").get())
coreLibraryDesugaring(libs.findLibrary("desugarJdkLibs").get())
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ public static int replacementForContentLength(URLConnection connection) {
return replace(connection, () -> connection.getContentLength());
}

@SuppressLint("NewApi")
public static long replacementForContentLengthLong(URLConnection connection) {
return replace(connection, () -> connection.getContentLengthLong());
}
Expand Down

0 comments on commit 7ee83ac

Please sign in to comment.