[Gradle] Make CInteropGist Gradle Configuration Cache friendly

`sourceSets: Provider<Set<KotlinSourceSet>>` shouldn't be serialized to
Configuration Cache. Instead, only `allSourceSetNames` should be
serialized.
This commit is contained in:
Anton Lakotka
2022-06-22 01:15:02 +02:00
committed by Space
parent af717e03bd
commit a74e451d19
@@ -35,10 +35,10 @@ internal open class CInteropCommonizerTask
private val execOperations: ExecOperations,
) : AbstractCInteropCommonizerTask() {
internal data class CInteropGist(
internal class CInteropGist(
@get:Input val identifier: CInteropIdentifier,
@get:Input val konanTarget: KonanTarget,
@Transient @get:Internal val sourceSets: Provider<Set<KotlinSourceSet>>,
sourceSets: Provider<Set<KotlinSourceSet>>,
@get:Classpath
val libraryFile: Provider<File>
@@ -47,6 +47,31 @@ internal open class CInteropCommonizerTask
@get:Input
val allSourceSetNames: Provider<List<String>> = sourceSets
.map { it.withDependsOnClosure.map(Any::toString) }
/** Autogenerated with IDEA */
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
other as CInteropGist
if (identifier != other.identifier) return false
if (konanTarget != other.konanTarget) return false
if (libraryFile != other.libraryFile) return false
if (allSourceSetNames != other.allSourceSetNames) return false
return true
}
/** Autogenerated with IDEA */
override fun hashCode(): Int {
var result = identifier.hashCode()
result = 31 * result + konanTarget.hashCode()
result = 31 * result + libraryFile.hashCode()
result = 31 * result + allSourceSetNames.hashCode()
return result
}
}
override val outputDirectory: File = project.buildDir.resolve("classes/kotlin/commonizer")