Upgrade to Gradle 8.11

Test: ./gradlew
Change-Id: I81d4c9f76f6751425d0d69258cff1c4c5167ebd6
diff --git a/build.gradle.kts b/build.gradle.kts
index 2ab942f..3d5b2cb 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -16,6 +16,7 @@
 
 import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
 import org.gradle.api.tasks.testing.logging.TestLogEvent
+import org.jetbrains.kotlin.gradle.dsl.JvmTarget
 import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
 import java.util.Locale
 
@@ -68,12 +69,6 @@
     implementation("org.jetbrains.dokka:dokka-cli:$dokkaVersion") // Used in CLI integration test
 }
 
-tasks.withType<KotlinCompile> {
-    kotlinOptions {
-        jvmTarget = "11"
-    }
-}
-
 val shadowJar = tasks.withType<ShadowJar> {
     archiveBaseName.set("dackka")
     isZip64 = true
@@ -326,8 +321,9 @@
 }
 
 tasks.withType<KotlinCompile>().configureEach {
-    kotlinOptions {
-        freeCompilerArgs += "-Xmulti-platform"
+    compilerOptions {
+        jvmTarget.set(JvmTarget.JVM_11)
+        freeCompilerArgs.add("-Xmulti-platform")
     }
     dependsOn(explodeAars)
 }
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 96d76c1..59f1b55 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
-distributionUrl=../../../../tools/external/gradle/gradle-8.6-rc-1-bin.zip
-distributionSha256Sum=a2da4ba435f6728b43554c5845f6f88f79589c3e0018c29ab33eb23bd781255b
+distributionUrl=../../../../tools/external/gradle/gradle-8.11-bin.zip
+distributionSha256Sum=57dafb5c2622c6cc08b993c85b7c06956a2f53536432a30ead46166dbca0f1e9
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists