mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Forward slashes fix.
This commit is contained in:
parent
d9a287f710
commit
02f9449050
1 changed files with 2 additions and 2 deletions
|
@ -136,7 +136,7 @@ abstract class JvmCompilerPlugin @Inject constructor(
|
|||
fun isOutdated(project: Project, context: KobaltContext, actionInfo: CompilerActionInfo) : Boolean {
|
||||
fun stripSourceDir(sourceFile: String) : String {
|
||||
project.sourceDirectories.forEach {
|
||||
val d = KFiles.joinDir(project.directory, it)
|
||||
val d = listOf(project.directory, it).joinToString("/")
|
||||
if (sourceFile.startsWith(d)) return sourceFile.substring(d.length + 1)
|
||||
}
|
||||
throw KobaltException("Couldn't strip source dir from $sourceFile")
|
||||
|
@ -150,7 +150,7 @@ abstract class JvmCompilerPlugin @Inject constructor(
|
|||
|
||||
fun toClassFile(sourceFile: String) = stripSuffix(sourceFile) + ".class"
|
||||
|
||||
actionInfo.sourceFiles.forEach { sourceFile ->
|
||||
actionInfo.sourceFiles.map { it.replace("\\", "/") }.forEach { sourceFile ->
|
||||
val stripped = stripSourceDir(sourceFile)
|
||||
val classFile = File(KFiles.joinDir(project.directory, project.classesDir(context), toClassFile(stripped)))
|
||||
if (! classFile.exists() || File(sourceFile).lastModified() > classFile.lastModified()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue