Skip to content

Releases: DatL4g/Sekret

2.0.0-alpha-09

08 Dec 23:41
e3e37e0
Compare
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
Compare
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
Compare
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
Compare
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
Compare
Choose a tag to compare

This release fixes some compile errors when using K2

2.0.0-alpha-04

14 Apr 15:06
3e87e73
Compare
Choose a tag to compare

This is a work in progress release as new features are added/planned.
Fixes some compile exceptions.

Take a look at the https://github.com/DatL4g/Sekret/releases/tag/v2.0.0-alpha-01 release first.

Common code

This release comes with a Sekret class that can be called from common code.

// Nullable as Desktop-JVM and Android may return null
// Native targets will never return null
// JS targets will never return null
val secretValue: String? = Sekret.getValue(key)

Plugin Configuration

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

		nativeCopy {
			desktopComposeResourcesFolder // set the location for desktop targets where the native binary should be placed
			androidJNIFolder // set the location for android where the native binary should be placed
		}
    }
}

Tasks

This release comes with new tasks to support minimal configuration.

  • copySekretNativeBinary Only copies the native binaries (Desktop-JVM and Android) to the specified directories
  • createSekretNativeBinary Compile secrets to native binaries
  • createAndCopySekretNativeBinary Combination of createSekretNativeBinary and copySekretNativeBinary
  • generateSekretBuildScript Generates a build script by checking your dependant target
  • generateSekret Generates secrets provided in properties

2.0.0-alpha-01

23 Jan 15:39
4115a34
Compare
Choose a tag to compare
2.0.0-alpha-01 Pre-release
Pre-release

This is a work in progress release as new features are added/planned.

Plugin Configuration

The sekret gradle plugin configuration changed to support minimal setup.

sekret {
	/** New obfuscation configuration */
    obfuscation {
        secretMask.set("###")
        secretMaskNull.set(true)
    }

	/** 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
    }
}

Obfuscation

Planned multiplatform compatible equivalent: https://github.com/LSPosed/LSParanoid

Added multiplatform compatible equivalent: https://github.com/aafanasev/sekret

To use these features add the annotations dependecy to your build.gradle.kts:

dependencies {
	implementation("dev.datlag.sekret:annotations:<version>") // can be added to commonMain
}

Secret

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

1.0.1

21 Jan 14:39
0d2f6ed
Compare
Choose a tag to compare

Added missing WASM targets.

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

1.0.0

20 Jan 14:07
fa0b8fa
Compare
Choose a tag to compare

This is the first full working release working on all possible targets.

The project changed a lot since 0.4.0 and I recommend you to follow the README again to configure it correctly.