Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 13 additions & 15 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -249,25 +249,18 @@ static def getDate() {
android {
namespace 'org.commcare.dalvik'
compileSdk 36

lintOptions {
abortOnError false
disable 'MissingTranslation'
disable 'ResourceType'
packagingOptions {
resources {
excludes += ['META-INF/LICENSE', 'META-INF/LICENSE.txt', 'META-INF/DEPENDENCIES', 'META-INF/NOTICE', 'META-INF/NOTICE.txt']
}
}


// Espresso requires us to disable animations on device.
testOptions {
animationsDisabled = true
}

packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
}

buildFeatures {
buildConfig true
Expand Down Expand Up @@ -383,6 +376,7 @@ android {
test {
java.srcDirs = ['unit-tests/src/']
resources.srcDirs = ['unit-tests/resources/']
manifest.srcFile 'unit-tests/AndroidManifest.xml'
}

androidTest {
Expand Down Expand Up @@ -497,9 +491,6 @@ android {
}

// Ignore un-minified graphing files
aaptOptions {
ignoreAssetsPattern '!*.max.js:!*.max.css'
}

testOptions {
unitTests.all {
Expand All @@ -515,6 +506,13 @@ android {

// Needed to run espresso tests on release build.
testBuildType project.ext.TEST_BUILD_TYPE
androidResources {
ignoreAssetsPattern '!*.max.js:!*.max.css'
}
lint {
abortOnError false
disable 'MissingTranslation', 'ResourceType'
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/instrumentation-tests/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

<uses-sdk tools:overrideLibrary="android_libs.ub_uiautomator"/>

</manifest>
</manifest>
24 changes: 24 additions & 0 deletions app/unit-tests/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
Copy link
Contributor

Choose a reason for hiding this comment

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

@shubham1g5 Just trying to understand how does bumping the kotlin and gradle version needs this changes? If its required, can you please add more details or link.

Copy link
Contributor Author

@shubham1g5 shubham1g5 Jan 29, 2026

Choose a reason for hiding this comment

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

There is not a directly documentation or change log on this from AGP but my sense is this change in 8.12 changes how Android deals with generating test manifests and is a consequence of that we need to overide any manifests properties from underlying libraries we are using both in our test and main manifest to have the tests passing.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<application
android:allowBackup="false"
tools:replace="android:label,android:icon,android:theme, android:allowBackup"
android:name="org.commcare.CommCareApplication"
android:icon="@mipmap/commcare_launcher"
android:supportsRtl="true"
android:label="@string/application_name"
android:hardwareAccelerated="true"
android:usesCleartextTraffic="true"
android:theme="@style/AppBaseTheme"
android:enableOnBackInvokedCallback="false">
<!-- Override zebra-print-android library activity to add android:exported attribute
required for Android 12+ -->
<activity
android:name="com.dimagi.android.zebraprinttool.PrintReceiverActivity"
android:exported="true"
tools:node="merge" />
</application>

</manifest>
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
buildscript {
ext.kotlin_version = '1.8.20'
ext.kotlin_version = '2.2.20'
ext.nav_version = '2.9.1'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:8.6.1'
classpath 'com.android.tools.build:gradle:8.13.2'
classpath 'com.google.gms:google-services:4.3.14'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Jul 14 21:36:29 ICT 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists