@@ -360,7 +360,7 @@ described in the [Import](#import) section.
360
360
361
361
The fields or components of a configuration can be annotated with the `@Comment` annotation. This
362
362
annotation takes an array of strings. Each of these strings is written onto a new line as a comment.
363
- Empty strings are written as newlines.
363
+ The strings can contain `\n` characters. Empty strings are written as newlines (not as comments) .
364
364
365
365
If a configuration type _C_ that defines comments is used (as a field or component) within another
366
366
configuration type, the comments of _C_ are written with the proper indentation. However, if
@@ -620,17 +620,16 @@ This project contains three classes of modules:
620
620
621
621
# # Import
622
622
623
- **INFO:** I'm currently looking for an easier way for you to import this library that does not
624
- require authentication with GitHub. Please check
625
- this [issue](https://github.com/Exlll/ConfigLib/issues/12) if you have authentication problems.
623
+ To use this library, import it into your project with Maven or Gradle. Examples of how to do that
624
+ are at the end of this section within the spoilers. Currently, there are two repositories from
625
+ which you can choose : [jitpack.io](https://jitpack.io/#Exlll/ConfigLib) and GitHub (which requires
626
+ authentication, see this [issue](https://github.com/Exlll/ConfigLib/issues/12) if you have any
627
+ problems).
626
628
627
- To use this library, import it into your project with either Maven or Gradle as shown in the two
628
- examples below. This library has additional dependencies (namely, a YAML parser) which are not
629
- exposed by the artifact you import.
630
-
631
- This repository provides plugin versions of this library which bundle all its dependencies, so you
632
- don't have to worry about them. Also, these versions make it easier for you to update this library
633
- if you have written multiple plugins that use it.
629
+ This library has additional dependencies (namely, a YAML parser) which are not exposed by the
630
+ artifact you import. The current repository provides plugin versions of this library which bundle
631
+ all its dependencies, so you don't have to worry about them. Also, these versions make it easier for
632
+ you to update this library if you have written multiple plugins that use it.
634
633
635
634
The plugin versions can be downloaded from
636
635
the [releases page](https://github.com/Exlll/ConfigLib/releases) where you can identify them by
@@ -642,11 +641,52 @@ Waterfall) or to the dependencies array (for Velocity) of your own plugin.
642
641
Alternatively, if you don't want to use an extra plugin, you can shade the `-yaml` version with its
643
642
YAML parser yourself.
644
643
645
- **NOTE:** If you want serialization support for Bukkit classes like `ItemStack`,
646
- replace `configlib-yaml` with `configlib-paper`
647
- (see [here](#support-for-bukkit-classes-like-itemstack)).
644
+ # ## Import examples
645
+
646
+ If you want serialization support for Bukkit classes like `ItemStack`, replace `configlib-yaml`
647
+ with `configlib-paper` (see [here](#support-for-bukkit-classes-like-itemstack)).
648
+
649
+ <details>
650
+ <summary>Import via <code>jitpack.io</code></summary>
651
+
652
+ **Maven**
653
+
654
+ ` ` ` xml
655
+ <repository>
656
+ <id>jitpack.io</id>
657
+ <url>https://jitpack.io</url>
658
+ </repository>
659
+
660
+ <dependency>
661
+ <groupId>com.github.Exlll.ConfigLib</groupId>
662
+ <artifactId>configlib-yaml</artifactId>
663
+ <version>v4.1.0</version>
664
+ </dependency>
665
+ ` ` `
666
+
667
+ **Gradle**
648
668
649
- # ### Maven
669
+ ` ` ` groovy
670
+ repositories { maven { url 'https://jitpack.io' } }
671
+
672
+ dependencies { implementation 'com.github.Exlll.ConfigLib:configlib-yaml:v4.1.0' }
673
+ ` ` `
674
+
675
+ ` ` ` kotlin
676
+ repositories { maven { url = uri("https://jitpack.io") } }
677
+
678
+ dependencies { implementation("com.github.Exlll.ConfigLib:configlib-yaml:v4.1.0") }
679
+ ` ` `
680
+
681
+ </details>
682
+
683
+ <details>
684
+ <summary>Import via GitHub</summary>
685
+
686
+ Importing via GitHub requires authentication. Check
687
+ this [issue](https://github.com/Exlll/ConfigLib/issues/12) if you have any trouble with that.
688
+
689
+ **Maven**
650
690
651
691
` ` ` xml
652
692
<repository>
@@ -661,7 +701,7 @@ replace `configlib-yaml` with `configlib-paper`
661
701
</dependency>
662
702
` ` `
663
703
664
- # ### Gradle
704
+ ** Gradle**
665
705
666
706
` ` ` groovy
667
707
repositories { maven { url 'https://maven.pkg.github.com/Exlll/ConfigLib' } }
@@ -675,6 +715,8 @@ repositories { maven { url = uri("https://maven.pkg.github.com/Exlll/ConfigLib")
675
715
dependencies { implementation("de.exlll:configlib-yaml:4.0.0") }
676
716
` ` `
677
717
718
+ </details>
719
+
678
720
# # Future work
679
721
680
722
This section contains ideas for upcoming features. If you want any of these to happen any time soon,
0 commit comments