Skip to content

Android build.gradle: ARCore dep + SDK/Kotlin bumps (replicates upstream #33) - #5

Merged
iamEtornam merged 9 commits into
mainfrom
upstream-pr-33-android-gradle-arcore
Jul 8, 2026
Merged

Android build.gradle: ARCore dep + SDK/Kotlin bumps (replicates upstream #33)#5
iamEtornam merged 9 commits into
mainfrom
upstream-pr-33-android-gradle-arcore

Conversation

@iamEtornam

Copy link
Copy Markdown
Owner

Replicates upstream PR hlefe#33 by @navakanth.

Change (net of 9 commits): rewrites android/build.gradle — removes the buildscript/allprojects blocks, adds com.google.ar:core:1.52.0, bumps compileSdk/targetSdk to 36 and kotlin-stdlib to 2.1.10, adds packagingOptions { jniLibs { useLegacyPackaging = false } }.

⚠️ Review note: the net diff also drops androidx.constraintlayout:constraintlayout (used by the hand-motion guide layout) and removes the AGP classpath while raising compileSdk to 36 — this may break the build. Flagged for review.

Original author: navakanth. Upstream PR: hlefe#33

Added google AR implementation in dependencies with this line of code.
implementation 'com.google.ar:core:1.43.0'
packagingOptions {
    jniLibs {
        useLegacyPackaging = false
    }
}
Update Kotlin version to 1.9.22 from 1.9.10
Removed from buildscript dependencies and added in dependencies section:
implementation 'com.google.ar:core:1.43.0'
Updated the code in build.gradle
Upgrade compileSdk and targetSdk to version 34 to 36
Update ARCore dependency version to 1.52.0 from 1.43.0
Updated compileSdk and targetSdk versions to 34 and removed unnecessary buildscript and repositories sections.
Upgrade compileSdk and targetSdk to version 36 and kotlin version to 2.1.10
@iamEtornam

Copy link
Copy Markdown
Owner Author

Review — VERDICT: ⚠️ CONCERNS — do not merge as-is without a host-toolchain check

Replicates upstream hlefe#33 (rewrites android/build.gradle). Gradle can't be built here (no example app); reviewed by static read.

  • constraintlayout drop is SAFE — despite my initial worry. grep -rniE constraintlayout android/src = 0 hits; sceneform_hand_layout.xml uses FrameLayout, HandMotionView extends ImageView. Unused → correct cleanup.
  • Removing buildscript{}/allprojects{} is fine for a Flutter plugin module — AGP/Kotlin classpath & repos come from the host app; self-declaring them is redundant.
  • ⚠️ compileSdk/targetSdk 34 → 36 is a conditional break. API 36 needs AGP ≥ 8.6 (rec. 8.9+). The removed buildscript had pinned AGP 8.3.2 — with the pin gone, AGP comes from the host; if it's still 8.3.2 the build fails: "compileSdk 36 requires Android Gradle plugin 8.6.0 or higher."
  • ⚠️ Hardcoded kotlin-stdlib:2.1.10 while the Kotlin plugin version now comes from the host (previously pinned 1.9.10). A host on Kotlin < 2.1 will error/warn on incompatible stdlib metadata.
  • 🔸 packagingOptions{ jniLibs{ useLegacyPackaging=false } } valid & harmless (already the default; packagingOptions is the deprecated-but-working alias). Adding explicit com.google.ar:core:1.52.0 is benign (already transitive via arsceneview).

Bottom line: internally coherent and follows modern plugin conventions, but it raises the required host toolchain (AGP ≥ 8.6, Kotlin ≥ 2.1). Against this repo's prior baseline (AGP 8.3.2 / Kotlin 1.9.10) it will fail to build until the consuming app upgrades. Merge only after confirming your app's Android toolchain, or split out the SDK-36/Kotlin-2.1 bumps.

@iamEtornam
iamEtornam merged commit 2344c92 into main Jul 8, 2026
@gemini-code-assist

Copy link
Copy Markdown

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants