[Gradle, JS] Remove redundant fields inside NpmDependency
This commit is contained in:
committed by
Space Team
parent
df50994f4f
commit
9d8e7991a8
+1
-1
@@ -47,7 +47,7 @@ open class NodeJsRootExtension(
|
||||
}
|
||||
|
||||
val rootProjectDir
|
||||
get() = project.projectDir
|
||||
get() = project.rootDir
|
||||
|
||||
private val gradleHome = project.gradle.gradleUserHomeDir.also {
|
||||
project.logger.kotlinInfo("Storing cached files in $it")
|
||||
|
||||
-5
@@ -38,11 +38,6 @@ data class NpmDependency(
|
||||
|
||||
override fun getVersion() = version
|
||||
|
||||
internal var parent: NpmDependency? = null
|
||||
internal val dependencies = mutableSetOf<NpmDependency>()
|
||||
internal var resolvedVersion: String? = null
|
||||
internal var integrity: String? = null
|
||||
|
||||
override fun resolve(transitive: Boolean): Set<File> =
|
||||
resolve()
|
||||
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ abstract class PublicPackageJsonTask :
|
||||
|
||||
private val compilationResolution
|
||||
get() = npmResolutionManager.get().resolution.get()[projectPath][compilationDisambiguatedName.get()]
|
||||
.getResolutionOrResolve(
|
||||
.getResolutionOrPrepare(
|
||||
npmResolutionManager.get(),
|
||||
logger
|
||||
)
|
||||
|
||||
+3
-3
@@ -61,7 +61,7 @@ class KotlinCompilationNpmResolution(
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
fun getResolutionOrResolve(
|
||||
fun getResolutionOrPrepare(
|
||||
npmResolutionManager: KotlinNpmResolutionManager,
|
||||
logger: Logger,
|
||||
): PreparedKotlinCompilationNpmResolution {
|
||||
@@ -80,7 +80,7 @@ class KotlinCompilationNpmResolution(
|
||||
): PreparedKotlinCompilationNpmResolution {
|
||||
check(!closed) { "$this already closed" }
|
||||
closed = true
|
||||
return getResolutionOrResolve(npmResolutionManager, logger)
|
||||
return getResolutionOrPrepare(npmResolutionManager, logger)
|
||||
}
|
||||
|
||||
fun createPreparedResolution(
|
||||
@@ -92,7 +92,7 @@ class KotlinCompilationNpmResolution(
|
||||
|
||||
internalDependencies.map {
|
||||
val compilationNpmResolution: KotlinCompilationNpmResolution = rootResolver[it.projectPath][it.compilationName]
|
||||
compilationNpmResolution.getResolutionOrResolve(
|
||||
compilationNpmResolution.getResolutionOrPrepare(
|
||||
npmResolutionManager,
|
||||
logger
|
||||
)
|
||||
|
||||
+1
-1
@@ -109,7 +109,7 @@ class KotlinCompilationNpmResolver(
|
||||
return _compilationNpmResolution
|
||||
}
|
||||
|
||||
fun createAggregatedConfiguration(): Configuration {
|
||||
private fun createAggregatedConfiguration(): Configuration {
|
||||
val all = project.configurations.create(compilation.disambiguateName("npm"))
|
||||
|
||||
all.usesPlatformOf(target)
|
||||
|
||||
+3
-4
@@ -29,14 +29,13 @@ abstract class YarnSetupTask : DefaultTask() {
|
||||
private val shouldDownload = settings.download
|
||||
|
||||
@get:Inject
|
||||
abstract internal val archiveOperations: ArchiveOperations
|
||||
internal abstract val archiveOperations: ArchiveOperations
|
||||
|
||||
@get:Inject
|
||||
abstract internal val fileHasher: FileHasher
|
||||
internal abstract val fileHasher: FileHasher
|
||||
|
||||
@get:Inject
|
||||
internal open val fs: FileSystemOperations
|
||||
get() = error("Should be injected")
|
||||
internal abstract val fs: FileSystemOperations
|
||||
|
||||
@Suppress("MemberVisibilityCanBePrivate")
|
||||
val downloadUrl
|
||||
|
||||
Reference in New Issue
Block a user