Build: Drop unused setupBuildCache helper

This commit is contained in:
Vyacheslav Gerasimov
2021-09-22 14:42:44 +03:00
parent c6c993aa19
commit 1e223f8366
@@ -1,24 +0,0 @@
/*
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
import org.gradle.api.initialization.Settings
import org.gradle.caching.http.HttpBuildCache
import java.net.URI
fun Settings.setupBuildCache() {
buildCache.local.isEnabled = kotlinBuildProperties.localBuildCacheEnabled
kotlinBuildProperties.localBuildCacheDirectory?.let { buildCache.local.directory = it }
kotlinBuildProperties.buildCacheUrl?.let { remoteCacheUrl ->
buildCache.remote(HttpBuildCache::class.java) { remoteCache ->
remoteCache.url = URI(remoteCacheUrl)
remoteCache.isPush = kotlinBuildProperties.pushToBuildCache
if (kotlinBuildProperties.buildCacheUser != null && kotlinBuildProperties.buildCachePassword != null) {
remoteCache.credentials.username = kotlinBuildProperties.buildCacheUser
remoteCache.credentials.password = kotlinBuildProperties.buildCachePassword
}
}
}
}