- Notifications
You must be signed in to change notification settings - Fork 111
Add variant-specific manifests to resolve googlePlay manifest merge conflicts #5956
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…ants Added manifest files for googlePlay flavor variants to resolve manifest merge conflicts between com.reown:sign:1.4.12 and com.appsflyer:af-android-sdk:6.17.3 for the conflicting attributes: application@dataExtractionRules, application@fullBackupContent, and android:allowBackup. The manifests use tools:replace to override these attributes during the manifest merge process for unit tests. Co-authored-by: crossle <1675131+crossle@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses manifest merge conflicts during unit test execution by adding a test-specific manifest with explicit conflict resolution directives. The conflicts arose between dependencies com.reown:sign:1.4.12 and com.appsflyer:af-android-sdk:6.17.3 over backup-related attributes.
- Added a unit test manifest with
tools:replacedirectives to resolve attribute conflicts - Configured Robolectric SDK versions for unit tests
- Updated build configuration to reference the test manifest
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| app/src/test/AndroidManifest.xml | New test manifest declaring conflicting attributes with tools:replace directives to resolve manifest merge conflicts |
| app/build.gradle | Added Robolectric configuration and test manifest source set (contains duplicate sourceSets block that needs merging) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
app/build.gradle Outdated
| sourceSets { | ||
| test { | ||
| manifest.srcFile 'src/test/AndroidManifest.xml' | ||
| } | ||
| } |
Copilot AI Nov 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate sourceSets block detected. There's already a sourceSets block at line 91 that configures test source directories. The new manifest configuration should be added to that existing block rather than creating a second sourceSets block. Gradle will only use one of these blocks, which could lead to unexpected behavior.
Suggestion: Merge this into the existing sourceSets block (lines 91-100) like this:
sourceSets { String sharedTestDir = 'src/sharedTest/java' test { java.srcDirs += sharedTestDir manifest.srcFile 'src/test/AndroidManifest.xml' } androidTest { java.srcDirs += sharedTestDir assets.srcDirs += files("$projectDir/schemas".toString()) } }| sourceSets { | |
| test { | |
| manifest.srcFile 'src/test/AndroidManifest.xml' | |
| } | |
| } | |
| // Merged test manifest configuration into the main sourceSets block above (lines 91-100). |
| | ||
| <meta-data | ||
| android:name="com.google.mlkit.vision.DEPENDENCIES" | ||
| android:value="(barcode)" | ||
| tools:replace="android:value" /> | ||
| |
Copilot AI Nov 19, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] There appear to be trailing whitespace characters on the blank lines inside the <application> tag (lines 10 and 15). Consider removing these for consistency with typical XML formatting.
| <meta-data | |
| android:name="com.google.mlkit.vision.DEPENDENCIES" | |
| android:value="(barcode)" | |
| tools:replace="android:value" /> | |
| <meta-data | |
| android:name="com.google.mlkit.vision.DEPENDENCIES" | |
| android:value="(barcode)" | |
| tools:replace="android:value" /> |
ce81b6f to 78deefd Compare
Manifest merge fails in
:app:processGooglePlayDebugUnitTestManifestdue to conflictingapplication@allowBackup,application@dataExtractionRules, andapplication@fullBackupContentattributes betweencom.reown:sign:1.4.12andcom.appsflyer:af-android-sdk:6.17.3.Changes
Added variant-specific manifests for all googlePlay build variants with explicit
tools:replacedirectives:app/src/googlePlay/AndroidManifest.xmlapp/src/googlePlayDebug/AndroidManifest.xmlapp/src/googlePlayStaging/AndroidManifest.xmlapp/src/googlePlayRelease/AndroidManifest.xmlEach manifest declares the conflicting attributes with values matching the main manifest and instructs the merger to use these values:
The main manifest's
tools:replacedoesn't apply during unit test manifest merging, requiring these variant-specific overrides.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
dl.google.com/usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -XX:+UseParallelGC -Xmx10g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-9.2.0-bin/11i5gvueggl8a5cioxuftxrik/gradle-9.2.0/lib/gradle-daemon-main-9.2.0.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-9.2.0-bin/11i5gvueggl8a5cioxuftxrik/gradle-9.2.0/lib/agents/gradle-instrumentation-agent-9.2.0.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 9.2.0(dns block)/usr/lib/jvm/temurin-17-jdk-amd64/bin/java -XX:+UseParallelGC --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED -Xmx10g -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-8.9-bin/90cnw93cvbtalezasaz0blq0a/gradle-8.9/lib/gradle-daemon-main-8.9.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-8.9-bin/90cnw93cvbtalezasaz0blq0a/gradle-8.9/lib/agents/gradle-instrumentation-agent-8.9.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.9(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
This pull request was created as a result of the following prompt from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.