Minor: remove unused functions

KT-8487
This commit is contained in:
Alexey Tsvetkov
2016-02-11 20:36:03 +03:00
parent df157f9db3
commit f2cde80aaf
3 changed files with 0 additions and 28 deletions
@@ -38,9 +38,6 @@ class GradleIncrementalCacheImpl(targetDataRoot: File, targetOutputDir: File?, t
private val sourceToClassfilesMap = registerMap(SourceToClassfilesMap(SOURCES_TO_CLASSFILES.storageFile))
fun classfilesBySources(sources: Iterable<File>): Iterable<File> =
sources.flatMap { sourceToClassfilesMap[it] }
fun removeClassfilesBySources(sources: Iterable<File>): Unit =
sources.forEach { sourceToClassfilesMap.remove(it) }
@@ -104,13 +104,6 @@ abstract class AbstractKotlinCompile<T : CommonCompilerArguments>() : AbstractCo
private fun getKotlinSources(): List<File> = (getSource() as Iterable<File>).filter { it.isKotlinFile() }
protected fun File.isClassFile(): Boolean {
return when (FilenameUtils.getExtension(name).toLowerCase()) {
"class" -> true
else -> false
}
}
protected fun File.isKotlinFile(): Boolean {
return when (FilenameUtils.getExtension(name).toLowerCase()) {
"kt", "kts" -> true
@@ -160,7 +153,6 @@ open class KotlinCompile() : AbstractKotlinCompile<K2JVMCompilerArguments>() {
)
fun projectRelativePath(f: File) = f.toRelativeString(project.projectDir)
fun projectRelativePath(p: String) = File(p).toRelativeString(project.projectDir)
override fun populateTargetSpecificArgs(args: K2JVMCompilerArguments) {
// show kotlin compiler where to look for java source files
@@ -694,8 +686,3 @@ internal fun Logger.kotlinInfo(message: String) {
internal fun Logger.kotlinDebug(message: String) {
this.debug("[KOTLIN] $message")
}
internal fun Logger.kotlinLazyDebug(makeMessage: () -> String) {
if (this.isInfoEnabled)
kotlinDebug(makeMessage())
}
@@ -114,14 +114,6 @@ abstract class BaseGradleIT {
runAndCheck(cmd, check)
}
fun Project.stopDaemon(check: CompiledProject.() -> Unit) {
val cmd = createGradleCommand(arrayListOf("-stop"))
println("<=== Stop daemon: $cmd ===>")
runAndCheck(cmd, check)
}
private fun Project.runAndCheck(cmd: List<String>, check: CompiledProject.() -> Unit) {
val projectDir = File(workingDir, projectName)
if (!projectDir.exists())
@@ -206,16 +198,12 @@ abstract class BaseGradleIT {
else
assertSameFiles(sources, compiledKotlinSources.projectRelativePaths(this.project), "Compiled Kotlin files differ:\n ")
fun CompiledProject.assertCompiledKotlinSources(vararg sources: String, weakTesting: Boolean = false): CompiledProject = assertCompiledKotlinSources(sources.asIterable(), weakTesting)
fun CompiledProject.assertCompiledJavaSources(sources: Iterable<String>, weakTesting: Boolean = false): CompiledProject =
if (weakTesting)
assertContainFiles(sources, compiledJavaSources.projectRelativePaths(this.project), "Compiled Java files differ:\n ")
else
assertSameFiles(sources, compiledJavaSources.projectRelativePaths(this.project), "Compiled Java files differ:\n ")
fun CompiledProject.assertCompiledJavaSources(vararg sources: String, weakTesting: Boolean = false): CompiledProject = assertCompiledJavaSources(sources.asIterable(), weakTesting)
private fun Project.createBuildCommand(params: Array<out String>, options: BuildOptions): List<String> =
createGradleCommand(createGradleTailParameters(options, params))