diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index c6980c6..fe3f661 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -lib = "1.1.1-SNAPSHOT" +lib = "2.0.0-alpha-01" android = "8.1.2" auto-service = "1.1.1" kotlin = "1.9.22" diff --git a/sample/src/main/kotlin/KSPTest.kt b/sample/src/main/kotlin/KSPTest.kt deleted file mode 100644 index e274fce..0000000 --- a/sample/src/main/kotlin/KSPTest.kt +++ /dev/null @@ -1,21 +0,0 @@ -import dev.datlag.sekret.Obfuscate -import dev.datlag.sekret.Secret - -@Obfuscate -data class KSPTest( - @Secret val data: java.lang.String, - @Secret val secret: String, - val testing: Int = 1337, - val subClass: Sub = Sub("sub-data"), - @Secret val charSeq: CharSequence = "abcdefg", - @Secret val javaCharSeq: java.lang.CharSequence = secret as java.lang.CharSequence, - @Secret val builder: StringBuilder = StringBuilder("string-builder"), - @Secret val appendable: Appendable = builder, - @Secret val buffer: StringBuffer = StringBuffer("string-buffer") -) { - val other: String = "test" -} - -data class Sub( - val subData: String -) \ No newline at end of file diff --git a/sample/src/main/kotlin/Main.kt b/sample/src/main/kotlin/Main.kt index 790fae1..b6bce38 100644 --- a/sample/src/main/kotlin/Main.kt +++ b/sample/src/main/kotlin/Main.kt @@ -15,8 +15,8 @@ fun main() { val secretValue = Sekret.testKey("password12345") println("Decoded secret: $secretValue") } - val testing = KSPTest(java.lang.String("java-string"), "my-secret") + val testing = SecretTest("kotlin-string", java.lang.String("java-string")) println(testing.toString()) - println(testing.secret) - println(testing.charSeq) + println(testing.kString) + println(testing.jString) } \ No newline at end of file diff --git a/sample/src/main/kotlin/SecretTest.kt b/sample/src/main/kotlin/SecretTest.kt new file mode 100644 index 0000000..f715ceb --- /dev/null +++ b/sample/src/main/kotlin/SecretTest.kt @@ -0,0 +1,15 @@ +import dev.datlag.sekret.Obfuscate +import dev.datlag.sekret.Secret + +@Obfuscate +data class SecretTest( + @Secret val kString: String, + @Secret val jString: java.lang.String, + @Secret val kCharSequence: CharSequence = "kotlin-char-sequence", + @Secret val jCharSequence: java.lang.CharSequence = "java-char-sequence" as java.lang.CharSequence, + @Secret val kBuilder: StringBuilder = StringBuilder("kotlin-string-builder"), + @Secret val jBuilder: java.lang.StringBuilder = StringBuilder("java-string-builder") as java.lang.StringBuilder, + @Secret val kAppendable: Appendable = kBuilder, + @Secret val jAppendable: java.lang.Appendable = jBuilder, + @Secret val buffer: StringBuffer = StringBuffer("java-string-buffer") +) \ No newline at end of file diff --git a/sekret-gradle-plugin/src/main/java/dev/datlag/sekret/gradle/SekretPlugin.kt b/sekret-gradle-plugin/src/main/java/dev/datlag/sekret/gradle/SekretPlugin.kt index 8b92e91..b4887d8 100644 --- a/sekret-gradle-plugin/src/main/java/dev/datlag/sekret/gradle/SekretPlugin.kt +++ b/sekret-gradle-plugin/src/main/java/dev/datlag/sekret/gradle/SekretPlugin.kt @@ -62,7 +62,7 @@ open class SekretPlugin : Plugin { } companion object { - private const val VERSION = "1.1.1-SNAPSHOT" + private const val VERSION = "2.0.0-alpha-01" internal fun getVersion(): String { return runCatching {