Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Releases: DatL4g/Sekret

2.3.0

17 Dec 23:23
9cfbc3e

Choose a tag to compare

Support for Kotlin 2.3.0 and Gradle 9.x.x

2.2.10

23 Aug 01:51
368e133

Choose a tag to compare

Official Kotlin 2.2.10 support. Probably the previous version 2.2.0 works as well with latest Kotlin version, but this has proper support now.

Breaking Changes

If you use application secrets / properties, the jsCommonMain target got renamed to webMain to align more with other Kotlin libraries.

The androidNativeX64 target got a workaround for the 16KB page size Google Play requirement. (All other androidNative targets already support it)

⚠️ I recommend to run the generateSekretBuildScript and cherrypick the changes you need.

YAML Support for Application Secrets (Experimental)

You can now provide a YAML for application secrets with target specific secrets.
It only supports specific target types:

common: # Available in common code
  - name: MyCommonSecret
    value: mySuperSecretKey
    
  - name: OtherCommonSecret
    value: otherSecretKey
    
web: # Available in web targets (js, wasmJs)
  - name: MyWebSecret
    value: myWebSecretKey
    
jni: # Available in jni targets (android, jvm)
  - name: MyJNISecret
    value: myJniSecretKey
    
native: # Available in native targets (iOS, macOS, linux, etc...)
  - name: MyNativeSecret
    value: myNativeSecretKey

You can pick any name you like in each target as long as it aligns with YAML norms.
This feature is still experimental, if you encounter any problems don't hesitate to report them.

Full Changelog: v2.2.0...v2.2.10

2.2.0

05 Jul 03:07
769269e

Choose a tag to compare

Support for Kotlin 2.2.0.

Library version will be more aligned to compatible Kotlin versions from now on.

Full Changelog: v2.1.2...v2.2.0

2.1.2

25 Mar 11:36
cd3431e

Choose a tag to compare

Support for Kotlin 2.1.20 and upcoming versions.

Changes since 2.0.0

NativeLoader improved for Android version 6 (API Level 23) and below.

Full Changelog: v2.0.0...v2.1.2

2.0.0

01 Feb 15:12
3d4f811

Choose a tag to compare

We finally reached a new full release.

Changes since 1.x.x

Skip this if you are already using previous 2.0.0-alpha-09 release.

Gradle Setup

Sekret is now following a minimal setup approch.
This means you have to explicitly enable secret properties:

sekret {
	/** Configuration for generating secrets */
    properties {
        enabled.set(true) // Important if you wan't to keep using generated secret
        packageName.set("your.package.name")
		// other value changes
    }
}

Code changes

Sekret comes with common code now, so it can fully be used multiplatform.

// Make sure to load the binary first on Android / JVM
Sekret.yourKey("...")

Credential leaking

You can apply a Secret annotation to data and value class properties to prevent accidentally leaking the values.

For example you log user info:

data class User(
	val name: String,
	@Secret val password: String
)

val user = User("my-name", "my-password")
println(user.toString())

// can still be called
login(user.name, user.password)

Will result in something like this:

User(name=my-name, password=***)

Supported types

Type Kotlin Java
String
StringBuilder
CharSequence
Appendable
StringBuffer NaN
CharArray

Changes since 2.0.0-alpha-09

Updated to Kotlin 2.1.10 and fixes the mentioned Kotlin bug on Android.

Code changes

If you are using Application Secrets you have to re-generate properties because 2.0.0 has the ability to prevent JNI tracing.

⚠️ Don't forget to update the library in sekret/build.gradle.kts

This ability can be managed like this (read more here):

Sekret.yourKey("...", SekretConfig {
	jni {
		decryptDirectly = false
		fallbackToDirectDecryption = true
	}
})

Google-Services

This new release can parse google-services.json commonly used for Firebase for example.
So you no longer need to extract the values yourself and add them in sekret.properties again.

Full Changelog: v1.0.1...v2.0.0

2.0.0-alpha-09

08 Dec 23:41
e3e37e0

Choose a tag to compare

Fix for gradle configuration cache.

Still has the same Kotlin bug on Android as https://github.com/DatL4g/Sekret/releases/tag/v2.0.0-alpha-08.
Added target logging in case you are not sure which targets are detected/required.

Full Changelog: v2.0.0-alpha-08...v2.0.0-alpha-09

2.0.0-alpha-08

01 Dec 23:06
5743afe

Choose a tag to compare

Support Kotlin 2.1.0.

Seems like the new Kotlin version had some Gradle Plugin changes that where incompatible.

Keep in mind that Kotlin 2.1.0 has a bug that will cause the library to not work on some android devices.
https://youtrack.jetbrains.com/issue/KT-73559/K-Native-AndroidNativeArm64-linking-fails-starting-from-Kotlin-2.1.0

Only use this version if your ./gradlew yourApp:generateSekret does not generate all target directories properly.
Then downgrade to 2.0.0-alpha-07 and Kotlin 2.0.21 for ./gradlew yourApp:createSekretNativeBinary

Full Changelog: v2.0.0-alpha-07...v2.0.0-alpha-08

2.0.0-alpha-07

30 Aug 03:17
bb7d60e

Choose a tag to compare

  • Updated to Kotlin 2.0.20 (fixes #7)
  • Fixes maskNull.set(false) not taking effect in gradle plugin

Full Changelog: v2.0.0-alpha-06...v2.0.0-alpha-07

2.0.0-alpha-06

19 Aug 14:33
062a80f

Choose a tag to compare

This release refactors the gradle tasks to support configuration cache and Gradle 9.x.

What's Changed

  • New createSekretValue task useful for CI/CD setups to modify the properties file
  • Update and split documentation #6
  • Fix Gradle sync failing #4

Full Changelog: v2.0.0-alpha-05...v2.0.0-alpha-06

2.0.0-alpha-05

26 May 16:56
f1f3d30

Choose a tag to compare

This release fixes some compile errors when using K2