File tree Expand file tree Collapse file tree 1 file changed +91
-1
lines changed Expand file tree Collapse file tree 1 file changed +91
-1
lines changed Original file line number Diff line number Diff line change @@ -35,4 +35,94 @@ simbot的核心功能由实现了 simbot-api 模块的内容提供。
35
35
36
36
前往
37
37
<a href =" components-intro.md " >组件库</a >
38
- 选择、添加你所需的组件库,并可以前往它们各自的手册了解更多信息。
38
+ 选择、添加你所需的组件库,并可以前往它们各自的手册了解更多信息。
39
+
40
+ ## 使用快照
41
+
42
+ 如果你打算使用某个库的快照版本,你需要配置快照仓库。
43
+
44
+ <tabs group =" build " >
45
+ <tab title =" Gradle(Kotlin DSL) " group-key =" kts " >
46
+
47
+ ``` Kotlin
48
+ // 其他配置省略...
49
+
50
+ // 配置仓库
51
+ repositories {
52
+ mavenCentral()
53
+ // 额外添加快照仓库
54
+ maven {
55
+ url = uri(" https://oss.sonatype.org/content/repositories/snapshots/" )
56
+ mavenContent {
57
+ snapshotsOnly()
58
+ }
59
+ }
60
+ }
61
+
62
+ // 引用依赖
63
+ dependencies {
64
+ // 使用快照版本
65
+ implementation(" 要添加的依赖:name:xxx-SNAPSHOT" )
66
+ }
67
+ ```
68
+
69
+ </tab >
70
+ <tab title =" Gradle(Groovy) " group-key =" groovy " >
71
+
72
+ ``` Groovy
73
+ // 其他配置省略...
74
+
75
+ // 配置仓库
76
+ repositories {
77
+ mavenCentral()
78
+ // 额外添加快照仓库
79
+ maven {
80
+ url = 'https://oss.sonatype.org/content/repositories/snapshots/'
81
+ mavenContent {
82
+ snapshotsOnly()
83
+ }
84
+ }
85
+ }
86
+
87
+ // 引用依赖
88
+ dependencies {
89
+ // 使用快照版本
90
+ implementation '要添加的依赖:name:xxx-SNAPSHOT'
91
+ }
92
+ ```
93
+
94
+ </tab >
95
+ <tab title =" Maven " group-key =" maven " >
96
+
97
+ ``` xml
98
+ <!-- 其他配置省略... -->
99
+
100
+ <!-- 配置快照仓库 -->
101
+ <repositories >
102
+ <repository >
103
+ <id >sonatype-snapshot</id >
104
+ <name >Sonatype Snapshots Repository</name >
105
+ <url >https://oss.sonatype.org/content/repositories/snapshots/</url >
106
+ <snapshots >
107
+ <enabled >true</enabled >
108
+ </snapshots >
109
+ </repository >
110
+ </repositories >
111
+
112
+ <!-- 引用依赖 -->
113
+ <dependency >
114
+ <groupId >要添加的依赖</groupId >
115
+ <artifactId >name</artifactId >
116
+ <version >xxx-SNAPSHOT</version >
117
+ </dependency >
118
+ ```
119
+
120
+ </tab >
121
+ </tabs >
122
+
123
+ 快照的版本可以前往 [ 快照仓库] ( https://oss.sonatype.org/content/repositories/snapshots/love/forte/simbot/ )
124
+ 根据坐标路径寻找。
125
+
126
+ 比如:[ ` simbot-core ` 的快照版本列表] ( https://oss.sonatype.org/content/repositories/snapshots/love/forte/simbot/simbot-core/ )
127
+ 以及它的 [ maven-metadata.xml] ( https://oss.sonatype.org/content/repositories/snapshots/love/forte/simbot/simbot-core/maven-metadata.xml ) 。
128
+
You can’t perform that action at this time.
0 commit comments