mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 16:28:12 -07:00
Refactor.
This commit is contained in:
parent
72bcffab2c
commit
908610ba3a
1 changed files with 6 additions and 6 deletions
|
@ -16,6 +16,7 @@ import com.beust.kobalt.maven.PomGenerator
|
||||||
import com.beust.kobalt.misc.IncludedFile
|
import com.beust.kobalt.misc.IncludedFile
|
||||||
import com.beust.kobalt.misc.KFiles
|
import com.beust.kobalt.misc.KFiles
|
||||||
import com.beust.kobalt.misc.KobaltExecutors
|
import com.beust.kobalt.misc.KobaltExecutors
|
||||||
|
import com.beust.kobalt.misc.benchmarkMillis
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
import javax.inject.Singleton
|
import javax.inject.Singleton
|
||||||
|
@ -64,8 +65,7 @@ class PackagingPlugin @Inject constructor(val dependencyManager : DependencyMana
|
||||||
override fun assemble(project: Project, context: KobaltContext) : IncrementalTaskInfo {
|
override fun assemble(project: Project, context: KobaltContext) : IncrementalTaskInfo {
|
||||||
val allConfigs = packages.filter { it.project.name == project.name }
|
val allConfigs = packages.filter { it.project.name == project.name }
|
||||||
|
|
||||||
val start = System.currentTimeMillis()
|
val benchmark = benchmarkMillis {
|
||||||
val checksums =
|
|
||||||
if (true) {
|
if (true) {
|
||||||
val allIncludedFiles = arrayListOf<IncludedFile>()
|
val allIncludedFiles = arrayListOf<IncludedFile>()
|
||||||
val zipToFiles = hashMapOf<String, List<IncludedFile>>()
|
val zipToFiles = hashMapOf<String, List<IncludedFile>>()
|
||||||
|
@ -98,11 +98,11 @@ class PackagingPlugin @Inject constructor(val dependencyManager : DependencyMana
|
||||||
} else {
|
} else {
|
||||||
Pair(null, null)
|
Pair(null, null)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
val inMd5 = checksums.first
|
context.logger.log(project.name, 2, " Time to calculate packaging checksum: ${benchmark.first} ms")
|
||||||
val outMd5 = checksums.second
|
|
||||||
context.logger.log(project.name, 2,
|
val (inMd5, outMd5) = benchmark.second
|
||||||
" Time to calculate packaging checksum: " + (System.currentTimeMillis() - start) + " ms")
|
|
||||||
|
|
||||||
return IncrementalTaskInfo(
|
return IncrementalTaskInfo(
|
||||||
{ -> inMd5 },
|
{ -> inMd5 },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue