mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Adjust a few paths.
This commit is contained in:
parent
94364cbe07
commit
4017cd820f
2 changed files with 7 additions and 6 deletions
|
@ -31,7 +31,9 @@ class JarGenerator @Inject constructor(val dependencyManager: DependencyManager)
|
|||
|
||||
// Class files
|
||||
val files = KFiles.findRecursively(classesDir).map { File(relClassesDir.toFile(), it) }
|
||||
val filesNotExcluded : List<File> = files.filter { ! KFiles.isExcluded(it, jar.excludes) }
|
||||
val filesNotExcluded : List<File> = files.filter {
|
||||
! KFiles.isExcluded(KFiles.joinDir(project.directory, it.path), jar.excludes)
|
||||
}
|
||||
val fileSpecs = arrayListOf<IFileSpec>()
|
||||
filesNotExcluded.forEach {
|
||||
fileSpecs.add(IFileSpec.FileSpec(it.path.toString().substring(prefixPath.toString().length + 1)))
|
||||
|
|
|
@ -52,13 +52,12 @@ class PackagingPlugin @Inject constructor(val dependencyManager : DependencyMana
|
|||
val fromPath = directory + "/" + includedFile.from
|
||||
if (File(fromPath).exists()) {
|
||||
spec.toFiles(fromPath).forEach { file ->
|
||||
File(fromPath, file.path).let {
|
||||
if (!it.exists()) {
|
||||
throw AssertionError("File should exist: $it")
|
||||
}
|
||||
val fullFile = File(fromPath, file.path)
|
||||
if (! fullFile.exists()) {
|
||||
throw AssertionError("File should exist: $fullFile")
|
||||
}
|
||||
|
||||
if (!KFiles.isExcluded(file, excludes)) {
|
||||
if (!KFiles.isExcluded(fullFile, excludes)) {
|
||||
includedSpecs.add(FileSpec(file.path))
|
||||
} else {
|
||||
log(2, "Not adding ${file.path} to jar file because it's excluded")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue