...
 
Commits (8)
......@@ -7,8 +7,14 @@ and this project adheres to [Semantic Versioning](semver.md).
## Unreleased
### Added
- `string` extension for Random
- Directory as Directory2 alias
### Changed
### Deprecated
- Queue (`klib.queue.Queue`)
- Function (`klib.queue.Function`)
- Function -> Any (`klib.queue.Function_Any``)
- Word (`klib.word.Word`)
### Removed
### Fixed
### Security
......
......@@ -45,12 +45,12 @@ Table created from APIs removed/changed.
| 4.1.0 | Renamed Queue.enqueue parameter `x` to `func` | Parameter names that make sense |
| 5.0.0 | Removed kSock (`klib.net.socket.kSock`) API | Was replaced with KSocket (`klib.net.socket.KSocket`) |
| 5.0.0 | Removal of Directory (`klib.files.Directory`) API | Was replaced with Directory2 (`klib.files.Directory2`) |
| 5.1.0 | Alias Directory2 (`klib.files.Directory2`) as Directory (`klib.files.Directory`) | The new Directory2 API will be renamed as the original Directory API was removed. This is considered a Breaking change as pre-5.0 applications would not compile when moving to 5.1.0
## Upcoming Breaking Changes
| Planed Since | Expecting Change in | Change | Reason |
|--------------|---------------------|--------|--------|
| 5.0.0 | 5.1.0 | Copy Directory2 (`klib.files.Directory2`) to Directory (`klib.files.Directory`) | - |
| 5.1.0 | 6.0.0 | Removal of Directory2 (`klib.files.Directory2`) | Now named Directory (`klib.files.Directory`) |
## Experimental APIs
......
......@@ -3,7 +3,6 @@
| Branch | Status |
|--------|--------|
| master | [![pipeline status](https://gitlab.atvg-studios.com/atvg-studios/kLib/badges/master/pipeline.svg)](https://gitlab.atvg-studios.at/atvg-studios/kLib/commits/master) |
| release/4.0.x | [![pipeline status](https://gitlab.atvg-studios.com/atvg-studios/kLib/badges/release/4.0.x/pipeline.svg)](https://gitlab.atvg-studios.at/atvg-studios/kLib/commits/release/4.0.x) |
| release/4.1.x | [![pipeline status](https://gitlab.atvg-studios.com/atvg-studios/kLib/badges/release/4.0.x/pipeline.svg)](https://gitlab.atvg-studios.at/atvg-studios/kLib/commits/release/4.1.x) |
| release/5.0.x | [![pipeline status](https://gitlab.atvg-studios.com/atvg-studios/kLib/badges/release/4.0.x/pipeline.svg)](https://gitlab.atvg-studios.at/atvg-studios/kLib/commits/release/5.0.x) |
......@@ -100,6 +99,21 @@ All listed versions are considered Legacy and are no longer developed or support
| 1.x.x | 1.4.0 |
| 2.x.x | 2.1.1 |
| 3.x.x | 3.2.0 |
| 4.0.x | 4.0.0 |
# Policy for Feature removal
As removing Features is a Major breaking change, and might cause User unhappyness, we have though about how to deal with them.
Features planed for removal must go through this process:
* Issue opened, informing about why the removal makes sense.
* Marking the Feature as deprecated in a Minor release.
* Waiting for 12 Months, awaiting User feedback about the planned removal.
* Removing the feature in the next Major release, if no user feedback on keeping the feature was received.
* Removal of the Deprecated Status if user feedback requests to keep the feature
Following this process allowes users of Features that are planed to be removed to respond, and prevent the removal.
# License
......
......@@ -6,10 +6,13 @@
| ------- | ------------------ |
| 5.0.x | :white_check_mark: |
| 4.1.x | :white_check_mark: |
| 4.0.x | :white_check_mark: |
| 3.2.x | :x: |
| 3.1.x | :x: |
| 3.0.x | :x: |
| 4.0.x | :x: |
| 3.x.y | :x: |
| 2.x.y | :x: |
| 1.x.y | :x: |
| 0.x.y | :x: |
**Note:** a.x.y means that all versions of major a are included. Example: with a as 0: 0.1.0 to 0.1.6 and 0.2.0 to 0.2.2
## Reporting a Vulnerability
......
......@@ -35,6 +35,10 @@ compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
wrapper {
distributionUrl = "https://services.gradle.org/distributions/gradle-${gradle_version}-all.zip"
}
jar {
manifest {
attributes 'Specification-Title': "kLib"
......
......@@ -4,6 +4,7 @@ kotlin.code.style=official
klib_version=5.0.0
# Versions
gradle_version=6.4
kotlin_version=1.3.71
shadow_version=5.2.0
dokka_version=0.10.1
......
#Wed Jul 15 20:17:39 CEST 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
package klib.extensions
import klib.encoding.base.Base58e
import kotlin.random.Random
/**
* Generate a random string with only Base58 characters
*
* @since 5.1.0
* @author Thomas Obernosterer
*/
fun Random.string(length: Int): String {
return Base58e.encode(this.nextBytes(length)).substring(0 until length)
}
\ No newline at end of file
package klib.files
import klib.annotations.Experimental
/**
* Generate a random string with only Base58 characters
*
* @since 5.1.0 (Experimental)
* @author Thomas Obernosterer
*/
@OptIn(Experimental::class)
typealias Directory = Directory2
\ No newline at end of file
......@@ -4,14 +4,18 @@ package klib.queue
* Type alias for () -> Unit
*
* @since 0.1.5
* @since 5.1.0 (Deprecated)
* @author Nils Rider
*/
@Deprecated(message = "Deprecated as part of Queue; Check Queue Class for more information")
typealias Function = () -> Unit
/**
* Type alias for () -> Any?
*
* @since 0.1.6
* @since 5.1.0 (Deprecated)
* @author Thomas Obernosterer
*/
@Deprecated(message = "Deprecated as part of Queue; Check Queue Class for more information")
typealias Function_Any = () -> Any?
......@@ -10,8 +10,13 @@ import java.util.TimerTask
*
* @since 0.1.5 (Experimental)
* @since 0.2.1
* @since 5.1.0 (Deprecated)
* @author Nils Rider
*/
@Deprecated(message = "Due to no recent use cases for this Class it has been marked as deprecated." +
"It will be removed with release 6.0.0 (Probably early 2021)" +
"If you wish to have us keep it, please respond to https://beeit.org/klib-i32",
level = DeprecationLevel.WARNING)
class Queue {
private var queueList: MutableList<Function> = ArrayList()
......
......@@ -11,8 +11,13 @@ import kotlin.experimental.xor
* @param w3
*
* @since 0.1.0
* @since 5.1.0 (Deprecated)
* @author Thomas Obernosterer
*/
@Deprecated(message = "Due to no recent use cases for this Class it has been marked as deprecated." +
"It will be removed with release 6.0.0 (Probably early 2021)" +
"If you wish to have us keep it, please respond to https://beeit.org/klib-i33",
level = DeprecationLevel.WARNING)
data class Word(val w0: Byte, val w1: Byte, val w2: Byte, val w3: Byte) {
companion object {
/**
......