From b35ef834ad30c57aaaa1aee618fb091258e1ff5a Mon Sep 17 00:00:00 2001 From: Alexey Illarionov Date: Mon, 13 May 2024 18:16:55 +0300 Subject: [PATCH] Bump dependency versions (#41) * Anvil 2.5.0-beta09 * androidx-activity 1.9.0 * androidx-fragment 1.7.0 * assertk 0.28.1 * compose 1.6.7 * compose-compiler 1.5.13 Downgrade AGP to 8.2.2 so that the project can be openend in Intellij IDEA --- .../generator/ContributesActivityCodeGenerator.kt | 4 ++-- .../ContributesExperimentCodeGenerator.kt | 4 ++-- gradle/libs.versions.toml | 14 +++++++------- gradle/verification-metadata.xml | 7 ++++++- .../ContributesInitializerCodeGenerator.kt | 4 ++-- .../test/generator/ContributesTestCodeGenerator.kt | 4 ++-- .../generator/ContributesViewModelCodeGenerator.kt | 4 ++-- .../ContributesCoroutineWorkerCodeGenerator.kt | 4 ++-- 8 files changed, 25 insertions(+), 20 deletions(-) diff --git a/activity/generator/src/main/kotlin/ru/pixnews/anvil/codegen/activity/generator/ContributesActivityCodeGenerator.kt b/activity/generator/src/main/kotlin/ru/pixnews/anvil/codegen/activity/generator/ContributesActivityCodeGenerator.kt index 2136f79..489de84 100644 --- a/activity/generator/src/main/kotlin/ru/pixnews/anvil/codegen/activity/generator/ContributesActivityCodeGenerator.kt +++ b/activity/generator/src/main/kotlin/ru/pixnews/anvil/codegen/activity/generator/ContributesActivityCodeGenerator.kt @@ -15,7 +15,7 @@ import com.squareup.anvil.compiler.internal.buildFile import com.squareup.anvil.compiler.internal.reference.ClassReference import com.squareup.anvil.compiler.internal.reference.asClassName import com.squareup.anvil.compiler.internal.reference.classAndInnerClassReferences -import com.squareup.anvil.compiler.internal.reference.generateClassName +import com.squareup.anvil.compiler.internal.reference.joinSimpleNames import com.squareup.anvil.compiler.internal.safePackageString import com.squareup.kotlinpoet.AnnotationSpec import com.squareup.kotlinpoet.ClassName @@ -56,7 +56,7 @@ public class ContributesActivityCodeGenerator : CodeGenerator { ): GeneratedFileWithSources { annotatedClass.checkClassExtendsType(ANDROID_ACTIVITY_FQ_NAME) - val moduleClassId = annotatedClass.generateClassName(suffix = "_ActivityModule") + val moduleClassId = annotatedClass.joinSimpleNames(suffix = "_ActivityModule") val generatedPackage = moduleClassId.packageFqName.safePackageString() val moduleClassName = moduleClassId.relativeClassName.asString() diff --git a/experiment/generator/src/main/kotlin/ru/pixnews/anvil/codegen/experiment/generator/ContributesExperimentCodeGenerator.kt b/experiment/generator/src/main/kotlin/ru/pixnews/anvil/codegen/experiment/generator/ContributesExperimentCodeGenerator.kt index 9b8bb87..38db239 100644 --- a/experiment/generator/src/main/kotlin/ru/pixnews/anvil/codegen/experiment/generator/ContributesExperimentCodeGenerator.kt +++ b/experiment/generator/src/main/kotlin/ru/pixnews/anvil/codegen/experiment/generator/ContributesExperimentCodeGenerator.kt @@ -15,7 +15,7 @@ import com.squareup.anvil.compiler.internal.buildFile import com.squareup.anvil.compiler.internal.reference.ClassReference import com.squareup.anvil.compiler.internal.reference.asClassName import com.squareup.anvil.compiler.internal.reference.classAndInnerClassReferences -import com.squareup.anvil.compiler.internal.reference.generateClassName +import com.squareup.anvil.compiler.internal.reference.joinSimpleNames import com.squareup.anvil.compiler.internal.safePackageString import com.squareup.kotlinpoet.AnnotationSpec import com.squareup.kotlinpoet.FileSpec @@ -62,7 +62,7 @@ public class ContributesExperimentCodeGenerator : CodeGenerator { annotatedClasses: Collection, codeGenDir: File, ): GeneratedFileWithSources { - val moduleClassId = annotatedClasses.first().generateClassName(suffix = "_Experiments_Module") + val moduleClassId = annotatedClasses.first().joinSimpleNames(suffix = "_Experiments_Module") val generatedPackage = moduleClassId.packageFqName.safePackageString() val moduleClassName = moduleClassId.relativeClassName.asString() diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f5b9b76..06454a4 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -4,17 +4,17 @@ androidCompileSdk = "34" kotlin = "1.9.23" -agp = "8.3.2" -androidx-activity = "1.8.2" +agp = "8.2.2" +androidx-activity = "1.9.0" androidx-annotation = "1.7.1" -androidx-fragment = "1.6.2" +androidx-fragment = "1.7.0" androidx-lifecycle = "2.7.0" androidx-workmanager = "2.9.0" -anvil = "2.5.0-beta05" +anvil = "2.5.0-beta09" auto-service = "1.1.1" -assertk = "0.28.0" -compose = "1.6.3" -composeCompiler = "1.5.11" +assertk = "0.28.1" +compose = "1.6.7" +composeCompiler = "1.5.13" detekt = "1.23.6" dagger = "2.51.1" diktat = "2.0.0" diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index ce2bc0f..6a845ca 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -61,7 +61,12 @@ - + + + + + + diff --git a/initializer/generator/src/main/kotlin/ru/pixnews/anvil/codegen/initializer/generator/ContributesInitializerCodeGenerator.kt b/initializer/generator/src/main/kotlin/ru/pixnews/anvil/codegen/initializer/generator/ContributesInitializerCodeGenerator.kt index ea56fec..f3465bb 100644 --- a/initializer/generator/src/main/kotlin/ru/pixnews/anvil/codegen/initializer/generator/ContributesInitializerCodeGenerator.kt +++ b/initializer/generator/src/main/kotlin/ru/pixnews/anvil/codegen/initializer/generator/ContributesInitializerCodeGenerator.kt @@ -19,7 +19,7 @@ import com.squareup.anvil.compiler.internal.reference.allSuperTypeClassReference import com.squareup.anvil.compiler.internal.reference.asClassName import com.squareup.anvil.compiler.internal.reference.asTypeName import com.squareup.anvil.compiler.internal.reference.classAndInnerClassReferences -import com.squareup.anvil.compiler.internal.reference.generateClassName +import com.squareup.anvil.compiler.internal.reference.joinSimpleNames import com.squareup.anvil.compiler.internal.safePackageString import com.squareup.kotlinpoet.ClassName import com.squareup.kotlinpoet.FileSpec @@ -132,5 +132,5 @@ public class ContributesInitializerCodeGenerator : CodeGenerator { private fun ClassReference.isInitializer() = getInitializerBoundType() != null - private fun ClassReference.moduleNameForInitializer(): ClassId = generateClassName(suffix = "_InitializerModule") + private fun ClassReference.moduleNameForInitializer(): ClassId = joinSimpleNames(suffix = "_InitializerModule") } diff --git a/test/generator/src/main/kotlin/ru/pixnews/anvil/codegen/test/generator/ContributesTestCodeGenerator.kt b/test/generator/src/main/kotlin/ru/pixnews/anvil/codegen/test/generator/ContributesTestCodeGenerator.kt index 5a88185..35e0d66 100644 --- a/test/generator/src/main/kotlin/ru/pixnews/anvil/codegen/test/generator/ContributesTestCodeGenerator.kt +++ b/test/generator/src/main/kotlin/ru/pixnews/anvil/codegen/test/generator/ContributesTestCodeGenerator.kt @@ -15,7 +15,7 @@ import com.squareup.anvil.compiler.internal.buildFile import com.squareup.anvil.compiler.internal.reference.ClassReference import com.squareup.anvil.compiler.internal.reference.asClassName import com.squareup.anvil.compiler.internal.reference.classAndInnerClassReferences -import com.squareup.anvil.compiler.internal.reference.generateClassName +import com.squareup.anvil.compiler.internal.reference.joinSimpleNames import com.squareup.anvil.compiler.internal.safePackageString import com.squareup.kotlinpoet.AnnotationSpec import com.squareup.kotlinpoet.FileSpec @@ -49,7 +49,7 @@ public class ContributesTestCodeGenerator : CodeGenerator { annotatedClass: ClassReference, codeGenDir: File, ): GeneratedFileWithSources { - val moduleClassId = annotatedClass.generateClassName(suffix = "_TestModule") + val moduleClassId = annotatedClass.joinSimpleNames(suffix = "_TestModule") val generatedPackage = moduleClassId.packageFqName.safePackageString() val moduleClassName = moduleClassId.relativeClassName.asString() diff --git a/viewmodel/generator/src/main/kotlin/ru/pixnews/anvil/codegen/viewmodel/generator/ContributesViewModelCodeGenerator.kt b/viewmodel/generator/src/main/kotlin/ru/pixnews/anvil/codegen/viewmodel/generator/ContributesViewModelCodeGenerator.kt index cf1e719..dd91b02 100644 --- a/viewmodel/generator/src/main/kotlin/ru/pixnews/anvil/codegen/viewmodel/generator/ContributesViewModelCodeGenerator.kt +++ b/viewmodel/generator/src/main/kotlin/ru/pixnews/anvil/codegen/viewmodel/generator/ContributesViewModelCodeGenerator.kt @@ -16,7 +16,7 @@ import com.squareup.anvil.compiler.internal.reference.ClassReference import com.squareup.anvil.compiler.internal.reference.MemberFunctionReference import com.squareup.anvil.compiler.internal.reference.asClassName import com.squareup.anvil.compiler.internal.reference.classAndInnerClassReferences -import com.squareup.anvil.compiler.internal.reference.generateClassName +import com.squareup.anvil.compiler.internal.reference.joinSimpleNames import com.squareup.anvil.compiler.internal.safePackageString import com.squareup.kotlinpoet.AnnotationSpec import com.squareup.kotlinpoet.ClassName @@ -56,7 +56,7 @@ public class ContributesViewModelCodeGenerator : CodeGenerator { ): GeneratedFileWithSources { annotatedClass.checkClassExtendsType(VIEW_MODEL_FQ_NAME) - val moduleClassId = annotatedClass.generateClassName(suffix = "_FactoryModule") + val moduleClassId = annotatedClass.joinSimpleNames(suffix = "_FactoryModule") val generatedPackage = moduleClassId.packageFqName.safePackageString() val moduleClassName = moduleClassId.relativeClassName.asString() diff --git a/workmanager/generator/src/main/kotlin/ru/pixnews/anvil/codegen/workmanager/generator/ContributesCoroutineWorkerCodeGenerator.kt b/workmanager/generator/src/main/kotlin/ru/pixnews/anvil/codegen/workmanager/generator/ContributesCoroutineWorkerCodeGenerator.kt index d16f34a..5055080 100644 --- a/workmanager/generator/src/main/kotlin/ru/pixnews/anvil/codegen/workmanager/generator/ContributesCoroutineWorkerCodeGenerator.kt +++ b/workmanager/generator/src/main/kotlin/ru/pixnews/anvil/codegen/workmanager/generator/ContributesCoroutineWorkerCodeGenerator.kt @@ -15,7 +15,7 @@ import com.squareup.anvil.compiler.internal.buildFile import com.squareup.anvil.compiler.internal.reference.ClassReference import com.squareup.anvil.compiler.internal.reference.asClassName import com.squareup.anvil.compiler.internal.reference.classAndInnerClassReferences -import com.squareup.anvil.compiler.internal.reference.generateClassName +import com.squareup.anvil.compiler.internal.reference.joinSimpleNames import com.squareup.anvil.compiler.internal.safePackageString import com.squareup.kotlinpoet.AnnotationSpec import com.squareup.kotlinpoet.ClassName @@ -57,7 +57,7 @@ public class ContributesCoroutineWorkerCodeGenerator : CodeGenerator { annotatedClass.checkClassExtendsType(COROUTINE_WORKER_FQ_NAME) val workerClassName = annotatedClass.asClassName() - val factoryClassId = annotatedClass.generateClassName(suffix = "_AssistedFactory") + val factoryClassId = annotatedClass.joinSimpleNames(suffix = "_AssistedFactory") val generatedPackage = factoryClassId.packageFqName.safePackageString() val factoryClassName = factoryClassId.relativeClassName.asString()