Skip to content

Commit

Permalink
kapt removal
Browse files Browse the repository at this point in the history
  • Loading branch information
mimoccc committed May 20, 2024
1 parent 562b742 commit bfc12af
Show file tree
Hide file tree
Showing 7 changed files with 480 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ private const val IMPLEMENTATION = "implementation"
private const val DEBUG_IMPLEMENTATION = "debugImplementation"
private const val ANDROID_TEST_IMPLEMENTATION = "androidTestImplementation"
private const val TEST_IMPLEMENTATION = "testImplementation"
private const val KAPT_IMPLEMENTATION = "kapt"
private const val KSP_IMPLEMENTATION = "ksp"

fun DependencyHandlerScope.implementation(
Expand Down Expand Up @@ -62,9 +61,3 @@ fun DependencyHandlerScope.ksp(
) {
add(KSP_IMPLEMENTATION, dependency.get())
}

fun DependencyHandlerScope.kapt(
dependency: Provider<MinimalExternalModuleDependency>
) {
add(KAPT_IMPLEMENTATION, dependency.get())
}
10 changes: 4 additions & 6 deletions buildSrc/src/main/kotlin/org/mjdev/gradle/plugin/AppPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import org.mjdev.gradle.extensions.libs
import org.mjdev.gradle.extensions.manifestPlaceholders
import org.mjdev.gradle.extensions.implementation
import org.mjdev.gradle.extensions.debugImplementation
import org.mjdev.gradle.extensions.kapt
import org.mjdev.gradle.extensions.testImplementation
import org.mjdev.gradle.extensions.androidTestImplementation
import org.mjdev.gradle.extensions.applicationId
Expand Down Expand Up @@ -69,7 +68,6 @@ class AppPlugin : BasePlugin() {
fromBuildPropertiesFile(appConfig, AppConfig.configPropertiesFile)
loadRootPropertiesFile(appConfig.versionPropertiesFile)
applyPlugin(libs.plugins.android.application)
applyPlugin(libs.plugins.kotlin.kapt)
applyPlugin(libs.plugins.kotlin.android)
applyPlugin(libs.plugins.kotlin.parcelize)
applyPlugin(libs.plugins.google.devtools.ksp)
Expand Down Expand Up @@ -109,7 +107,7 @@ class AppPlugin : BasePlugin() {
targetCompatibility = AppConfig.javaVersion
}
composeOptions {
// enableStrongSkippingMode = true
useLiveLiterals = true
}
defaultConfig {
applicationId = appConfig.namespace
Expand Down Expand Up @@ -343,9 +341,9 @@ class AppPlugin : BasePlugin() {
implementation(libs.dagger.hilt.android)
implementation(libs.androidx.compose.hilt.navigation)
// dagger annotations
kapt(libs.dagger.compiler)
kapt(libs.dagger.android.processor)
kapt(libs.dagger.hilt.compiler)
ksp(libs.dagger.compiler)
ksp(libs.dagger.android.processor)
ksp(libs.dagger.hilt.compiler)
implementation(libs.moshi)
implementation(libs.moshi.retrofit.converter)
ksp(libs.moshi.kotlin.codegen)
Expand Down
10 changes: 4 additions & 6 deletions buildSrc/src/main/kotlin/org/mjdev/gradle/plugin/LibPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import org.mjdev.gradle.extensions.extension
import org.mjdev.gradle.extensions.libs
import org.mjdev.gradle.extensions.implementation
import org.mjdev.gradle.extensions.debugImplementation
import org.mjdev.gradle.extensions.kapt
import org.mjdev.gradle.extensions.testImplementation
import org.mjdev.gradle.extensions.androidTestImplementation
import org.mjdev.gradle.extensions.ksp
Expand All @@ -47,7 +46,6 @@ class LibPlugin : BasePlugin() {
fromBuildPropertiesFile(libConfig, LibConfig.configPropertiesFile)
loadRootPropertiesFile(libConfig.versionPropertiesFile)
applyPlugin(libs.plugins.android.library)
applyPlugin(libs.plugins.kotlin.kapt)
applyPlugin(libs.plugins.kotlin.android)
applyPlugin(libs.plugins.kotlin.parcelize)
applyPlugin(libs.plugins.google.devtools.ksp)
Expand Down Expand Up @@ -75,7 +73,7 @@ class LibPlugin : BasePlugin() {
buildConfig = LibConfig.buildConfigEnabled
}
composeOptions {
// enableStrongSkippingMode = true
useLiveLiterals = true
}
defaultConfig {
minSdk = LibConfig.minSdk
Expand Down Expand Up @@ -207,9 +205,9 @@ class LibPlugin : BasePlugin() {
// dagger hilt
implementation(libs.dagger.hilt.android)
implementation(libs.androidx.compose.hilt.navigation)
kapt(libs.dagger.compiler)
kapt(libs.dagger.android.processor)
kapt(libs.dagger.hilt.compiler)
ksp(libs.dagger.compiler)
ksp(libs.dagger.android.processor)
ksp(libs.dagger.hilt.compiler)
// moshi
implementation(libs.moshi)
implementation(libs.moshi.retrofit.converter)
Expand Down
Loading

0 comments on commit bfc12af

Please sign in to comment.