mirror of
https://github.com/tursom/TursomServer.git
synced 2025-01-14 06:10:15 +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/
|
*/build/
|
||||||
#gradle.properties
|
#gradle.properties
|
||||||
local.yml
|
local.yml
|
||||||
|
ts-gradle/local.properties
|
||||||
!.idea/codeStyles
|
!.idea/codeStyles
|
@ -1,5 +1,6 @@
|
|||||||
|
import org.gradle.api.DomainObjectCollection
|
||||||
import org.gradle.api.Project
|
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.PublishingExtension
|
||||||
import org.gradle.api.publish.maven.MavenPublication
|
import org.gradle.api.publish.maven.MavenPublication
|
||||||
import java.util.concurrent.TimeUnit
|
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}")
|
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 {
|
properties.keys.asSequence().filter {
|
||||||
it matches repositoriesRegex
|
it matches repositoriesRegex
|
||||||
}.forEach { repositoryName ->
|
}.forEach { repositoryName ->
|
||||||
@ -102,7 +103,7 @@ fun Project.publish(publish: PublishingExtension) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun ConfigurationContainer.noExpire() {
|
fun DomainObjectCollection<Configuration>.noExpire() {
|
||||||
all {
|
all {
|
||||||
it.resolutionStrategy.cacheChangingModulesFor(0, TimeUnit.SECONDS)
|
it.resolutionStrategy.cacheChangingModulesFor(0, TimeUnit.SECONDS)
|
||||||
it.resolutionStrategy.cacheDynamicVersionsFor(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