mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 00:38:11 -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
|
// Class files
|
||||||
val files = KFiles.findRecursively(classesDir).map { File(relClassesDir.toFile(), it) }
|
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>()
|
val fileSpecs = arrayListOf<IFileSpec>()
|
||||||
filesNotExcluded.forEach {
|
filesNotExcluded.forEach {
|
||||||
fileSpecs.add(IFileSpec.FileSpec(it.path.toString().substring(prefixPath.toString().length + 1)))
|
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
|
val fromPath = directory + "/" + includedFile.from
|
||||||
if (File(fromPath).exists()) {
|
if (File(fromPath).exists()) {
|
||||||
spec.toFiles(fromPath).forEach { file ->
|
spec.toFiles(fromPath).forEach { file ->
|
||||||
File(fromPath, file.path).let {
|
val fullFile = File(fromPath, file.path)
|
||||||
if (!it.exists()) {
|
if (! fullFile.exists()) {
|
||||||
throw AssertionError("File should exist: $it")
|
throw AssertionError("File should exist: $fullFile")
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!KFiles.isExcluded(file, excludes)) {
|
if (!KFiles.isExcluded(fullFile, excludes)) {
|
||||||
includedSpecs.add(FileSpec(file.path))
|
includedSpecs.add(FileSpec(file.path))
|
||||||
} else {
|
} else {
|
||||||
log(2, "Not adding ${file.path} to jar file because it's excluded")
|
log(2, "Not adding ${file.path} to jar file because it's excluded")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue