Skip to content

Commit 95da243

Browse files
committed
build: replace kapt with ksp
1 parent 55199e2 commit 95da243

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

WordPress/build.gradle

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import se.bjurr.violations.lib.model.SEVERITY
44
plugins {
55
id "com.android.application"
66
id "org.jetbrains.kotlin.android"
7-
id "org.jetbrains.kotlin.kapt"
87
id "org.jetbrains.kotlin.plugin.parcelize"
98
id "org.jetbrains.kotlin.plugin.allopen"
109
id "io.sentry.android.gradle"
@@ -337,10 +336,6 @@ static def addBuildConfigFieldsFromPrefixedProperties(variant, properties, prefi
337336
variant.buildConfigField "String", it.key.toUpperCase(), "\"${it.value}\""
338337
}
339338
}
340-
kapt {
341-
// Enable to infer error types in stubs (see: https://kotlinlang.org/docs/kapt.html#non-existent-type-correction)
342-
correctErrorTypes true
343-
}
344339

345340
dependencies {
346341
implementation 'androidx.webkit:webkit:1.10.0'
@@ -453,7 +448,7 @@ dependencies {
453448
exclude group: 'androidx.appcompat', module: 'appcompat'
454449
}
455450
implementation "com.github.bumptech.glide:glide:$glideVersion"
456-
kapt "com.github.bumptech.glide:compiler:$glideVersion"
451+
ksp "com.github.bumptech.glide:ksp:$glideVersion"
457452
implementation "com.github.bumptech.glide:volley-integration:$glideVersion"
458453
implementation "com.github.indexos.media-for-mobile:domain:$indexosMediaForMobileVersion"
459454
implementation "com.github.indexos.media-for-mobile:android:$indexosMediaForMobileVersion"
@@ -467,9 +462,9 @@ dependencies {
467462
exclude group: 'com.android.support', module: 'support-annotations'
468463
}
469464
implementation "com.google.dagger:dagger-android-support:$gradle.ext.daggerVersion"
470-
kapt "com.google.dagger:dagger-android-processor:$gradle.ext.daggerVersion"
465+
ksp "com.google.dagger:dagger-android-processor:$gradle.ext.daggerVersion"
471466
implementation "com.google.dagger:hilt-android:$gradle.ext.daggerVersion"
472-
kapt "com.google.dagger:hilt-compiler:$gradle.ext.daggerVersion"
467+
ksp "com.google.dagger:hilt-compiler:$gradle.ext.daggerVersion"
473468

474469
testImplementation "$gradle.ext.storiesAndroidPhotoEditorPath:$automatticStoriesVersion"
475470

@@ -526,7 +521,7 @@ dependencies {
526521
androidTestImplementation (name:'cloudtestingscreenshotter_lib', ext:'aar') // Screenshots on Firebase Cloud Testing
527522
androidTestImplementation "androidx.work:work-testing:$androidxWorkManagerVersion"
528523
androidTestImplementation "com.google.dagger:hilt-android-testing:$gradle.ext.daggerVersion"
529-
kaptAndroidTest "com.google.dagger:hilt-android-compiler:$gradle.ext.daggerVersion"
524+
kspAndroidTest "com.google.dagger:hilt-android-compiler:$gradle.ext.daggerVersion"
530525
// Enables Java 8+ API desugaring support
531526
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:$androidDesugarVersion"
532527
lintChecks "org.wordpress:lint:$wordPressLintVersion"

config/lint/lint.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<!-- TODO: https://github.com/wordpress-mobile/WordPress-Android/issues/18185 -->
2020
<issue id="MissingFirebaseInstanceTokenRefresh">
2121
<!-- GCM -->
22-
<ignore path="**/generated/source/kapt/**/org/wordpress/android/push/Hilt_GCMMessageService.java" />
22+
<ignore path="**/generated/ksp/**/org/wordpress/android/push/Hilt_GCMMessageService.java" />
2323
</issue>
2424
<issue id="GradleDependency" severity="ignore" /> <!-- Dependabot will take care of this -->
2525
<issue id="MissingNullAnnotationOnField">
@@ -63,7 +63,7 @@
6363
<ignore path="**/src/wordpress/res" /> <!-- drawable-hdpi, drawable-xxhdpi -->
6464
</issue>
6565
<issue id="ObsoleteSdkInt">
66-
<ignore path="**/generated/source/kapt/**/org/wordpress/android/ui/main/Hilt_WPMainNavigationView.java" />
66+
<ignore path="**/generated/ksp/**/org/wordpress/android/ui/main/Hilt_WPMainNavigationView.java" />
6767
</issue>
6868
<!-- INTEROPERABILITY -->
6969
<issue id="UnknownNullness" severity="informational">

settings.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ pluginManagement {
1414
plugins {
1515
id "org.jetbrains.kotlin.android" version gradle.ext.kotlinVersion
1616
id "org.jetbrains.kotlin.jvm" version gradle.ext.kotlinVersion
17-
id "org.jetbrains.kotlin.kapt" version gradle.ext.kotlinVersion
1817
id "org.jetbrains.kotlin.plugin.serialization" version gradle.ext.kotlinVersion
1918
id "org.jetbrains.kotlin.plugin.parcelize" version gradle.ext.kotlinVersion
2019
id "org.jetbrains.kotlin.plugin.allopen" version gradle.ext.kotlinVersion

0 commit comments

Comments
 (0)