Skip to content

[MS-1691] Clean up unused dependencies and build workarounds - #1861

Open
meladRaouf wants to merge 8 commits into
mainfrom
feature/dependency-cleanup
Open

meladRaouf wants to merge 8 commits into
mainfrom
feature/dependency-cleanup

Conversation

@meladRaouf

Copy link
Copy Markdown
Collaborator

JIRA ticket
Will be released in: 2027.1.0

Notable changes

  • Removed unused Maven repositories: the duplicate Maven Central entry, Sonatype snapshots (the service has shut down), CommonsWare, and the NEC and Secugen wrapper repos (NEC is unsupported since 2026.1.0 and the Secugen artifact is no longer used).
  • Removed unused version catalog entries: secugen, androidX-appcompat-resource, androidX-navigation-ui, testing-retrofit, testing-Robolectric-annotation and testing-Espresso-barista, plus their orphaned versions.
  • Dropped androidx.multidex: minSdk 24 supports multidex natively. CoreApplication now extends Application, and the Robolectric ShadowAndroidXMultiDex is removed.
  • Removed unused coordinatorlayout from infra:ui-base. Material still brings it in.
  • Removed redundant kotlin-reflect from fingerprint:capture. It already reaches it at runtime through fingerprint:infra:scanner.
  • Removed obsolete lifecycle-viewmodel-ktx excludes on Chucker and Preference. Lifecycle is on 2.11 everywhere, so the old version gets upgraded anyway.

Each change is its own commit, so any one can be reverted on its own.

Testing guidance

  • ./gradlew assembleDebug testDebugUnitTest passes.
  • A clean dependency resolve in CI with no "Could not find…" errors confirms the removed repos weren't needed.
  • Smoke test a debug build: the app launches, and Chucker opens from the notification.

Additional work checklist

  • Effect on other features and security has been considered
  • Design document marked as "In development" (if applicable)
  • External (Gitbook) and internal (Confluence) Documentation is up to date (or ticket created)
  • Test cases in Testiny are up to date (or ticket created)
  • Other teams notified about the changes (if applicable)

meladRaouf and others added 6 commits October 12, 2026 16:48
- repo1.maven.org duplicates mavenCentral() in pluginManagement
- oss.sonatype.org snapshots: OSSRH was shut down; no snapshot deps
- repo.commonsware.com: nothing resolves from it any more
- NEC wrapper: NEC is unsupported since v2026.1.0
- Secugen wrapper: the secugen artifact is no longer used

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XDdSwkCH2YzDmLynPhih3H
secugen, androidX-appcompat-resource, androidX-navigation-ui,
testing-retrofit, testing-Robolectric-annotation and
testing-Espresso-barista are not referenced by any module.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XDdSwkCH2YzDmLynPhih3H
minSdk is 24 and Android supports multidex natively from API 21, so
MultiDexApplication and the Robolectric MultiDex shadow are no longer
needed. CoreApplication now extends android.app.Application.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XDdSwkCH2YzDmLynPhih3H
No layout or class uses CoordinatorLayout. Material still brings it in
transitively.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XDdSwkCH2YzDmLynPhih3H
Only fingerprint:infra:scanner uses kotlin-reflect, and it already
declares it as an implementation dependency, so it stays on
fingerprint:capture's runtime classpath.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XDdSwkCH2YzDmLynPhih3H
The app resolves lifecycle 2.11 everywhere, so the old
lifecycle-viewmodel-ktx pulled in by Chucker and Preference is upgraded
to the same version and no longer needs excluding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XDdSwkCH2YzDmLynPhih3H
@cla-bot cla-bot Bot added the ... label Oct 12, 2026
-Xnew-inference has been the default since Kotlin 1.4, and the
kotlin.Experimental marker no longer exists, so both only produced
compiler warnings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XDdSwkCH2YzDmLynPhih3H
@meladRaouf
meladRaouf marked this pull request as ready for review October 12, 2026 16:27
@meladRaouf
meladRaouf requested review from BurningAXE, alex-vt, alexandr-simprints and luhmirin-s and a balanced review from Copilot October 12, 2026 16:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Dependabot still references the removed Sonatype and CommonsWare repositories, leaving the cleanup incomplete.

1 open finding
What changed in this PR

Cleans obsolete repositories, dependencies, and Kotlin compiler workarounds ahead of release 2027.1.0.

Changes:

  • Removes unused repositories and catalog entries.
  • Drops legacy multidex setup and test shadows.
  • Simplifies dependency declarations and compiler options.
File Description
settings.gradle.kts Removes obsolete Maven repositories.
infra/​ui-base/​build.gradle.kts Removes direct CoordinatorLayout dependency.
infra/​test-tools/​src/​main/​java/​com/​simprints/​testtools/​unit/​robolectric/​ShadowAndroidXMultiDex.kt Deletes obsolete multidex shadow.
infra/​test-tools/​build.gradle.kts Removes multidex test dependency.
infra/​resources/​build.gradle.kts Removes lifecycle exclusion from Preference.
infra/​network/​build.gradle.kts Removes lifecycle exclusion from Chucker.
infra/​events/​src/​test/​java/​com/​simprints/​infra/​events/​event/​local/​migrations/​EventMigration1to2Test.kt Removes multidex shadow configuration.
infra/​events/​src/​test/​java/​com/​simprints/​infra/​events/​event/​local/​EventLocalDataSourceTest.kt Removes multidex shadow configuration.
infra/​core/​src/​main/​java/​com/​simprints/​core/​CoreApplication.kt Replaces MultiDexApplication with Application.
infra/​core/​build.gradle.kts Removes multidex dependency.
gradle/​libs.versions.toml Removes unused catalog entries and versions.
fingerprint/​capture/​build.gradle.kts Removes redundant Kotlin reflection dependency.
build-logic/​convention/​src/​main/​kotlin/​common/​KotlinAndroid.kt Removes obsolete compiler arguments.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread settings.gradle.kts
These repositories were removed from settings.gradle.kts; drop them from
Dependabot too so it stops querying them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XDdSwkCH2YzDmLynPhih3H
@sonarqubecloud

Copy link
Copy Markdown

Comment thread settings.gradle.kts
google()
mavenCentral()
gradlePluginPortal()
maven(url = "https://oss.sonatype.org/content/repositories/snapshots/")

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.

Can we keep this one for now? It is useful when adding changes to LibSimprints - we can create a "snapshot" release and use it in unreleased version of SID without pushing a full version to potential actual users (assuming there are any).

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.

Or even better we should switch to a correct mirror - https://central.sonatype.org/publish/publish-portal-snapshots/#consuming-via-gradle

This branch has not been deployed

No deployments
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