mirror of
https://github.com/tursom/TursomServer.git
synced 2024-12-26 12:50:24 +08:00
update dependence
This commit is contained in:
parent
0ae1b662c4
commit
ebfeba583b
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,4 +7,5 @@ build
|
||||
*/build/
|
||||
#gradle.properties
|
||||
local.yml
|
||||
ts-gradle/local.properties
|
||||
!.idea/codeStyles
|
@ -1,5 +1,6 @@
|
||||
import org.gradle.api.DomainObjectCollection
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.artifacts.ConfigurationContainer
|
||||
import org.gradle.api.artifacts.Configuration
|
||||
import org.gradle.api.publish.PublishingExtension
|
||||
import org.gradle.api.publish.maven.MavenPublication
|
||||
import java.util.concurrent.TimeUnit
|
||||
@ -45,7 +46,7 @@ fun Project.publish(publish: PublishingExtension) {
|
||||
println("cannot publish to repository tursom:\n${e.javaClass}: ${e.message}")
|
||||
}
|
||||
|
||||
val repositoriesRegex = "repositories\\.[a-zA-z][a-zA-z0-9]*".toRegex()
|
||||
val repositoriesRegex = "publishRepositories\\.[a-zA-z][a-zA-z0-9]*".toRegex()
|
||||
properties.keys.asSequence().filter {
|
||||
it matches repositoriesRegex
|
||||
}.forEach { repositoryName ->
|
||||
@ -102,7 +103,7 @@ fun Project.publish(publish: PublishingExtension) {
|
||||
}
|
||||
}
|
||||
|
||||
fun ConfigurationContainer.noExpire() {
|
||||
fun DomainObjectCollection<Configuration>.noExpire() {
|
||||
all {
|
||||
it.resolutionStrategy.cacheChangingModulesFor(0, TimeUnit.SECONDS)
|
||||
it.resolutionStrategy.cacheDynamicVersionsFor(0, TimeUnit.SECONDS)
|
||||
@ -129,4 +130,8 @@ fun Project.userTursomRepositories(
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
configurations.noExpire()
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user