Skip to content

Commit

Permalink
Add readme for bom
Browse files Browse the repository at this point in the history
  • Loading branch information
serpro69 committed Mar 29, 2024
1 parent 007e4dd commit 8d52eb8
Show file tree
Hide file tree
Showing 4 changed files with 139 additions and 0 deletions.
66 changes: 66 additions & 0 deletions bom/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
## `kotlin-faker-bom`

[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-bom?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-bom)
[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-bom?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading)

Kotlin-faker provides a [Bill-of-Materials](https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#bill-of-materials-bom-poms) that simplifies dependency management.

## Usage

Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/).

### Downloading

Latest releases are always available on maven central.

**With gradle**

To [import Maven BOM with Gradle](https://docs.gradle.org/current/userguide/platforms.html#sub:bom_import), a platform dependency needs to be declared on the `kotlin-faker-bom`. The rest of `kotlin-faker` dependencies do not need to specify the versions explicitly as they will be pulled from the BOM

```groovy
dependencies {
implementation platform('io.github.serpro69:kotlin-faker-bom:$version')
implementation 'io.github.serpro69:kotlin-faker'
implementation 'io.github.serpro69:kotlin-faker-books'
implementation 'io.github.serpro69:kotlin-faker-tech'
// rest of dependencies
}
```

**With maven**

To use the BOM, a dependency on `kotlin-faker-bom` needs to be declared in the `<dependencyManagement>` block of the `pom.xml`, file:

```xml
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.github.serpro69</groupId>
<artifactId>kotlin-faker-bom</artifactId>
<version>${kotlin-faker.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
```

Then add the dependencies as usual but w/o specifying the versions, which will be pulled from the BOM:

```xml
<dependencies>
<dependency>
<groupId>io.github.serpro69</groupId>
<artifactId>kotlin-faker</artifactId>
</dependency>
<dependency>
<groupId>io.github.serpro69</groupId>
<artifactId>kotlin-faker-books</artifactId>
</dependency>
<dependency>
<groupId>io.github.serpro69</groupId>
<artifactId>kotlin-faker-tech</artifactId>
</dependency>
<!-- rest of dependencies as needed -->
</dependencies>
```
67 changes: 67 additions & 0 deletions docs/src/orchid/resources/wiki/faker-bom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
---
---

# Kotlin-faker BOM

[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-bom?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-bom)
[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-bom?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading)

Kotlin-faker provides a [Bill-of-Materials](https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#bill-of-materials-bom-poms) that simplifies dependency management.

## Usage

### Downloading

Latest releases are always available on maven central.

**With gradle**

To [import Maven BOM with Gradle](https://docs.gradle.org/current/userguide/platforms.html#sub:bom_import), a platform dependency needs to be declared on the `kotlin-faker-bom`. The rest of `kotlin-faker` dependencies do not need to specify the versions explicitly as they will be pulled from the BOM

```groovy
dependencies {
implementation platform('io.github.serpro69:kotlin-faker-bom:$version')
implementation 'io.github.serpro69:kotlin-faker'
implementation 'io.github.serpro69:kotlin-faker-books'
implementation 'io.github.serpro69:kotlin-faker-tech'
// rest of dependencies
}
```

**With maven**

To use the BOM, a dependency on `kotlin-faker-bom` needs to be declared in the `<dependencyManagement>` block of the `pom.xml`, file:

```xml
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.github.serpro69</groupId>
<artifactId>kotlin-faker-bom</artifactId>
<version>${kotlin-faker.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
```

Then add the dependencies as usual but w/o specifying the versions, which will be pulled from the BOM:

```xml
<dependencies>
<dependency>
<groupId>io.github.serpro69</groupId>
<artifactId>kotlin-faker</artifactId>
</dependency>
<dependency>
<groupId>io.github.serpro69</groupId>
<artifactId>kotlin-faker-books</artifactId>
</dependency>
<dependency>
<groupId>io.github.serpro69</groupId>
<artifactId>kotlin-faker-tech</artifactId>
</dependency>
<!-- rest of dependencies as needed -->
</dependencies>
```
5 changes: 5 additions & 0 deletions docs/src/orchid/resources/wiki/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* [Installing](#installing)
* [Releases](#releases)
* [Snapshots](#snapshots)
* [Faker BOM](#faker-bom)
* [Generating Data](#generating-data)

## Installing
Expand All @@ -26,6 +27,10 @@ Snapshot are automatically published on each commit to master. If you want to tr

{% include 'includes/wiki/repositoriesTabs.peb' %}

### Faker BOM

See {{ anchor(title='Kotlin-faker BOM', collectionType='wiki', collectionId='', itemId='Kotlin-faker BOM') }} page for details on how to use a Bill-of-Materials to simplify dependency management.

{% btc %}{% endbtc %}

<br>
Expand Down
1 change: 1 addition & 0 deletions docs/src/orchid/resources/wiki/summary.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

* [Getting Started](getting-started.md)
* [Kotlin-faker BOM](faker-bom.md)
* [Faker Configuration](faker-configuration.md)
* [Generator of Unique Values](unique-generator.md)
* [Extras](extras.md)
Expand Down

0 comments on commit 8d52eb8

Please sign in to comment.