Skip to content

Commit

Permalink
Merge pull request #1 from kennedykori/release-1.2.0
Browse files Browse the repository at this point in the history
Release 1.2.0
  • Loading branch information
kennedykori authored Jan 23, 2021
2 parents f7b828b + d5db6da commit 66f18c9
Show file tree
Hide file tree
Showing 5 changed files with 1,082 additions and 904 deletions.
27 changes: 24 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,44 @@ of a number, methods for checking and validating if a number is less than or gre
number falls in a given range.

## Get Started
There are different ways you can use the library:-

### Maven
Add the following dependency to your `pom` file.
```xml
<dependency>
<groupId>com.kori_47</groupId>
<artifactId>utils</artifactId>
<version>1.2.0</version>
<type>pom</type>
</dependency>
```

To use the library, make sure you have jcenter in your repositories closure:
### Gradle
Make sure you have jcenter in your repositories closure.

```gradle
repositories {
jcenter()
}
```

Then add the following dependency to your `build.gradle`:
Then add the following dependency to your `build.gradle`.

```gradle
dependencies {
api 'com.kori_47:utils:1.1.0'
api 'com.kori_47:utils:1.2.0'
}
```

### Ivy
```xml
<dependency org='com.kori_47' name='utils' rev='1.2.0'>
<artifact name='utils' ext='pom' ></artifactId>
</dependency>
```

### Building the library
Or alternatively, you can use [gradle](https://gradle.org/) to compile and build the library. Just follow the steps bellow:

* Clone the project from [github](https://github.com/kennedykori/JavaUtils).
Expand Down
61 changes: 30 additions & 31 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ sourceCompatibility = 1.8
targetCompatibility = 1.8

group = 'com.kori_47'
version = '1.1.0'
version = '1.2.0'

repositories {
// Use jcenter for resolving dependencies.
Expand Down Expand Up @@ -78,7 +78,6 @@ def pomConfig = {
email '[email protected]'
}
}

scm {
url 'https://github.com/kennedykori/JavaUtils'
}
Expand All @@ -91,11 +90,11 @@ publishing {
// Attach sources and javadoc Jars to the main maven publication
artifact sourcesJar
artifact javadocJar

groupId 'com.kori_47'
artifactId 'utils'
version '1.1.0'
version '1.2.0'

pom.withXml {
def root = asNode()
root.appendNode('description', 'This library contains a utility class that is composed of static methods that can be used for checking and validation of both objects and primitives.')
Expand All @@ -112,32 +111,32 @@ bintray {
key = System.getenv('BINTRAY_KEY')
publications = ['UtilsPublication']
pkg {
repo = 'kori_47'
name = 'utils'
desc = 'This library contains a utility class that is composed of static methods that can be used for checking and validation of both objects and primitives.'
websiteUrl = 'https://github.com/kennedykori/JavaUtils'
issueTrackerUrl = 'https://github.com/kennedykori/JavaUtils/issues'
vcsUrl = 'https://github.com/kennedykori/JavaUtils.git'
licenses = ['MIT']
labels = ['java', 'utils', 'utility']
publicDownloadNumbers = true
githubRepo = 'kennedykori/JavaUtils'
githubReleaseNotesFile = 'doc-files/release-notes-1.1.0.md'
version {
name = '1.1.0'
desc = 'Utils 1.1.0'
released = new Date()
vcsTag = '1.1.0'
// GPG Signing
gpg {
repo = 'kori_47'
name = 'utils'
desc = 'This library contains a utility class that is composed of static methods that can be used for checking and validation of both objects and primitives.'
websiteUrl = 'https://github.com/kennedykori/JavaUtils'
issueTrackerUrl = 'https://github.com/kennedykori/JavaUtils/issues'
vcsUrl = 'https://github.com/kennedykori/JavaUtils.git'
licenses = ['MIT']
labels = ['java', 'utils', 'utility']
publicDownloadNumbers = true

githubRepo = 'kennedykori/JavaUtils'
githubReleaseNotesFile = 'doc-files/release-notes-1.2.0.md'

version {
name = '1.2.0'
desc = 'Utils 1.2.0'
released = new Date()
vcsTag = '1.2.0'
// GPG Signing
gpg {
sign = true
}
// Maven Central Sync
mavenCentralSync {
sync = true
}
}
}
// Maven Central Sync
mavenCentralSync {
sync = true
}
}
}
}
82 changes: 82 additions & 0 deletions doc-files/release-notes-1.2.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Java Utils v1.2.0

## Introduction

The following notes describe important changes and information about this release.

## Upgrade Instructions

For [gradle](https://gradle.org/) users, switch to version 1.2.0 by updating your `build.gradle`
dependencies to:

```gradle
dependencies {
api 'com.kori_47:utils:1.2.0'
// other dependencies
}
```

For maven users, update your `pom` file to:

```xml
<dependency>
<groupId>com.kori_47</groupId>
<artifactId>utils</artifactId>
<version>1.2.0</version>
<type>pom</type>
</dependency>
```

### Compatibility Notes

This release was tested on Java 8 and is expected to work well on Java 8 and later versions.
It may or may not work on earlier versions of Java.

This version was tested with [junit 5](https://junit.org/junit5/).

## What's New

The following static utility methods were added in these release:

* Methods for checking if a number is equal to a given base value.
* Methods for validating if a number is equal to a given base value.

The utility methods above can be divided into _checkers_ and _validators_.

### Checkers

These are methods that take a value and check if it meets a given condition and if so,
returns `true`, else, returns `false`. These methods are:

1. *__isEqualTo__*

This are methods that check if a number is equal to a given baseValue. These methods
have the following form:

```java
public final static boolean isEqualTo(<type> baseValue, <type> value){ /* method body */ };
```

There are five variants of the method above, where `<type>` can be one of the following: `int`,
`long`, `float`, `double` or `java.math.BigDecimal`.

### Validators

These are methods that take a value and validate if it meets a given condition and if so,
returns the value, else, throws a `java.lang.IllegalArgumentException`. These methods are:

1. *__requireEqualTo__*

This are methods that validate if a number is equal to a given baseValue. These methods
have the following form:

```java
public final static <type> requireEqualTo(<type> baseValue, <type> value){ /* method body */ };
```

There are five variants of the method above, where `<type>` can be one of the following: `int`,
`long`, `float`, `double` or `java.math.BigDecimal`.

## Reporting Problems

If you find a problem with this release, please file a bug on [GitHub Issues](https://github.com/kennedykori/JavaUtils/issues).
Loading

0 comments on commit 66f18c9

Please sign in to comment.