Skip to content

Commit 10a116d

Browse files
authored
Merge pull request #3957 from owncloud/technical/replace_kapt_with_ksp
[Technical] Replace kapt with ksp
2 parents 262cb56 + 9813147 commit 10a116d

5 files changed

Lines changed: 12 additions & 11 deletions

File tree

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ buildscript {
4545

4646
plugins {
4747
id "org.sonarqube" version "4.0.0.2929"
48+
id 'com.google.devtools.ksp' version '1.8.10-1.0.9' apply false
4849
}
4950

5051
allprojects {
@@ -58,6 +59,7 @@ allprojects {
5859
}
5960

6061
subprojects {
62+
apply plugin: "com.google.devtools.ksp"
6163
apply plugin: "org.jlleitschuh.gradle.ktlint"
6264
apply plugin: "org.sonarqube"
6365
}

owncloudApp/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apply plugin: 'com.android.application'
2+
apply plugin: 'com.google.devtools.ksp'
23
apply plugin: 'kotlin-android'
3-
apply plugin: 'kotlin-kapt'
44
apply plugin: 'kotlin-parcelize'
55

66
def commitSHA1 = 'COMMIT_SHA1'
@@ -25,7 +25,7 @@ dependencies {
2525
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$androidxLifecycle"
2626
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$androidxLifecycle"
2727
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$androidxLifecycle"
28-
kapt "androidx.lifecycle:lifecycle-common-java8:$androidxLifecycle"
28+
implementation "androidx.lifecycle:lifecycle-common-java8:$androidxLifecycle"
2929
implementation "androidx.preference:preference-ktx:1.2.0"
3030
implementation "androidx.room:room-runtime:$androidxRoom"
3131
implementation "androidx.sqlite:sqlite-ktx:2.3.0"

owncloudData/build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apply plugin: 'com.android.library'
2+
apply plugin: 'com.google.devtools.ksp'
23
apply plugin: 'kotlin-android'
3-
apply plugin: 'kotlin-kapt'
44

55
android {
66
compileSdkVersion sdkCompileVersion
@@ -11,11 +11,11 @@ android {
1111

1212
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1313

14-
// Room Database Tests
15-
javaCompileOptions {
16-
annotationProcessorOptions {
17-
arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
18-
}
14+
// The schemas directory contains a schema file for each version of the Room database.
15+
// This is required to enable Room auto migrations.
16+
// See https://developer.android.com/reference/kotlin/androidx/room/AutoMigration.
17+
ksp {
18+
arg("room.schemaLocation", "$projectDir/schemas")
1919
}
2020
}
2121

@@ -61,7 +61,7 @@ dependencies {
6161

6262
// Room
6363
implementation "androidx.room:room-ktx:$androidxRoom"
64-
kapt "androidx.room:room-compiler:$androidxRoom"
64+
ksp "androidx.room:room-compiler:$androidxRoom"
6565

6666
// Dependencies for unit tests
6767
testImplementation project(":owncloudTestUtil")

owncloudDomain/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
apply plugin: 'com.android.library'
22
apply plugin: 'kotlin-android'
33
apply plugin: 'kotlin-parcelize'
4-
apply plugin: 'kotlin-kapt'
54

65
android {
76
compileSdkVersion sdkCompileVersion

0 commit comments

Comments
 (0)