kref

An FRP library for Kotlin

License

License

GroupId

GroupId

com.github.nkb03
ArtifactId

ArtifactId

kref
Last Version

Last Version

1.0
Release Date

Release Date

Type

Type

jar
Description

Description

kref
An FRP library for Kotlin
Project URL

Project URL

https://github.com/nkb03/kref
Source Code Management

Source Code Management

https://github.com/nkb03/kref

Download kref

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.nkb03/kref/ -->
<dependency>
    <groupId>com.github.nkb03</groupId>
    <artifactId>kref</artifactId>
    <version>1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.nkb03/kref/
implementation 'com.github.nkb03:kref:1.0'
// https://jarcasting.com/artifacts/com.github.nkb03/kref/
implementation ("com.github.nkb03:kref:1.0")
'com.github.nkb03:kref:jar:1.0'
<dependency org="com.github.nkb03" name="kref" rev="1.0">
  <artifact name="kref" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.nkb03', module='kref', version='1.0')
)
libraryDependencies += "com.github.nkb03" % "kref" % "1.0"
[com.github.nkb03/kref "1.0"]

Dependencies

runtime (1)

Group / Artifact Type Version
org.jetbrains.kotlin : kotlin-stdlib-jdk8 jar 1.3.61

test (4)

Group / Artifact Type Version
org.jetbrains.spek : spek-api jar 1.1.5
com.natpryce : hamkrest jar 1.5.0.0
org.jetbrains.spek : spek-junit-platform-engine jar 1.1.5
org.jetbrains.kotlin : kotlin-reflect jar 1.3.61

Project Modules

There are no modules declared in this project.

KRef - Better support for java.lang.ref in Kotlin

Getting started

Prerequisites

  • You only need to have Kotlin and Java 1.8

Installing

To install KRef you need to follow these steps:

  • Clone the repository: git clone https://github.com/NKB03/KRef <target_dir>
  • Build with gradle: gradle build
  • Publish to maven local to make the library available for other projects: gradle publishToMavenLocal
  • Open in IntelliJ or any other IDE
    If any errors occur while installing please feel free to create an issue or write me an e-mail.

Running tests

To run the tests you IntelliJ and the Kotlin Spek Plugin.
Just the Spec in package org.nikok.kref in the test source root and see the results.
Testing via gradle is not supported.

Contributing

Contributing is very much appreciated. Please feel free to suggest any improvements by creating an issue.
If you have questions about the API or the internals just contact me via e-mail.

Authors

The KRef API

Readonly reference delegates

Strong references

val int by strong(23)

Soft references

val int by soft(34)

Weak references

val i by weak(45)

Read-Write reference delegates

Strong references

var int by mutableStrong(23)

Soft references

var int by mutableSoft(34)

Weak references

var i by mutableWeak(45)

RefWrapper

Reference wrappers simplify changing the kind of reference to an object

Versions

Version
1.0