Skip to content

[MS-587] Resolve release compilation errors#818

Merged
meladRaouf merged 2 commits into
mainfrom
roolback-agp
Jul 18, 2024
Merged

[MS-587] Resolve release compilation errors#818
meladRaouf merged 2 commits into
mainfrom
roolback-agp

Conversation

@meladRaouf
Copy link
Copy Markdown
Collaborator

Due to inconsistencies between AGP, R8, KSP, and Hilt versions, we encountered issues when creating release builds. Over the last two days, I tried many workarounds mentioned in GitHub issues but found it safer to roll back. Downgrading the AGP version to the last known working version (in the release 2024.1.* branch) resolved the problem.

The error trace:

error: ComponentProcessingStep was unable to process 'com.simprints.id.Application_HiltComponents.SingletonC' because 'com.simprints.infra.config.sync.ConfigManager' could not be resolved.

Dependency trace:
    => element (CLASS): com.simprints.infra.sync.config.worker.DeviceConfigDownSyncWorker
    => element (CONSTRUCTOR): DeviceConfigDownSyncWorker(android.content.Context,androidx.work.WorkerParameters,com.simprints.infra.config.sync.ConfigManager,com.simprints.infra.sync.config.usecase.LogoutUseCase,com.simprints.infra.sync.SyncOrchestrator,kotlinx.coroutines.CoroutineDispatcher)
    => type (EXECUTABLE constructor): (android.content.Context,androidx.work.WorkerParameters,com.simprints.infra.config.sync.ConfigManager,com.simprints.infra.sync.config.usecase.LogoutUseCase,com.simprints.infra.sync.SyncOrchestrator,kotlinx.coroutines.CoroutineDispatcher)void
    => type (ERROR parameter type): com.simprints.infra.config.sync.ConfigManager

If type 'com.simprints.infra.config.sync.ConfigManager' is a generated type, check above for compilation errors that may have prevented the type from being generated. Otherwise, ensure that type 'com.simprints.infra.config.sync.ConfigManager' is on your classpath.
1 error

@cla-bot cla-bot Bot added the ... label Jul 17, 2024
@meladRaouf meladRaouf requested review from a team, BurningAXE, TristramN, alex-vt, alexandr-simprints, luhmirin-s and ybourgery and removed request for a team July 17, 2024 15:26
@meladRaouf meladRaouf changed the title [MS-587] downgrade gradle plugin version [MS-587] Resolve release compilation errors Jul 17, 2024
Comment thread id/proguard-rules.pro
# Do not obfuscate names in out packages`
-keepnames class com.simprints.** { *; }
# Do not obfuscate names in simprints package
-keep class com.simprints.** { *; }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a related change?

Copy link
Copy Markdown
Collaborator Author

@meladRaouf meladRaouf Jul 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes
As seen in this trail, we should keep the class functions and fields, not just the names

image

Comment thread build-logic/proguard-rules.pro Outdated
Comment thread id/proguard-rules.pro
Co-authored-by: Alex / Oleksii <oleksiy.vt@gmail.com>
@meladRaouf meladRaouf requested a review from alex-vt July 17, 2024 15:53
@sonarqubecloud
Copy link
Copy Markdown

@meladRaouf meladRaouf merged commit 08bf991 into main Jul 18, 2024
@meladRaouf meladRaouf deleted the roolback-agp branch July 18, 2024 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants