Minor. Update tests to support them on Android

This commit is contained in:
Mikhael Bogdanov
2020-02-27 09:30:55 +01:00
parent 8a8536f8ae
commit a9e03937a3
8 changed files with 23 additions and 16 deletions
@@ -71,6 +71,10 @@ android {
ktest1 {
dimension "box"
}
ktest2 {
dimension "box"
}
}
}
@@ -96,4 +100,5 @@ dependencies {
ktest0Implementation fileTree(dir: 'libs/test', include: ['libtest0.jar'])
ktest1Implementation fileTree(dir: 'libs/test', include: ['libtest1.jar'])
ktest2Implementation fileTree(dir: 'libs/test', include: ['libtest2.jar'])
}
@@ -138,12 +138,12 @@ class CodegenTestsOnAndroidGenerator private constructor(private val pathManager
private fun writeFiles(filesToCompile: List<KtFile>, environment: KotlinCoreEnvironment) {
if (filesToCompile.isEmpty()) return
//3000 files per folder that would be used by flavor to avoid multidex usage,
//2500 files per folder that would be used by flavor to avoid multidex usage,
// each folder would be jared by build.gradle script
writtenFilesCount += filesToCompile.size
val index = writtenFilesCount / 3000
val index = writtenFilesCount / 2500
val outputDir = File(pathManager.getOutputForCompiledFiles(index))
assertTrue("Add flavors for ktest$index", index < 2)
assertTrue("Add flavors for ktest$index", index < 3)
println("Generating ${filesToCompile.size} files into ${outputDir.name}, configuration: '${environment.configuration}'...")