Utility extensions, properties and useful methods to boost your programming with Kotlin.
Add the following repository to your pom.xml
:
<repositories>
<repository>
<id>central</id>
<url>http://34.210.110.148:8081/artifactory/libs-release</url>
</repository>
</repositories>
Add the following dependency to your pom.xml
:
<dependencies>
<dependency>
<groupId>me.carleslc</groupId>
<artifactId>kotlin-extensions</artifactId>
<version>0.1</version>
</dependency>
</dependencies>
Add the following repository to your build.gradle
:
repositories {
url 'http://34.210.110.148:8081/artifactory/libs-release'
}
Add the following dependency to your build.gradle
:
dependencies {
compile(group: 'me.carleslc', name: 'kotlin-extensions', version: '0.1')
}
git clone https://github.com/Carleslc/kotlin-extensions.git
cd kotlin-extensions
- Build the KotlinExtensions with
mvn clean install
. This also adds this project to your local Maven repository. - Add the
kotlin-extensions-0.1.jar
fromtarget
folder as a dependency of your project.
If you wish you can use these steps to add the dependency using Maven without accessing to the remote repository.
In order to use any of the extensions or methods of KotlinExtensions you only need to import them.
import me.carleslc.kotlin.extensions.number.even
import me.carleslc.kotlin.extensions.number.*
Extensions for Any objects.
Extensions for arrays, a syntactic-sugar way to create literal arrays like A[1, 2, 3]
instead typical arrayOf(1, 2, 3)
and methods to work with 2D arrays and matrices (2D arrays with fixed columns size) easier.
Extensions for collections and other static methods to create collections.
Extensions for lambda functions and other static methods to work with functions (e.g. function composition).
Extensions to generate HTML in a more readable way.
Extensions for maps.
Extensions for numbers and conversions.
Static methods to format time easily.
Extensions for tuples (pairs).
General purpose extensions and static methods that do not match any other package category (e.g. loops with Int.times
).