Hello! In order to run tests in a different build ...
# gradle
v
Hello! In order to run tests in a different build type you need to define the buildType name in the
testBuildType
field (else they will run in the
debug
buildType). Let's say that I have a buildType with the name
buildTypeA
and write
testBuildType="buildTypeA"
, then everything works as expected. The problem is that when the name of the buildType is calculated by a function this does not seem to work. The strange thing is that
testBuildType=calculateBuildType()
assigns the correct value but in Android Studio I get
Nothing here
when I try to run them. Even if we define a pretty dummy calculate function the tests wont run (
calculateBuildType(): String = "buildTypeA"
<-- this does not work :S). Is this expected behaviour? My goal is to be able to run tests on the current buildType, without having to switch to the debug buildType which is counterproductive.
v
What is this about?
testBuildType
is nothing in Gradle. As you say AS, is this something Android specific? Maybe you should then at least post a link to this question in #android to reach people actually doing Android development. If not (or even if) maybe an [MCVE](https://stackoverflow.com/help/mcve) could help
👍 1
And additionally I'm not sure how the question is Kotlin-related