Skip to content

Commit 25d4ed9

Browse files
committed
👷 将 repositories 移回 build.gradle.kts
1 parent 683574f commit 25d4ed9

2 files changed

Lines changed: 31 additions & 28 deletions

File tree

‎build.gradle.kts‎

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,36 @@ sourceSets {
4040
}
4141
}
4242

43+
fun RepositoryHandler.saRepository() {
44+
val inChina = System.getProperty("user.timezone") in arrayOf("Asia/Shanghai", "GMT+08:00")
45+
maven {
46+
if (!inChina) {
47+
url = uri("https://maven.tinylake.top/")//cloudFlare mirror
48+
} else {
49+
url = uri("https://packages.aliyun.com/maven/repository/2102713-release-0NVzQH/")
50+
credentials {
51+
username = "609f6fb4aa6381038e01fdee"
52+
password = "h(7NRbbUWYrN"
53+
}
54+
}
55+
content {
56+
includeModule("cf.wayzer", "ScriptAgent")
57+
}
58+
}
59+
}
60+
61+
allprojects {
62+
repositories {
63+
mavenCentral()
64+
saRepository()
65+
maven(url = "https://www.jitpack.io") {
66+
content {
67+
excludeModule("cf.wayzer", "ScriptAgent")
68+
}
69+
}
70+
maven(url = "https://repo.papermc.io/repository/maven-public/")
71+
}
72+
}
4373

4474
dependencies {
4575
val libraryVersion = "1.11.3.1"
@@ -80,7 +110,7 @@ tasks {
80110
println(archiveFile.get())
81111
}
82112
}
83-
withType<ProcessResources>().configureEach {
113+
processResources {
84114
exclude("META-INF")
85115
expand("version" to loaderVersion)
86116
}

‎settings.gradle.kts‎

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,3 @@
1-
dependencyResolutionManagement {
2-
repositories {
3-
val inChina = System.getProperty("user.timezone") in arrayOf("Asia/Shanghai", "GMT+08:00")
4-
// mavenLocal()
5-
mavenCentral()
6-
maven(url = "https://www.jitpack.io") {
7-
content {
8-
excludeModule("cf.wayzer", "ScriptAgent")
9-
}
10-
}
11-
maven(url = "https://repo.papermc.io/repository/maven-public/")
12-
13-
//ScriptAgent
14-
if (!inChina) {
15-
maven("https://maven.tinylake.top/") //cloudFlare mirror
16-
} else {
17-
maven {
18-
url = uri("https://packages.aliyun.com/maven/repository/2102713-release-0NVzQH/")
19-
credentials {
20-
username = "609f6fb4aa6381038e01fdee"
21-
password = "h(7NRbbUWYrN"
22-
}
23-
}
24-
}
25-
}
26-
}
27-
281
include("scripts")
292

303
file("scripts").listFiles()?.forEach {

0 commit comments

Comments
 (0)