File tree Expand file tree Collapse file tree
okhttp/src/main/java/okhttp3 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,6 +115,12 @@ subprojects { project ->
115115 }
116116 }
117117
118+ tasks. withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile ). configureEach {
119+ kotlinOptions {
120+ jvmTarget = " 1.8"
121+ }
122+ }
123+
118124 def platform = System . getProperty(" okhttp.platform" , " jdk8" )
119125
120126 test {
@@ -149,6 +155,9 @@ subprojects { project ->
149155 errorprone ' com.google.errorprone:error_prone_core:2.3.3'
150156 }
151157 tasks. withType(JavaCompile ). configureEach {
158+ sourceCompatibility = JavaVersion . VERSION_1_8
159+ targetCompatibility = JavaVersion . VERSION_1_8
160+
152161 options. errorprone {
153162 check(" MissingFail" , CheckSeverity . ERROR )
154163 check(" MissingOverride" , CheckSeverity . ERROR )
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import okhttp3.internal.indexOfControlOrNonAscii
2424import okhttp3.internal.publicsuffix.PublicSuffixDatabase
2525import okhttp3.internal.toCanonicalHost
2626import okhttp3.internal.trimSubstring
27+ import org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
2728import java.util.Calendar
2829import java.util.Collections
2930import java.util.Date
@@ -124,6 +125,7 @@ class Cookie private constructor(
124125 other.hostOnly == hostOnly
125126 }
126127
128+ @IgnoreJRERequirement // As of AGP 3.4.1, D8 desugars API 24 hashCode methods.
127129 override fun hashCode (): Int {
128130 var result = 17
129131 result = 31 * result + name.hashCode()
You can’t perform that action at this time.
0 commit comments