Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ plugins {
}

android {
namespace = "dev.sdkforge.template.android"
namespace = "dev.sdkforge.jwt.decode.android"
compileSdk = 36
defaultConfig {
applicationId = "dev.sdkforge.template.android"
minSdk = 21
applicationId = "dev.sdkforge.jwt.decode.android"
minSdk = 23
targetSdk = 36
versionCode = 1
versionName = "1.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package dev.sdkforge.template.android
package dev.sdkforge.jwt.decode.android

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.ui.Modifier
import dev.sdkforge.template.app.App
import dev.sdkforge.jwt.decode.app.App

class MainActivity : ComponentActivity() {
override fun onCreate(
Expand Down
2 changes: 1 addition & 1 deletion app-shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ kotlin {
}

android {
namespace = "dev.sdkforge.template.app"
namespace = "dev.sdkforge.jwt.decode.app"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.sdkforge.template.app
package dev.sdkforge.jwt.decode.app

import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
Expand All @@ -9,7 +9,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import dev.sdkforge.template.core.currentPlatform
import dev.sdkforge.jwt.decode.core.currentPlatform

@Composable
fun App(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.sdkforge.template.app
package dev.sdkforge.jwt.decode.app

import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.shape.RoundedCornerShape
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.sdkforge.template.app
package dev.sdkforge.jwt.decode.app

import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.ui.Modifier
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ android.nonTransitiveRClass=true
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
#Publishing
publishing.group=dev.sdkforge.template
publishing.group=dev.sdkforge.jwt.decode
publishing.version=0.0.1
publishing.owner=SDKForge
publishing.repository=template-sdk
publishing.description=A modern Kotlin Multiplatform SDK template for building cross-platform libraries and applications.
publishing.repository=JWTDecode
publishing.description=A Kotlin Multiplatform library for decoding JSON Web Tokens (JWT) across platforms.
5 changes: 5 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ androidx-activityCompose = "1.11.0"
binary-compatibility-validator = "0.18.1"
dokka = "2.0.0"
dependency-guard = "0.5.0"
kotlinxDatetime = "0.7.1"
kotlinxSerializationJson = "1.9.0"
kover = "0.9.2"
versions = "0.52.0"
benchmark = "1.4.1"
Expand All @@ -28,6 +30,8 @@ compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref =
compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose" }
compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "compose" }
compose-material3 = { module = "androidx.compose.material3:material3", version.ref = "compose-material3" }
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinxDatetime" }
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" }
androidx-runner = { group = "androidx.test", name = "runner", version.ref = "runner" }
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junit" }
junit = { group = "junit", name = "junit", version.ref = "junitVersion" }
Expand All @@ -38,6 +42,7 @@ androidApplication = { id = "com.android.application", version.ref = "agp" }
androidLibrary = { id = "com.android.library", version.ref = "agp" }
kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlinSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
compose-multiplatform = { id = "org.jetbrains.compose", version.ref = "composeMultiplatform" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
binaryCompatibilityValidator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "binary-compatibility-validator" }
Expand Down
4 changes: 3 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,14 @@ dependencyResolutionManagement {
}
}

rootProject.name = "SDKForgeTemplate"
rootProject.name = "SDKForge-JWTDecode"

include(":app-android")
include(":app-shared")
include(":shared")
include(":shared-core")
include(":shared-domain")
include(":shared-data")

include(":internal-ktlint")
// uncomment if it's needed for development
Expand Down
6 changes: 3 additions & 3 deletions shared-core/api/shared-core.api
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
public abstract interface class dev/sdkforge/template/core/Platform {
public abstract interface class dev/sdkforge/jwt/decode/core/Platform {
public abstract fun getName ()Ljava/lang/String;
public abstract fun getVersion ()Ljava/lang/String;
}

public final class dev/sdkforge/template/core/Platform_androidKt {
public static final fun getCurrentPlatform ()Ldev/sdkforge/template/core/Platform;
public final class dev/sdkforge/jwt/decode/core/Platform_androidKt {
public static final fun getCurrentPlatform ()Ldev/sdkforge/jwt/decode/core/Platform;
}

2 changes: 1 addition & 1 deletion shared-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ kotlin {
}

android {
namespace = "dev.sdkforge.template.core"
namespace = "dev.sdkforge.jwt.decode.core"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.sdkforge.template.core
package dev.sdkforge.jwt.decode.core

/**
* Android platform implementation.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@file:Suppress("ktlint:standard:filename")

package dev.sdkforge.template.core
package dev.sdkforge.jwt.decode.core

import org.junit.Assert.assertTrue
import org.junit.Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.sdkforge.template.core
package dev.sdkforge.jwt.decode.core

/**
* Platform information interface.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@file:Suppress("ktlint:standard:filename")

package dev.sdkforge.template.core
package dev.sdkforge.jwt.decode.core

import kotlin.test.Test
import kotlin.test.assertTrue
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.sdkforge.template.core
package dev.sdkforge.jwt.decode.core

import platform.UIKit.UIDevice

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@file:Suppress("ktlint:standard:filename")

package dev.sdkforge.template.core
package dev.sdkforge.jwt.decode.core

import kotlin.test.Test
import kotlin.test.assertTrue
Expand Down
53 changes: 53 additions & 0 deletions shared-data/api/shared-data.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
public final class dev/sdkforge/jwt/decode/data/JWT {
public static final field INSTANCE Ldev/sdkforge/jwt/decode/data/JWT;
public final fun decode (Ljava/lang/String;Ldev/sdkforge/jwt/decode/domain/JWTParser;)Ldev/sdkforge/jwt/decode/domain/DecodedJWT;
public static synthetic fun decode$default (Ldev/sdkforge/jwt/decode/data/JWT;Ljava/lang/String;Ldev/sdkforge/jwt/decode/domain/JWTParser;ILjava/lang/Object;)Ldev/sdkforge/jwt/decode/domain/DecodedJWT;
public fun equals (Ljava/lang/Object;)Z
public fun hashCode ()I
public final fun require (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;)Ldev/sdkforge/jwt/decode/domain/Verification;
public fun toString ()Ljava/lang/String;
}

public final class dev/sdkforge/jwt/decode/data/algorithm/AlgorithmKt {
public static final fun ECDSA256 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ldev/sdkforge/crypto/domain/ec/ECKey;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun ECDSA256 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ldev/sdkforge/crypto/domain/ec/ECPublicKey;Ldev/sdkforge/crypto/domain/ec/ECPrivateKey;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun ECDSA256 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ldev/sdkforge/jwt/decode/domain/provider/ECDSAKeyProvider;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun ECDSA384 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ldev/sdkforge/crypto/domain/ec/ECKey;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun ECDSA384 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ldev/sdkforge/crypto/domain/ec/ECPublicKey;Ldev/sdkforge/crypto/domain/ec/ECPrivateKey;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun ECDSA384 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ldev/sdkforge/jwt/decode/domain/provider/ECDSAKeyProvider;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun ECDSA512 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ldev/sdkforge/crypto/domain/ec/ECKey;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun ECDSA512 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ldev/sdkforge/crypto/domain/ec/ECPublicKey;Ldev/sdkforge/crypto/domain/ec/ECPrivateKey;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun ECDSA512 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ldev/sdkforge/jwt/decode/domain/provider/ECDSAKeyProvider;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun HMAC256 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ljava/lang/String;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun HMAC256 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;[B)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun HMAC384 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ljava/lang/String;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun HMAC384 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;[B)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun HMAC512 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ljava/lang/String;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun HMAC512 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;[B)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun RSA256 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ldev/sdkforge/crypto/domain/rsa/RSAKey;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun RSA256 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ldev/sdkforge/crypto/domain/rsa/RSAPublicKey;Ldev/sdkforge/crypto/domain/rsa/RSAPrivateKey;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun RSA256 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ldev/sdkforge/jwt/decode/domain/provider/RSAKeyProvider;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun RSA384 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ldev/sdkforge/crypto/domain/rsa/RSAKey;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun RSA384 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ldev/sdkforge/crypto/domain/rsa/RSAPublicKey;Ldev/sdkforge/crypto/domain/rsa/RSAPrivateKey;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun RSA384 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ldev/sdkforge/jwt/decode/domain/provider/RSAKeyProvider;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun RSA512 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ldev/sdkforge/crypto/domain/rsa/RSAKey;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun RSA512 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ldev/sdkforge/crypto/domain/rsa/RSAPublicKey;Ldev/sdkforge/crypto/domain/rsa/RSAPrivateKey;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun RSA512 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ldev/sdkforge/jwt/decode/domain/provider/RSAKeyProvider;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun getNONE (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
}

public final class dev/sdkforge/jwt/decode/data/algorithm/Algorithm_androidKt {
public static final fun ECDSA256 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ljava/security/interfaces/ECKey;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun ECDSA256 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ljava/security/interfaces/ECPublicKey;Ljava/security/interfaces/ECPrivateKey;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun ECDSA384 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ljava/security/interfaces/ECKey;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun ECDSA384 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ljava/security/interfaces/ECPublicKey;Ljava/security/interfaces/ECPrivateKey;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun ECDSA512 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ljava/security/interfaces/ECKey;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun ECDSA512 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ljava/security/interfaces/ECPublicKey;Ljava/security/interfaces/ECPrivateKey;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun RSA256 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ljava/security/interfaces/RSAKey;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun RSA256 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ljava/security/interfaces/RSAPublicKey;Ljava/security/interfaces/RSAPrivateKey;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun RSA384 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ljava/security/interfaces/RSAKey;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun RSA384 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ljava/security/interfaces/RSAPublicKey;Ljava/security/interfaces/RSAPrivateKey;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun RSA512 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ljava/security/interfaces/RSAKey;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
public static final fun RSA512 (Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm$Companion;Ljava/security/interfaces/RSAPublicKey;Ljava/security/interfaces/RSAPrivateKey;)Ldev/sdkforge/jwt/decode/domain/algorithm/Algorithm;
}

45 changes: 45 additions & 0 deletions shared-data/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidLibrary)
alias(libs.plugins.kotlinSerialization)
alias(libs.plugins.binaryCompatibilityValidator)
alias(libs.plugins.dokka)
alias(libs.plugins.build.logic.library.kmp)
alias(libs.plugins.build.logic.library.android)
alias(libs.plugins.build.logic.library.publishing)
}

kotlin {
sourceSets {
commonMain {
dependencies {
implementation(project(":shared-domain"))

implementation(libs.kotlinx.datetime)
implementation(libs.kotlinx.serialization.json)
}
}
commonTest {
dependencies {
implementation(libs.kotlin.test)
}
}
androidMain {
dependencies {
implementation("dev.sdkforge.crypto:crypto-domain-android:0.0.2-SNAPSHOT")
}
}
androidUnitTest {
dependencies {
implementation("org.bouncycastle:bcprov-jdk18on:1.82")
implementation("io.mockk:mockk:1.14.5")
implementation("net.jodah:concurrentunit:0.4.6")
implementation("org.hamcrest:hamcrest:3.0")
}
}
}
}

android {
namespace = "dev.sdkforge.jwt.decode.data"
}
11 changes: 11 additions & 0 deletions shared-data/dependencies/releaseRuntimeClasspath.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
dev.sdkforge.crypto:crypto-domain-android:0.0.2-SNAPSHOT
dev.sdkforge.crypto:crypto-domain:0.0.2-SNAPSHOT
org.jetbrains.kotlin:kotlin-stdlib:2.2.20
org.jetbrains.kotlinx:kotlinx-datetime-jvm:0.7.1
org.jetbrains.kotlinx:kotlinx-datetime:0.7.1
org.jetbrains.kotlinx:kotlinx-serialization-bom:1.9.0
org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.9.0
org.jetbrains.kotlinx:kotlinx-serialization-core:1.9.0
org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:1.9.0
org.jetbrains.kotlinx:kotlinx-serialization-json:1.9.0
org.jetbrains:annotations:13.0
Loading