Our project has the following configuration:
fladle {
variant = "internalDebug"
debugApk = project.provider {
"$buildDir/outputs/apk/internal/debug/app-internal-debug-universal.apk"
}
}
Surprisingly, this fails with the following error:
'/.../app/build/outputs/apk/internal/debug/app-internal-debug.apk' not found
From looking at the code, it seems that if either debugApk or instrumentationApk is not set the plugin will try to locate those files automatically, overwriting debugApk in the process:
|
if (!base.debugApk.isPresent || !base.instrumentationApk.isPresent) { |
|
findDebugAndInstrumentationApk(project, base) |
|
} |
Indeed, providing the default path to the instrumentation APK explicitly resolves the issue:
fladle {
variant = "internalDebug"
debugApk = project.provider {
"$buildDir/outputs/apk/internal/debug/app-internal-debug-universal.apk"
}
instrumentationApk = project.provider {
"$buildDir/outputs/apk/androidTest/internal/debug/app-internal-debug-androidTest.apk"
}
}
debugApk and instrumentationApk should probably be resolved independently to support use cases where one of the values is a custom path while the other is default.
Our project has the following configuration:
fladle { variant = "internalDebug" debugApk = project.provider { "$buildDir/outputs/apk/internal/debug/app-internal-debug-universal.apk" } }Surprisingly, this fails with the following error:
From looking at the code, it seems that if either
debugApkorinstrumentationApkis not set the plugin will try to locate those files automatically, overwritingdebugApkin the process:fladle/buildSrc/src/main/java/com/osacky/flank/gradle/FladlePluginDelegate.kt
Lines 45 to 47 in d332231
Indeed, providing the default path to the instrumentation APK explicitly resolves the issue:
fladle { variant = "internalDebug" debugApk = project.provider { "$buildDir/outputs/apk/internal/debug/app-internal-debug-universal.apk" } instrumentationApk = project.provider { "$buildDir/outputs/apk/androidTest/internal/debug/app-internal-debug-androidTest.apk" } }debugApkandinstrumentationApkshould probably be resolved independently to support use cases where one of the values is a custom path while the other is default.