You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Hard coded alternative to get class files for Java.
198
-
//val classesTree = project.fileTree(mapOf("dir" to "${project.buildDir}/intermediates/classes/${variant.dirName}", "excludes" to getFileFilterPatterns()))
194
+
// Collect the class files based on the Java Compiler output
195
+
val javaClassOutputs = variant.javaCompileProvider.get().outputs
196
+
val javaClassTrees = javaClassOutputs.files.map { file ->
// Hard coded alternative to get class files for Java.
200
+
//val classesTree = project.fileTree(mapOf("dir" to "${project.buildDir}/intermediates/classes/${variant.dirName}", "excludes" to getFileFilterPatterns()))
199
201
200
-
// TODO: No idea how to dynamically get the kotlin class files output folder, so for now this is hardcoded.
201
-
// TODO: For some reason the tmp/kotlin-classes folder does not use the variant.dirName property, for now we instead use the variant.name.
202
-
val kotlinClassFolder ="${project.buildDir}/tmp/kotlin-classes/${variant.name}"
203
-
project.logger.info("Kotlin class folder for variant '${variant.name}': $kotlinClassFolder")
202
+
// TODO: No idea how to dynamically get the kotlin class files output folder, so for now this is hardcoded.
203
+
// TODO: For some reason the tmp/kotlin-classes folder does not use the variant.dirName property, for now we instead use the variant.name.
204
+
val kotlinClassFolder ="${project.buildDir}/tmp/kotlin-classes/${variant.name}"
205
+
project.logger.info("Kotlin class folder for variant '${variant.name}': $kotlinClassFolder")
204
206
205
-
val kotlinClassTree = project.fileTree(kotlinClassFolder, excludes = getFileFilterPatterns()).excludeNonClassFiles()
207
+
val kotlinClassTree = project.fileTree(kotlinClassFolder, excludes = getFileFilterPatterns()).excludeNonClassFiles()
206
208
207
-
// getSourceFolders returns ConfigurableFileCollections, but we only need the base directory of each ConfigurableFileCollection.
208
-
val sourceFiles = variant.getSourceFolders(SourceKind.JAVA).map { file -> file.dir }
209
+
// getSourceFolders returns ConfigurableFileCollections, but we only need the base directory of each ConfigurableFileCollection.
210
+
val sourceFiles = variant.getSourceFolders(SourceKind.JAVA).map { file -> file.dir }
0 commit comments