Skip to content

Commit

Permalink
Merge pull request #3970 from nextcloud/kotlin2.0
Browse files Browse the repository at this point in the history
update to kotlin 2.0 / use ksp where possible
  • Loading branch information
mahibi committed Jun 18, 2024
2 parents e0d7f00 + 00101ab commit 1e14532
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 4 deletions.
13 changes: 12 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ import com.github.spotbugs.snom.Confidence
import com.github.spotbugs.snom.Effort
import com.github.spotbugs.snom.SpotBugsTask

plugins {
id "org.jetbrains.kotlin.plugin.compose" version "2.0.0"
id "org.jetbrains.kotlin.kapt"
id 'com.google.devtools.ksp' version '2.0.0-1.0.21'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
Expand Down Expand Up @@ -152,6 +158,7 @@ configurations.configureEach {
}

dependencies {
implementation("androidx.compose.runtime:runtime:1.6.8")
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation 'androidx.datastore:datastore-core:1.1.1'
implementation 'androidx.datastore:datastore-preferences:1.1.1'
Expand Down Expand Up @@ -222,7 +229,7 @@ dependencies {

implementation "androidx.room:room-runtime:${roomVersion}"
implementation "androidx.room:room-rxjava2:${roomVersion}"
kapt "androidx.room:room-compiler:${roomVersion}"
ksp "androidx.room:room-compiler:${roomVersion}"
implementation "androidx.room:room-ktx:${roomVersion}"

implementation "org.parceler:parceler-api:$parcelerVersion"
Expand Down Expand Up @@ -350,3 +357,7 @@ detekt {
config.setFrom("../detekt.yml")
source.setFrom("src/")
}

ksp {
arg('room.schemaLocation', "$projectDir/schemas")
}
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ class AudioFocusRequestManager(private val context: Context) {
audioManager.abandonAudioFocusRequest(focusRequest)
}
} else {
@Deprecated("This method was deprecated in API level 26.")
if (shouldRequestFocus) {
audioManager.requestAudioFocus(audioFocusChangeListener, AudioManager.STREAM_MUSIC, duration)
} else {
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
buildscript {

ext {
kotlinVersion = '1.9.24'
kotlinVersion = '2.0.0'
}

repositories {
Expand Down
29 changes: 28 additions & 1 deletion gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@
<trusted-key id="19BEAB2D799C020F17C69126B16698A4ADF4D638" group="org.checkerframework"/>
<trusted-key id="1D0A8B5E77C678A7C724445ABF984B4145EA13F7" group="com.squareup" name="javapoet" version="1.13.0"/>
<trusted-key id="1D9AA7F9E1E2824728B8CD1794B291AEF984A085" group="io.reactivex.rxjava2"/>
<trusted-key id="24D04176586361FDA94EE0315F7786DF73E61F56" group="com.google.devtools.ksp" name="symbol-processing-api" version="1.9.20-1.0.14"/>
<trusted-key id="24D04176586361FDA94EE0315F7786DF73E61F56">
<trusting group="com.google.devtools.ksp"/>
<trusting group="com.google.devtools.ksp" name="symbol-processing-api" version="1.9.20-1.0.14"/>
</trusted-key>
<trusted-key id="276E80D9638D24AB676B2453F1EA1235E08E008F" group="com.vividsolutions"/>
<trusted-key id="28118C070CB22A0175A2E8D43D12CA2AC19F3181" group="^com[.]fasterxml($|([.].*))" regex="true"/>
<trusted-key id="2AB84290BFDFE40E55852346522A2E62A5D6C31F" group="com.github.filosganga"/>
Expand Down Expand Up @@ -184,6 +187,7 @@
<trusted-key id="BDB5FA4FE719D787FB3D3197F6D4A1D411E9D1AE" group="com.google.guava"/>
<trusted-key id="C0612048F3393B80B22639B4F067A2FD751AE3E4" group="io.github.davidburstrom.contester" name="contester-breakpoint" version="0.2.0"/>
<trusted-key id="C1CBA75EC9BD0BAF8061935459E05CE618187ED4" group="org.xerial" name="sqlite-jdbc" version="3.41.2.2"/>
<trusted-key id="C5AA57F4A38EBA7B7F9156DDAB2DA4527F6FFC0B" group="com.squareup" name="kotlinpoet" version="1.11.0"/>
<trusted-key id="C6F7D1C804C821F49AF3BFC13AD93C3C677A106E">
<trusting group="io.perfmark" name="perfmark-api" version="0.23.0"/>
<trusting group="io.perfmark" name="perfmark-api" version="0.26.0"/>
Expand Down Expand Up @@ -243,6 +247,11 @@
<sha256 value="b561e41c1bddb2160f79b9bc7541ad9ed110147ab2ccf63719a23d498470b043" origin="Generated by Gradle" reason="Artifact is not signed"/>
</artifact>
</component>
<component group="androidx.activity" name="activity" version="1.9.0">
<artifact name="activity-1.9.0.aar">
<sha256 value="46fc8e842d9a4e030dfd9e108c3bc08310f922bd7421f29f67dcaaa4adac3764" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="androidx.annotation" name="annotation" version="1.0.0">
<artifact name="annotation-1.0.0.jar">
<sha256 value="0baae9755f7caf52aa80cd04324b91ba93af55d4d1d17dcc9a7b53d99ef7c016" origin="Generated by Gradle" reason="Artifact is not signed"/>
Expand Down Expand Up @@ -557,6 +566,14 @@
<sha256 value="a67c52c9ddfaff2ffb2fd4b97cd94fa382e837ea8a5874d029e0a04fa63e5caf" origin="Generated by Gradle" reason="Artifact is not signed"/>
</artifact>
</component>
<component group="androidx.core" name="core" version="1.1.0">
<artifact name="core-1.1.0.aar">
<sha256 value="76c7cfbe596fe3c09a6983bf1c89e889299c08ac9a3b52ce5182a088d056647e" origin="Generated by Gradle" reason="Artifact is not signed"/>
</artifact>
<artifact name="core-1.1.0.pom">
<sha256 value="dae46132cdcd46b798425f7cb78fd65890869b6d26101ccdcd43461a4f51754c" origin="Generated by Gradle" reason="Artifact is not signed"/>
</artifact>
</component>
<component group="androidx.core" name="core" version="1.12.0">
<artifact name="core-1.12.0.aar">
<sha256 value="42ffa7ca47d7ba8fe1d874c57ef9c7111bc41a2b0c0c21518a39e07d222ded8b" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -5120,6 +5137,11 @@
<sha256 value="5195193b37dcdada2e1c0ab0d512c422b2ad76af3557843a1b9c3480f4e71d0e" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.jetbrains.kotlin" name="kotlin-stdlib-jdk7" version="1.2.71">
<artifact name="kotlin-stdlib-jdk7-1.2.71.pom">
<pgp value="BAE5C184E3B70CB15617700598FE03A974CE0A0B"/>
</artifact>
</component>
<component group="org.jetbrains.kotlin" name="kotlin-stdlib-jdk7" version="1.9.0">
<artifact name="kotlin-stdlib-jdk7-1.9.0.pom">
<sha256 value="c11074f0c898a98b863c614471d438d3df92a1ec3382a6e37f935d7d71954b5a" origin="Generated by Gradle"/>
Expand All @@ -5140,6 +5162,11 @@
<sha256 value="a3b07deb091f2aed59d6559884f44f99cff5df9b9fa35a24bcd6b8b069cff48d" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.jetbrains.kotlin.plugin.compose" name="org.jetbrains.kotlin.plugin.compose.gradle.plugin" version="2.0.0">
<artifact name="org.jetbrains.kotlin.plugin.compose.gradle.plugin-2.0.0.pom">
<sha256 value="38e76d688eddcf2d92ab20838c0adf28d8fd5de2cc965edcd273a9b4f7d636de" origin="Generated by Gradle" reason="Artifact is not signed"/>
</artifact>
</component>
<component group="org.jetbrains.kotlinx" name="kotlinx-coroutines-core-jvm" version="1.5.0">
<artifact name="kotlinx-coroutines-core-jvm-1.5.0.module">
<sha256 value="c885dd0281076c5843826de317e3cbcdc3d8859dbeef53ae1cfacd1b9c60f96e" origin="Generated by Gradle"/>
Expand Down

0 comments on commit 1e14532

Please sign in to comment.