Skip to content

Commit bfd56d7

Browse files
committed
Added documentation for resolving dependecies.
1 parent 6ffa582 commit bfd56d7

File tree

1 file changed

+81
-11
lines changed

1 file changed

+81
-11
lines changed

documentation/in-using.md

Lines changed: 81 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ Let's start small?
167167
```
168168
PermissionsAPI.hasPermission
169169
170-
- accepts:
170+
- accepts:
171171
- playerNickName - nickname of target player. (string)
172172
- node - permission node as string, e.g ess.weather (string)
173173
- isServerSender - needed for additional checking permissions. ((boolean) by default is false)
@@ -178,7 +178,7 @@ PermissionsAPI.hasPermission
178178
```
179179
PermissionsAPI.getAllUserPermissions
180180
181-
- accepts:
181+
- accepts:
182182
- playerNickName - nickname of target player. (string)
183183
184184
- return: list with all able user and group for user permissions. (list with string type)
@@ -195,7 +195,7 @@ PermissionsAPI.getDefaultGroup
195195
```
196196
PermissionsAPI.getGroupPermissions
197197
198-
- accepts:
198+
- accepts:
199199
- groupName - just group name. (string)
200200
OR
201201
- groupInstance - just group class instance. (Group class instance)
@@ -206,7 +206,7 @@ PermissionsAPI.getGroupPermissions
206206
```
207207
PermissionsAPI.getUserGroup
208208
209-
- accepts:
209+
- accepts:
210210
- playerNickName - nickname of target player. (string)
211211
212212
- return: instance of the class of the rights group the user belongs to. (Group class instance)
@@ -215,7 +215,7 @@ PermissionsAPI.getUserGroup
215215
```
216216
PermissionsAPI.getUserPermissions
217217
218-
- accepts:
218+
- accepts:
219219
- playerNickName - nickname of target player. (string)
220220
221221
- return: list with all able user permissions. (list with string type)
@@ -226,7 +226,7 @@ PermissionsAPI.removeGroupPermission
226226
227227
- description: Remove permission node from group.
228228
229-
- accepts:
229+
- accepts:
230230
- groupName - just group name. (string)
231231
- node - group permission. (string)
232232
OR
@@ -239,7 +239,7 @@ PermissionsAPI.removeUserPermission
239239
240240
- description: Remove permission node from user.
241241
242-
- accepts:
242+
- accepts:
243243
- playerNickName - nickname of target player. (string)
244244
node - user permission. setting up for "*" (any) player. (string)
245245
```
@@ -249,7 +249,7 @@ PermissionsAPI.setGroupPermissionNode
249249
250250
- description: Install \ Add new permission for group.
251251
252-
- accepts:
252+
- accepts:
253253
- groupName - just group name. (string)
254254
- node - new group permission. (string)
255255
OR
@@ -262,7 +262,7 @@ PermissionsAPI.setUserPermissionGroup
262262
263263
- description: Install \ Set new permission group for user.
264264
265-
- accepts:
265+
- accepts:
266266
- playerNickName - nickname of target player. (string)
267267
- groupName - new user permission group. (string)
268268
OR
@@ -275,11 +275,81 @@ PermissionsAPI.setUserPermissionNode
275275
276276
- description: Install \ Add new permission for user.
277277
278-
- accepts:
278+
- accepts:
279279
- playerNickName - nickname of target player. (string)
280280
- node - new user permission. setting up for "*" (any) player. (string)
281281
```
282282

283283
## These are all API methods, I think you understand that everything is very simple.
284284

285-
### For all questions, be sure to write issues!
285+
### 2.4 Resolving dependecies.
286+
287+
> #### just make such in `build.gradle` file:
288+
289+
```groovy
290+
buildscript {
291+
dependencies {
292+
// kotlin version must be 1.3.50.
293+
classpath(
294+
"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
295+
)
296+
classpath(
297+
"org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion"
298+
)
299+
}
300+
}
301+
302+
apply(plugin: "kotlin")
303+
apply(plugin: "java")
304+
apply(plugin: "kotlinx-serialization")
305+
306+
configurations {
307+
embed
308+
compile.extendsFrom(embed)
309+
}
310+
311+
repositories {
312+
jcenter()
313+
mavenCentral()
314+
}
315+
316+
// kotlin version must be 1.3.50.
317+
// kotlinx serialization version must be 0.12.0.
318+
319+
dependencies {
320+
compile(
321+
group: "org.jetbrains.kotlinx",
322+
name: "kotlinx-serialization-runtime",
323+
version: kotlinxSerializationVersion
324+
)
325+
embed(
326+
group: "org.jetbrains.kotlinx",
327+
name: "kotlinx-serialization-runtime",
328+
version: kotlinxSerializationVersion
329+
)
330+
compile(
331+
group: "org.jetbrains.kotlin",
332+
name: "kotlin-stdlib-$kotlinJdkVersionTarget",
333+
version: kotlinVersion
334+
)
335+
embed(
336+
group: "org.jetbrains.kotlin",
337+
name: "kotlin-stdlib-$kotlinJdkVersionTarget",
338+
version: kotlinVersion
339+
)
340+
}
341+
342+
jar {
343+
....
344+
from configurations.embed.collect {
345+
it.isDirectory() ? it : zipTree(it)
346+
}
347+
}
348+
349+
// jvmVersionTarget must be 1.8.
350+
351+
compileKotlin.kotlinOptions.jvmTarget =
352+
compileTestKotlin.kotlinOptions.jvmTarget = jvmVersionTarget
353+
```
354+
355+
### For all questions, be sure to write issues!

0 commit comments

Comments
 (0)