Skip to content

Commit

Permalink
Fixing errors of PR 23 (#25)
Browse files Browse the repository at this point in the history
* update .gitignore with gradle template

* update to kotlin 1.6.21, bignum 0.3.4 and gradle 7.4.2

* use new memory model

* add native targets

requires pr: komputing/KHex#14

* Update KHex version
Fix broken gradle.properties import
Fix broken KHex import in build-src

* Bump KHex version to 1.1.4
Bump KGP version to 1.8.21
Remove deprecated native targets
Remove previously accidentally added line of code in build.gradle.kts
Use macos as run target for all automations

* Double workflow timout

* Bump KHex version to expected version 1.1.5

* According to @Deprecation Annotation for legacy and IR compiler support (BOTH), switching to IR only

Probably safe, because the user base for legacy is very limited

Remove deprecated code, that shouldn't be necessary anymore due to the removal in the official JetBrains documentation

* Update README.md

* Remove --info attribute for less verbose CI outputs

* Double workflow timeouts

---------

Co-authored-by: Luca Spinazzola <[email protected]>
Co-authored-by: David Bieregger <[email protected]>
  • Loading branch information
3 people authored May 18, 2023
1 parent 26f9a6f commit 6bf7939
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 32 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ on:

jobs:
build:
timeout-minutes: 15
runs-on: ubuntu-latest
timeout-minutes: 60
runs-on: macos-latest

steps:
- name: Checkout the repo
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
run: chmod +x gradlew

- name: Build project and run tests with Gradle
run: ./gradlew clean build --info
run: ./gradlew clean build

- name: Bundle the failed build report
if: failure()
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ on:

jobs:
build:
timeout-minutes: 15
runs-on: ubuntu-latest
timeout-minutes: 60
runs-on: macos-latest

steps:
- name: Checkout the repo
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
run: chmod +x gradlew

- name: Build project and run tests
run: ./gradlew clean build --info
run: ./gradlew clean build

- name: Bundle the failed build report
if: failure()
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ on:

jobs:
build:
timeout-minutes: 15
runs-on: ubuntu-latest
timeout-minutes: 60
runs-on: macos-latest

steps:
- name: Checkout the repo
Expand Down Expand Up @@ -42,7 +42,7 @@ jobs:
run: chmod +x gradlew

- name: Build project and run tests with Gradle
run: ./gradlew clean build --info
run: ./gradlew clean build

- name: Bundle the failed build report
if: failure()
Expand Down
41 changes: 21 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

KHash is a Kotlin multiplatform library implementing common hashing functions.

A part from that, it also provides some useful [extensions functions](https://kotlinlang.org/docs/reference/extensions.html).
Apart from that, it also provides some useful [extensions functions](https://kotlinlang.org/docs/reference/extensions.html).

The implemented hashing functions are the following.
* [RIPEMD160](https://en.wikipedia.org/wiki/RIPEMD)
Expand All @@ -19,8 +19,13 @@ The implemented hashing functions are the following.

This library is available through GitHub Packages.

![badge][badge-js]
![badge][badge-android]
![badge][badge-ios]
![badge][badge-js-ir]
![badge][badge-jvm]
![badge][badge-linux]
![badge][badge-mac]
![badge][badge-apple-silicon]

In order to use it, first include the GitHub Packages maven repository inside your project `build.gradle.kts` file:

Expand All @@ -36,22 +41,6 @@ repositories {
}
}
```
When 'username' could be anything and 'password' is an [encoded access token for public access](https://github.community/t/download-from-github-package-registry-without-authentication/14407/44).

### JitPack (JVM only!)

This library is available on Jitpack. The current version is:

[![](https://jitpack.io/v/komputing/khash.svg)](https://jitpack.io/#komputing/khash)
![badge][badge-jvm]

In order to use it, first include the Jitpack maven repository inside your project `build.gradle.kts` file:

```kotlin
repositories {
maven { url="https://jitpack.io" }
}
```

## Set it up

Expand Down Expand Up @@ -144,5 +133,17 @@ Also this code is not hardened against side channel attacks. Keep this in mind w
# License
MIT

[badge-js]: http://img.shields.io/badge/platform-js-yellow.svg?style=flat
[badge-jvm]: http://img.shields.io/badge/platform-jvm-orange.svg?style=flat
[badge-android]: http://img.shields.io/badge/-android-6EDB8D.svg?style=flat
[badge-android-native]: http://img.shields.io/badge/support-[AndroidNative]-6EDB8D.svg?style=flat
[badge-jvm]: http://img.shields.io/badge/-jvm-DB413D.svg?style=flat
[badge-js]: http://img.shields.io/badge/-js-F8DB5D.svg?style=flat
[badge-js-ir]: http://img.shields.io/badge/-js--IR-F8DB5D.svg?style=flat
[badge-nodejs]: https://img.shields.io/badge/-nodejs-68a063.svg?style=flat
[badge-linux]: http://img.shields.io/badge/-linux-2D3F6C.svg?style=flat
[badge-windows]: http://img.shields.io/badge/-windows-4D76CD.svg?style=flat
[badge-wasm]: https://img.shields.io/badge/-wasm-624FE8.svg?style=flat
[badge-apple-silicon]: http://img.shields.io/badge/support-[AppleSilicon]-43BBFF.svg?style=flat
[badge-ios]: http://img.shields.io/badge/-ios-CDCDCD.svg?style=flat
[badge-mac]: http://img.shields.io/badge/-macos-111111.svg?style=flat
[badge-watchos]: http://img.shields.io/badge/-watchos-C0C0C0.svg?style=flat
[badge-tvos]: http://img.shields.io/badge/-tvos-808080.svg?style=flat
14 changes: 12 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import java.io.File
import java.util.*

plugins {
idea
`kotlin-dsl`
`kotlin-dsl-precompiled-script-plugins`
}

val rootProperties = Properties().apply {
load(File(projectDir, "../gradle.properties").inputStream())
}

repositories {
gradlePluginPortal()
}
Expand All @@ -16,6 +23,9 @@ idea {
}

dependencies {
implementation(kotlin("gradle-plugin", "${property("kgp")}"))
implementation("com.github.ben-manes", "gradle-versions-plugin", "${property("plugin.com.github.ben-manes.versions")}")
implementation(kotlin("gradle-plugin", rootProperties.getProperty("kgp")))
implementation(
"com.github.ben-manes", "gradle-versions-plugin",
rootProperties.getProperty("plugin.com.github.ben-manes.versions")
)
}
1 change: 0 additions & 1 deletion buildSrc/gradle.properties

This file was deleted.

4 changes: 4 additions & 0 deletions buildSrc/src/main/kotlin/mpp-module.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("UNUSED_VARIABLE")

import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
Expand All @@ -8,6 +10,7 @@ plugins {
id("maven-publish")
}


val darwinTargets = arrayOf(
"macosX64", "macosArm64",
"iosArm64", "iosX64", "iosSimulatorArm64",
Expand All @@ -18,6 +21,7 @@ val linuxTargets = arrayOf("linuxX64", "linuxArm64")
val mingwTargets = arrayOf("mingwX64")
val nativeTargets = linuxTargets + darwinTargets + mingwTargets


kotlin {
explicitApi()
targets {
Expand Down

0 comments on commit 6bf7939

Please sign in to comment.